| | |
| | | |
| | | //$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; |
| | | } |
| | | |
| | |
| | | $vars = $attrib + array('product' => $this->config['product_name']); |
| | | unset($vars['name'], $vars['command']); |
| | | $label = rcube_label($attrib + array('vars' => $vars)); |
| | | return !$attrbi['noshow'] ? Q($label) : ''; |
| | | return !$attrib['noshow'] ? (get_boolean((string)$attrib['html']) ? $label : Q($label)) : ''; |
| | | } |
| | | break; |
| | | |
| | |
| | | // 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']); |
| | |
| | | $input_task = new html_hiddenfield(array('name' => '_task', 'value' => 'login')); |
| | | $input_action = new html_hiddenfield(array('name' => '_action', 'value' => 'login')); |
| | | $input_tzone = new html_hiddenfield(array('name' => '_timezone', 'id' => 'rcmlogintz', 'value' => '_default_')); |
| | | $input_dst = new html_hiddenfield(array('name' => '_dstactive', 'id' => 'rcmlogindst', 'value' => '_default_')); |
| | | $input_url = new html_hiddenfield(array('name' => '_url', 'id' => 'rcmloginurl', 'value' => $url)); |
| | | $input_user = new html_inputfield(array('name' => '_user', 'id' => 'rcmloginuser') |
| | | + $attrib + $user_attrib); |
| | |
| | | $out = $input_task->show(); |
| | | $out .= $input_action->show(); |
| | | $out .= $input_tzone->show(); |
| | | $out .= $input_dst->show(); |
| | | $out .= $input_url->show(); |
| | | $out .= $table->show(); |
| | | |