Ignore:
Timestamp:
Jun 1, 2011 1:05:18 PM (2 years ago)
Author:
thomasb
Message:

Add collected text labels in one single function call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_template.php

    r4762 r4825  
    3636    private $message = null; 
    3737    private $js_env = array(); 
     38    private $js_labels = array(); 
    3839    private $js_commands = array(); 
    3940    private $object_handlers = array(); 
     
    231232 
    232233        foreach ($args as $name) { 
    233             $this->command('add_label', $name, rcube_label($name)); 
     234            $this->js_labels[$name] = rcube_label($name); 
    234235        } 
    235236    } 
     
    267268        $this->env = array(); 
    268269        $this->js_env = array(); 
     270        $this->js_labels = array(); 
    269271        $this->js_commands = array(); 
    270272        $this->object_handlers = array(); 
     
    452454        if (!$this->framed && !empty($this->js_env)) { 
    453455            $out .= JS_OBJECT_NAME . '.set_env('.json_serialize($this->js_env).");\n"; 
     456        } 
     457        if (!empty($this->js_labels)) { 
     458            $this->command('add_label', $this->js_labels); 
    454459        } 
    455460        foreach ($this->js_commands as $i => $args) { 
Note: See TracChangeset for help on using the changeset viewer.