Performance: Load tags UI (and initialize configuration folder/cache) on when it's needed

This commit is contained in:
Aleksander Machniak 2016-02-25 18:16:54 +01:00 committed by Jeroen van Meeuwen (Kolab Systems)
parent e0d11833a1
commit 4d350d599e

View file

@ -46,7 +46,12 @@ class kolab_tags_engine
*/
public function ui()
{
if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview', 'dialog-ui'))) {
// set templates of Files UI and widgets
if ($this->rc->task != 'mail') {
return;
}
if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview'))) {
return;
}
@ -57,7 +62,7 @@ class kolab_tags_engine
$this->rc->output->add_label('cancel', 'save');
$this->plugin->add_label('tags', 'add', 'edit', 'delete', 'saving',
'nameempty', 'nameexists', 'colorinvalid', 'untag', 'tagname',
'tagcolor', 'tagsearchnew', 'newtag', 'notags');
'tagcolor', 'tagsearchnew', 'newtag');
$this->rc->output->add_handlers(array(
'plugin.taglist' => array($this, 'taglist'),