/** * Constructor * * @todo Replace $this->config with the real rcube_config object */ public function __construct($task, $framed = false) { parent::__construct(); $this->app = rcmail::get_instance(); $this->config = $this->app->config->all(); $this->browser = new rcube_browser(); //$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']); // add common javascripts $this->add_script('var ' . JS_OBJECT_NAME . ' = new rcube_webmail();', 'head_top'); // don't wait for page onload. Call init at the bottom of the page (delayed) $this->add_script(JS_OBJECT_NAME . '.init();', 'docready'); $this->scripts_path = 'program/js/'; $this->include_script('jquery.min.js'); $this->include_script('common.js'); $this->include_script('app.js'); // register common UI objects $this->add_handlers(array('loginform' => array($this, 'login_form'), 'preloader' => array($this, 'preloader'), 'username' => array($this, 'current_username'), 'message' => array($this, 'message_container'), 'charsetselector' => array($this, 'charset_selector'))); }