| | |
| | | |
| | | //$this->framed = $framed; |
| | | $this->set_env('task', $task); |
| | | $this->set_env('x_frame_options', $this->app->config->get('x_frame_options', 'sameorigin')); |
| | | |
| | | // load the correct skin (in case user-defined) |
| | | $this->set_skin($this->config['skin']); |
| | |
| | | public function command() |
| | | { |
| | | $cmd = func_get_args(); |
| | | if (strpos($cmd[0], 'plugin.') === false) |
| | | if (strpos($cmd[0], 'plugin.') !== false) |
| | | $this->js_commands[] = array('triggerEvent', $cmd[0], $cmd[1]); |
| | | else |
| | | $this->js_commands[] = $cmd; |
| | | } |
| | | |
| | |
| | | // make valid href to specific buttons |
| | | if (in_array($attrib['command'], rcmail::$main_tasks)) { |
| | | $attrib['href'] = rcmail_url(null, null, $attrib['command']); |
| | | $attrib['onclick'] = sprintf("%s.command('switch-task','%s');return false", JS_OBJECT_NAME, $attrib['command']); |
| | | } |
| | | else if ($attrib['task'] && in_array($attrib['task'], rcmail::$main_tasks)) { |
| | | $attrib['href'] = rcmail_url($attrib['command'], null, $attrib['task']); |