Page MenuHomePhorge

No OneTemporary

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
@@ -1,25 +1,25 @@
/*
* Help plugin client script
* @version 1.4
*/
// hook into switch-task event to open the help window
if (window.rcmail) {
rcmail.addEventListener('beforeswitch-task', function(prop) {
// catch clicks to help task button
if (prop == 'help') {
if (rcmail.task == 'help') // we're already there
return false;
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);
}
return 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
@@ -1,132 +1,141 @@
<?php
/**
* Roundcube Help Plugin
*
* @author Aleksander 'A.L.E.C' Machniak
* @author Thomas Bruederli <thomas@roundcube.net>
* @license GNU GPLv3+
*
* Configuration (see config.inc.php.dist)
*
**/
class help extends rcube_plugin
{
// all task excluding 'login' and 'logout'
public $task = '?(?!login|logout).*';
// we've got no ajax handlers
public $noajax = true;
// skip frames
public $noframe = true;
function init()
{
$this->load_config();
$this->add_texts('localization/', false);
// register task
$this->register_task('help');
// register actions
$this->register_action('index', array($this, 'action'));
$this->register_action('about', array($this, 'action'));
$this->register_action('license', array($this, 'action'));
$rcmail = rcmail::get_instance();
// add taskbar button
$this->add_button(array(
'command' => 'help',
'class' => 'button-help',
'classsel' => 'button-help button-selected',
'innerclass' => 'button-inner',
'label' => 'help.help',
), 'taskbar');
$this->include_script('help.js');
$rcmail->output->set_env('help_open_extwin', $rcmail->config->get('help_open_extwin', false), true);
// add style for taskbar button (must be here) and Help UI
$skin_path = $this->local_skin_path();
if (is_file($this->home . "/$skin_path/help.css")) {
$this->include_stylesheet("$skin_path/help.css");
}
}
function action()
{
$rcmail = rcmail::get_instance();
// register UI objects
$rcmail->output->add_handlers(array(
'helpcontent' => array($this, 'content'),
+ 'tablink' => array($this, 'tablink'),
));
if ($rcmail->action == 'about')
$rcmail->output->set_pagetitle($this->gettext('about'));
else if ($rcmail->action == 'license')
$rcmail->output->set_pagetitle($this->gettext('license'));
else
$rcmail->output->set_pagetitle($this->gettext('help'));
$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();
switch ($rcmail->action) {
case 'about':
if (is_readable($this->home . '/content/about.html')) {
return @file_get_contents($this->home . '/content/about.html');
}
$default = $rcmail->url(array('_task' => 'settings', '_action' => 'about', '_framed' => 1));
$src = $rcmail->config->get('help_about_url', $default);
break;
case 'license':
if (is_readable($this->home . '/content/license.html')) {
return @file_get_contents($this->home . '/content/license.html');
}
$src = $rcmail->config->get('help_license_url', 'http://www.gnu.org/licenses/gpl-3.0-standalone.html');
break;
default:
$src = $rcmail->config->get('help_source');
// resolve task/action for depp linking
$index_map = $rcmail->config->get('help_index_map', array());
$rel = $_REQUEST['_rel'];
list($task,$action) = explode('/', $rel);
if ($add = $index_map[$rel])
$src .= $add;
else if ($add = $index_map[$task])
$src .= $add;
break;
}
// default content: iframe
if (!empty($src)) {
$attrib['src'] = $this->resolve_language($src);
}
if (empty($attrib['id']))
$attrib['id'] = 'rcmailhelpcontent';
$attrib['name'] = $attrib['id'];
return $rcmail->output->frame($attrib);
}
private function resolve_language($path)
{
// resolve language placeholder
$rcmail = rcmail::get_instance();
$langmap = $rcmail->config->get('help_language_map', array('*' => 'en_US'));
$lang = !empty($langmap[$_SESSION['language']]) ? $langmap[$_SESSION['language']] : $langmap['*'];
return str_replace('%l', $lang, $path);
}
}
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
@@ -1,29 +1,43 @@
/***** Roundcube|Mail Help task styles *****/
#taskbar a.button-help
{
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;
background-color: #F2F2F2;
}
#helplicense, #helpabout
{
width: 46em;
padding: 1em 2em;
}
#helplicense a, #helpabout a
{
color: #900;
}
#helpabout
{
margin: 0 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
@@ -1,36 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
<link rel="stylesheet" type="text/css" href="/this/help.css" />
<script type="text/javascript">
function help_init_settings_tabs()
{
var action, tab = '#helptabindex';
if (window.rcmail && (action = rcmail.env.action)) {
tab = '#helptab' + (action ? action : 'index');
}
$(tab).addClass('tablink-selected');
}
</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>
<div id="mainscreen" class="box help-box">
<roundcube:object name="helpcontent" id="helpcontentframe" width="100%" height="100%" frameborder="0" src="/watermark.html" />
</div>
</body>
</html>
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
@@ -1,32 +1,32 @@
<roundcube:object name="doctype" value="html5" />
<html>
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
</head>
<roundcube:if condition="env:extwin" /><body class="extwin"><roundcube:else /><body><roundcube:endif />
<roundcube:include file="/includes/header.html" />
<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>
<div id="pluginbody" class="uibox offset">
<div class="iframebox help_<roundcube:var name='env:action' />">
<roundcube:object name="helpcontent" id="helpcontentframe" style="width:100%; height:100%" frameborder="0" src="/watermark.html" />
</div>
<roundcube:object name="message" id="message" class="statusbar" />
</div>
</div>
<roundcube:include file="/includes/footer.html" />
</body>
</html>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Mar 1, 4:46 AM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
165842
Default Alt Text
(11 KB)

Event Timeline