summaryrefslogtreecommitdiff
path: root/program/include/rcube_template.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-06-01 17:05:18 +0000
committerthomascube <thomas@roundcube.net>2011-06-01 17:05:18 +0000
commit4dcd437adeeae71336760a4ce9a30d7a56500942 (patch)
tree1866dde3e417ef4173e6745b08574e1f3cc6fa45 /program/include/rcube_template.php
parent3cacf941fa30e8c02f3f7aebcc8747036d0d8d20 (diff)
Add collected text labels in one single function call
Diffstat (limited to 'program/include/rcube_template.php')
-rwxr-xr-xprogram/include/rcube_template.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/program/include/rcube_template.php b/program/include/rcube_template.php
index 8495ab8ee..6d6c21e87 100755
--- a/program/include/rcube_template.php
+++ b/program/include/rcube_template.php
@@ -35,6 +35,7 @@ class rcube_template extends rcube_html_page
private $pagetitle = '';
private $message = null;
private $js_env = array();
+ private $js_labels = array();
private $js_commands = array();
private $object_handlers = array();
private $plugin_skin_path;
@@ -230,7 +231,7 @@ class rcube_template extends rcube_html_page
$args = $args[0];
foreach ($args as $name) {
- $this->command('add_label', $name, rcube_label($name));
+ $this->js_labels[$name] = rcube_label($name);
}
}
@@ -266,6 +267,7 @@ class rcube_template extends rcube_html_page
{
$this->env = array();
$this->js_env = array();
+ $this->js_labels = array();
$this->js_commands = array();
$this->object_handlers = array();
parent::reset();
@@ -452,6 +454,9 @@ class rcube_template extends rcube_html_page
if (!$this->framed && !empty($this->js_env)) {
$out .= JS_OBJECT_NAME . '.set_env('.json_serialize($this->js_env).");\n";
}
+ if (!empty($this->js_labels)) {
+ $this->command('add_label', $this->js_labels);
+ }
foreach ($this->js_commands as $i => $args) {
$method = array_shift($args);
foreach ($args as $i => $arg) {