Performance: Load tags UI (and initialize configuration folder/cache) on when it's needed
This commit is contained in:
parent
6fc46f6823
commit
ffdc0454e0
2 changed files with 25 additions and 23 deletions
|
@ -79,10 +79,6 @@ class kolab_tags extends rcube_plugin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->rc->action == 'print') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($engine = $this->engine()) {
|
if ($engine = $this->engine()) {
|
||||||
$engine->ui();
|
$engine->ui();
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,14 @@ class kolab_tags_engine
|
||||||
public function ui()
|
public function ui()
|
||||||
{
|
{
|
||||||
// set templates of Files UI and widgets
|
// set templates of Files UI and widgets
|
||||||
if ($this->rc->task == 'mail') {
|
if ($this->rc->task != 'mail') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview'))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$this->plugin->add_texts('localization/');
|
$this->plugin->add_texts('localization/');
|
||||||
|
|
||||||
$this->plugin->include_stylesheet($this->plugin->local_skin_path().'/style.css');
|
$this->plugin->include_stylesheet($this->plugin->local_skin_path().'/style.css');
|
||||||
|
@ -67,7 +74,6 @@ class kolab_tags_engine
|
||||||
// load miniColors
|
// load miniColors
|
||||||
jqueryui::miniColors();
|
jqueryui::miniColors();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Engine actions handler (managing tag objects)
|
* Engine actions handler (managing tag objects)
|
||||||
|
|
Loading…
Add table
Reference in a new issue