From d8e10161098db2dcd03390bc7169cd88b31d4c60 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Tue, 9 Jul 2013 17:02:51 +0200 Subject: Fix opening in new window; keep extwin mode when switching help actions --- plugins/help/help.js | 2 +- plugins/help/help.php | 9 +++++++++ plugins/help/skins/classic/help.css | 14 ++++++++++++++ plugins/help/skins/classic/templates/help.html | 15 ++++++++++----- plugins/help/skins/larry/templates/help.html | 6 +++--- 5 files changed, 37 insertions(+), 9 deletions(-) (limited to 'plugins') diff --git a/plugins/help/help.js b/plugins/help/help.js index e53e96755..59a93c537 100644 --- a/plugins/help/help.js +++ b/plugins/help/help.js @@ -13,7 +13,7 @@ if (window.rcmail) { var url = rcmail.url('help/index', { _rel: rcmail.task + (rcmail.env.action ? '/'+rcmail.env.action : '') }); if (rcmail.env.help_open_extwin) { - rcmail.open_window(url, true, false); + rcmail.open_window(url, 1020, false); } else { rcmail.redirect(url, false); diff --git a/plugins/help/help.php b/plugins/help/help.php index ab665d0a8..37fd908a3 100644 --- a/plugins/help/help.php +++ b/plugins/help/help.php @@ -61,6 +61,7 @@ class help extends rcube_plugin // register UI objects $rcmail->output->add_handlers(array( 'helpcontent' => array($this, 'content'), + 'tablink' => array($this, 'tablink'), )); if ($rcmail->action == 'about') @@ -73,6 +74,14 @@ class help extends rcube_plugin $rcmail->output->send('help.help'); } + function tablink($attrib) + { + $rcmail = rcmail::get_instance(); + $attrib['name'] = 'helplink' . $attrib['action']; + $attrib['href'] = $rcmail->url(array('_action' => $attrib['action'], '_extwin' => !empty($_REQUEST['_extwin']) ? 1 : null)); + return $rcmail->output->button($attrib); + } + function content($attrib) { $rcmail = rcmail::get_instance(); diff --git a/plugins/help/skins/classic/help.css b/plugins/help/skins/classic/help.css index ad5b7dab4..c45b8f0b0 100644 --- a/plugins/help/skins/classic/help.css +++ b/plugins/help/skins/classic/help.css @@ -5,6 +5,20 @@ background-image: url('help.gif'); } +.extwin #tabsbar +{ + top: 21px; + left: 20px; + right: 100px; + border-bottom: 0; +} + +.closelink { + position: absolute; + top: 20px; + right: 20px; +} + .help-box { overflow: auto; diff --git a/plugins/help/skins/classic/templates/help.html b/plugins/help/skins/classic/templates/help.html index 5bc342044..3d5b22869 100644 --- a/plugins/help/skins/classic/templates/help.html +++ b/plugins/help/skins/classic/templates/help.html @@ -15,15 +15,20 @@ function help_init_settings_tabs() } - - + + + + + + +
- - - + + +
diff --git a/plugins/help/skins/larry/templates/help.html b/plugins/help/skins/larry/templates/help.html index 592a94c66..bfd3f1141 100644 --- a/plugins/help/skins/larry/templates/help.html +++ b/plugins/help/skins/larry/templates/help.html @@ -11,9 +11,9 @@
- - - + + +
-- cgit v1.2.3