// remove not active commands
foreach ($this->aCommands as $idx => $com) {
- // display_error( $idx.':'.var_dump($com));
// If we should reload whole page content ignore all commands but the update.
// This is page repost equivalent, although header and footer are not reloaded.
+ if ($com['why'] !== true && !isset($this->triggers[$com['why']])) {
+ unset($this->aCommands[$idx]);
+// display_error('unset '.$com['t']);
+ }
+ else
if($com['n'] == 'up' && $com['t'] == '_page_body') {
- $this->aCommands = array($com);
+ $cmds = array($com);
+ foreach( $this->aCommands as $k=> $cmd) {
+ if ($cmd['n'] == 'fc') { // save focus
+ $cmds[] = $cmd; break;
+ }
+ }
+ $this->aCommands = $cmds;
break;
}
- else
- if ($com['why'] !== true && !isset($this->triggers[$com['why']]))
- unset($this->aCommands[$idx]);
}
+// display_error('Activate:'.htmlentities(print_r($this->triggers, true)));
+// display_error('Commands :'.htmlentities(print_r($this->aCommands, true)));
$GLOBALS['_RESULT'] = $this->aCommands;
// exit();
}