Changeset 0e99d37 in github
- Timestamp:
- Jun 1, 2009 11:35:53 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 47f0725
- Parents:
- 0ce11986
- Location:
- program
- Files:
-
- 4 edited
-
include/rcube_json_output.php (modified) (3 diffs)
-
include/rcube_template.php (modified) (1 diff)
-
js/app.js (modified) (1 diff)
-
js/common.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_json_output.php
r69f18a09 r0e99d37 34 34 private $texts = array(); 35 35 private $commands = array(); 36 private $callbacks = array(); 36 37 private $message = null; 37 38 … … 123 124 public function command() 124 125 { 125 $this->commands[] = func_get_args(); 126 $cmd = func_get_args(); 127 128 if (strpos($cmd[0], 'plugin.') === 0) 129 $this->callbacks[] = $cmd; 130 else 131 $this->commands[] = $cmd; 126 132 } 127 133 … … 228 234 $response['texts'] = $this->texts; 229 235 230 // send response code236 // send function calls 231 237 $response['exec'] = $this->get_js_commands() . $add; 238 239 if (!empty($this->callbacks)) 240 $response['callbacks'] = $this->callbacks; 232 241 233 242 echo json_serialize($response); -
program/include/rcube_template.php
ra17fe62 r0e99d37 202 202 public function command() 203 203 { 204 $this->js_commands[] = func_get_args(); 204 $cmd = func_get_args(); 205 if (strpos($cmd[0], 'plugin.') === false) 206 $this->js_commands[] = $cmd; 205 207 } 206 208 -
program/js/app.js
r52818559 r0e99d37 3924 3924 eval(response.exec); 3925 3925 } 3926 3927 // execute callback functions of plugins 3928 if (response.callbacks && response.callbacks.length) { 3929 for (var i=0; i < response.callbacks.length; i++) 3930 this.triggerEvent(response.callbacks[i][0], response.callbacks[i][1]); 3931 } 3926 3932 3927 3933 // process the response data according to the sent action -
program/js/common.js
r309d2f4 r0e99d37 289 289 var ret, h; 290 290 if (typeof e == 'undefined') 291 e = {};292 if (typeof e == 'object')291 e = this; 292 else if (typeof e == 'object') 293 293 e.event = evt; 294 294 … … 298 298 if ((h = this._events[evt][i])) { 299 299 if (typeof h.func == 'function') 300 ret = h.func.call ? h.func.call(h.obj, this, e) : h.func(this,e);300 ret = h.func.call ? h.func.call(h.obj, e) : h.func(e); 301 301 else if (typeof h.obj[h.func] == 'function') 302 ret = h.obj[h.func]( this,e);302 ret = h.obj[h.func](e); 303 303 304 304 // cancel event execution
Note: See TracChangeset
for help on using the changeset viewer.
