From 95a18fa549c9576b7035d27ef1712c5dfd01422d Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 09 Jul 2013 12:57:12 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 plugins/help/skins/larry/templates/help.html   |    6 +++---
 plugins/help/help.php                          |    9 +++++++++
 plugins/help/help.js                           |    2 +-
 plugins/help/skins/classic/templates/help.html |   15 ++++++++++-----
 plugins/help/skins/classic/help.css            |   14 ++++++++++++++
 5 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/plugins/help/help.js b/plugins/help/help.js
index e53e967..59a93c5 100644
--- a/plugins/help/help.js
+++ b/plugins/help/help.js
@@ -13,7 +13,7 @@
 
             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 ab665d0..37fd908 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -61,6 +61,7 @@
         // register UI objects
         $rcmail->output->add_handlers(array(
             'helpcontent' => array($this, 'content'),
+            'tablink' => array($this, 'tablink'),
         ));
 
         if ($rcmail->action == 'about')
@@ -73,6 +74,14 @@
         $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 ad5b7da..c45b8f0 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 5bc3420..3d5b228 100644
--- a/plugins/help/skins/classic/templates/help.html
+++ b/plugins/help/skins/classic/templates/help.html
@@ -15,15 +15,20 @@
 }
 </script>
 </head>
-<roundcube:if condition="env:extwin" /><body class="extwin"><roundcube:else /><body><roundcube:endif />
-
+<roundcube:if condition="env:extwin" />
+<body class="extwin">
+<roundcube:object name="message" id="message" />
+<roundcube:button name="close" type="link" label="close" class="closelink" onclick="self.close()" />
+<roundcube:else />
+<body>
 <roundcube:include file="/includes/taskbar.html" />
 <roundcube:include file="/includes/header.html" />
+<roundcube:endif />
 
 <div id="tabsbar">
-<span id="helptabindex" class="tablink"><roundcube:button name="helpindex" href="?_task=help" type="link" label="help.help" title="help.help" /></span>
-<span id="helptababout" class="tablink"><roundcube:button name="helpabout" href="?_task=help&amp;_action=about" type="link" label="help.about" title="help.about" class="tablink" /></span>
-<span id="helptablicense" class="tablink"><roundcube:button name="helplicense" href="?_task=help&amp;_action=license" type="link" label="help.license" title="help.license" class="tablink" /></span>
+<span id="helptabindex" class="tablink"><roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" /></span>
+<span id="helptababout" class="tablink"><roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="tablink" /></span>
+<span id="helptablicense" class="tablink"><roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="tablink" /></span>
 <roundcube:container name="helptabs" id="helptabsbar" />
 <script type="text/javascript"> if (window.rcmail) rcmail.add_onload(help_init_settings_tabs);</script>
 </div>
diff --git a/plugins/help/skins/larry/templates/help.html b/plugins/help/skins/larry/templates/help.html
index 592a94c..bfd3f11 100644
--- a/plugins/help/skins/larry/templates/help.html
+++ b/plugins/help/skins/larry/templates/help.html
@@ -11,9 +11,9 @@
 <div id="mainscreen">
 
 <div id="helptoolbar" class="toolbar">
-<roundcube:button name="helpdefault" href="?_task=help" type="link" label="help.help" title="help.help" class="button help" />
-<roundcube:button name="helpabout" href="?_task=help&amp;_action=about" type="link" label="help.about" title="help.about" class="button about" />
-<roundcube:button name="helplicense" href="?_task=help&amp;_action=license" type="link" label="help.license" title="help.license" class="button license" />
+<roundcube:object name="tablink" action="index" type="link" label="help.help" title="help.help" class="button help" />
+<roundcube:object name="tablink" action="about" type="link" label="help.about" title="help.about" class="button about" />
+<roundcube:object name="tablink" action="license" type="link" label="help.license" title="help.license" class="button license" />
 <roundcube:container name="helptabs" id="helptabsbar" />
 </div>
 

--
Gitblit v1.9.1