Changeset 4dcd437 in github
- Timestamp:
- Jun 1, 2011 1:05:18 PM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 4fb6a28
- Parents:
- 3cacf94
- Location:
- program
- Files:
-
- 2 edited
-
include/rcube_template.php (modified) (4 diffs)
-
js/app.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_template.php
r8e99ffb r4dcd437 36 36 private $message = null; 37 37 private $js_env = array(); 38 private $js_labels = array(); 38 39 private $js_commands = array(); 39 40 private $object_handlers = array(); … … 231 232 232 233 foreach ($args as $name) { 233 $this-> command('add_label', $name, rcube_label($name));234 $this->js_labels[$name] = rcube_label($name); 234 235 } 235 236 } … … 267 268 $this->env = array(); 268 269 $this->js_env = array(); 270 $this->js_labels = array(); 269 271 $this->js_commands = array(); 270 272 $this->object_handlers = array(); … … 452 454 if (!$this->framed && !empty($this->js_env)) { 453 455 $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); 454 459 } 455 460 foreach ($this->js_commands as $i => $args) { -
program/js/app.js
r3cacf94 r4dcd437 71 71 72 72 // add a localized label to the client environment 73 this.add_label = function(key, value) 74 { 75 this.labels[key] = value; 73 this.add_label = function(p, value) 74 { 75 if (typeof p == 'string') 76 this.labels[p] = value; 77 else if (typeof p == 'object') 78 $.extend(this.labels, p); 76 79 }; 77 80
Note: See TracChangeset
for help on using the changeset viewer.
