Improve help plugin with some options to display contents according to the current task/step
parent
cb1715cd16
commit
08167e9114
@ -1,5 +1,30 @@
|
||||
<?php
|
||||
|
||||
// Help content iframe source
|
||||
// $rcmail_config['help_source'] = 'http://trac.roundcube.net/wiki';
|
||||
$rcmail_config['help_source'] = '';
|
||||
// %l will be replaced by the language code resolved using the 'help_language_map' option
|
||||
$rcmail_config['help_source'] = 'http://roundcube.net/doc/help/0.9/%l/';
|
||||
|
||||
// Map task/action combinations to deep-links
|
||||
// Use '<task>/<action>' or only '<task>' strings as keys
|
||||
// The values will be appended to the 'help_source' URL
|
||||
$rcmail_config['help_index_map'] = array(
|
||||
'login' => 'login.html',
|
||||
'mail' => 'mail/index.html',
|
||||
'mail/compose' => 'mail/compose.html',
|
||||
);
|
||||
|
||||
// Map to translate Roundcube language codes into help document languages
|
||||
// The '*' entry will be used as default
|
||||
$rcmail_config['help_language_map'] = array('*' => 'en_US');
|
||||
|
||||
// Enter an absolute URL to a page displaying information about this webmail
|
||||
// Alternatively, create a HTML file under <this-plugin-dir>/content/about.html
|
||||
$rcmail_config['help_about_url'] = null;
|
||||
|
||||
// Enter an absolute URL to a page displaying information about this webmail
|
||||
// Alternatively, put your license text to <this-plugin-dir>/content/license.html
|
||||
$rcmail_config['help_license_url'] = null;
|
||||
|
||||
// Determine whether to open the help in a new window
|
||||
$rcmail_config['help_open_extwin'] = false;
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
<div id="helpabout" class="readtext">
|
||||
<h2 align="center">Copyright © 2005-2012, The Roundcube Dev Team</h2>
|
||||
|
||||
<p>
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License (with exceptions
|
||||
for skins & plugins) as published by the Free Software Foundation,
|
||||
either version 3 of the License, or (at your option) any later version.
|
||||
</p>
|
||||
<p>
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
</p>
|
||||
<p>
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <a href="http://www.gnu.org/licenses/">www.gnu.org/licenses</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For more details about licensing and the expections for skins and plugins
|
||||
see <a href="http://roundcube.net/license">roundcube.net/license</a>.
|
||||
</p>
|
||||
|
||||
<p><br/>Website: <a href="http://roundcube.net">roundcube.net</a></p>
|
||||
</div>
|
@ -0,0 +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, false, false);
|
||||
}
|
||||
else {
|
||||
rcmail.redirect(url, false);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue