| | |
| | | if ($this->framed || !empty($_REQUEST['_framed'])) |
| | | $this->set_env('framed', 1); |
| | | |
| | | $lic = <<<EOF |
| | | /* |
| | | @licstart The following is the entire license notice for the |
| | | JavaScript code in this page. |
| | | |
| | | Copyright (C) 2005-2014 The Roundcube Dev Team |
| | | |
| | | The JavaScript code in this page is free software: you can redistribute |
| | | it and/or modify it under the terms of the GNU General Public License |
| | | as published by the Free Software Foundation, either version 3 of |
| | | the License, or (at your option) any later version. |
| | | |
| | | The code is distributed WITHOUT ANY WARRANTY; without even the implied |
| | | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| | | See the GNU GPL for more details. |
| | | |
| | | @licend The above is the entire license notice |
| | | for the JavaScript code in this page. |
| | | */ |
| | | EOF; |
| | | // add common javascripts |
| | | $this->add_script($lic, 'head_top'); |
| | | $this->add_script('var '.self::JS_OBJECT_NAME.' = new rcube_webmail();', 'head_top'); |
| | | |
| | | // don't wait for page onload. Call init at the bottom of the page (delayed) |
| | |
| | | return ''; |
| | | } |
| | | |
| | | // localize title and summary attributes |
| | | if ($command != 'button' && !empty($attrib['title']) && $this->app->text_exists($attrib['title'])) { |
| | | $attrib['title'] = $this->app->gettext($attrib['title']); |
| | | } |
| | | if ($command != 'button' && !empty($attrib['summary']) && $this->app->text_exists($attrib['summary'])) { |
| | | $attrib['summary'] = $this->app->gettext($attrib['summary']); |
| | | } |
| | | |
| | | // execute command |
| | | switch ($command) { |
| | | // return a button |
| | |
| | | $attrib['alt'] = html::quote($this->app->gettext($attrib['alt'], $attrib['domain'])); |
| | | } |
| | | |
| | | // set accessibility attributes |
| | | if (!$attrib['role']) { |
| | | $attrib['role'] = 'button'; |
| | | } |
| | | if (!empty($attrib['class']) && !empty($attrib['classact']) || !empty($attrib['imagepas']) && !empty($attrib['imageact'])) { |
| | | if (array_key_exists('tabindex', $attrib)) |
| | | $attrib['data-tabindex'] = $attrib['tabindex']; |
| | | $attrib['tabindex'] = '-1'; // disable button by default |
| | | $attrib['aria-disabled'] = 'true'; |
| | | } |
| | | |
| | | // set title to alt attribute for IE browsers |
| | | if ($this->browser->ie && !$attrib['title'] && $attrib['alt']) { |
| | | $attrib['title'] = $attrib['alt']; |
| | |
| | | $this->pagetitle = 'Roundcube Mail'; |
| | | } |
| | | |
| | | // declare page language |
| | | if (!empty($_SESSION['language'])) { |
| | | $lang = substr($_SESSION['language'], 0, 2); |
| | | $output = preg_replace('/<html/', '<html lang="' . html::quote($lang) . '"', $output, 1); |
| | | if (!headers_sent()) { |
| | | header('Content-Language: ' . $lang); |
| | | } |
| | | } |
| | | |
| | | // replace specialchars in content |
| | | $page_title = html::quote($this->pagetitle); |
| | | $page_header = ''; |