From 3412e50b54e3daac8745234e21ab6e72be0ed165 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli <thomas@roundcube.net> Date: Wed, 04 Jun 2014 11:20:33 -0400 Subject: [PATCH] Fix attachment menu structure and aria-attributes --- plugins/help/help.php | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/plugins/help/help.php b/plugins/help/help.php index 66c4256..df08caf 100644 --- a/plugins/help/help.php +++ b/plugins/help/help.php @@ -33,6 +33,11 @@ $this->register_action('about', array($this, 'action')); $this->register_action('license', array($this, 'action')); + $this->add_hook('startup', array($this, 'startup')); + } + + function startup($args) + { $rcmail = rcmail::get_instance(); // add taskbar button @@ -61,6 +66,7 @@ // register UI objects $rcmail->output->add_handlers(array( 'helpcontent' => array($this, 'content'), + 'tablink' => array($this, 'tablink'), )); if ($rcmail->action == 'about') @@ -73,6 +79,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(); @@ -82,7 +96,8 @@ if (is_readable($this->home . '/content/about.html')) { return @file_get_contents($this->home . '/content/about.html'); } - $src = $rcmail->config->get('help_about_url', $rcmail->url(array('_task' => 'settings', '_action' => 'about'))); + $default = $rcmail->url(array('_task' => 'settings', '_action' => 'about', '_framed' => 1)); + $src = $rcmail->config->get('help_about_url', $default); break; case 'license': -- Gitblit v1.9.1