mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-18 22:13:30 +01:00
89cdd1b207
(1) Port to XSLT templates (2) Completes (apart from all the bugs :) the functionality of the three-teir phpgroupware style object system (no longer is filemanager a single 3000 line file!) (3) The beginings of a pluggable "uiaction" framework (ideally in the future this will be used for optional "rich text editors", or view filters etc)
51 lines
972 B
PHP
51 lines
972 B
PHP
<?php
|
|
|
|
class uiactions
|
|
{
|
|
var $action_classes = array(
|
|
0=>'filemanager.uiaction_edit'
|
|
);
|
|
var $actions = array();
|
|
|
|
function uiactions()
|
|
{
|
|
//Construct the action objects
|
|
foreach($this->action_classes as $action_class)
|
|
{
|
|
$o = CreateObject($action_class);
|
|
foreach ($o->actions as $name => $displayname)
|
|
{
|
|
$this->actions[$name] = &$o;
|
|
}
|
|
}
|
|
}
|
|
function run_action($parent, $action)
|
|
{
|
|
|
|
|
|
// print_r($this->actions);
|
|
$this->actions[$action]->$action($parent);
|
|
exit();
|
|
}
|
|
function dispatch($parent)
|
|
{
|
|
//First, see if the action is specified in the url with a 'uiaction=' param
|
|
if ($action = get_var('uiaction', array('GET', 'POST')))
|
|
{
|
|
$this->run_action($parent, $action);
|
|
}
|
|
@reset($_POST);
|
|
while(list($name,$value) = each($_POST))
|
|
{
|
|
if (substr($name, 0 , 8) == 'uiaction')
|
|
{
|
|
$action = substr($name, 9);
|
|
$this->run_action($parent, $action);
|
|
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
?>
|