Changeset 5332 in subversion
- Timestamp:
- Oct 12, 2011 3:15:41 AM (20 months ago)
- File:
-
- 1 edited
-
trunk/plugins/managesieve/managesieve.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/managesieve/managesieve.php
r5300 r5332 64 64 65 65 if ($this->rc->task == 'settings') { 66 // load localization 67 $this->add_texts('localization/', array('filters','managefilters')); 68 69 if (!strpos($this->rc->action, 'managesieve')) { 70 $this->include_script('managesieve.js'); 71 } 66 $this->init_ui(); 72 67 } 73 68 else if ($this->rc->task == 'mail') { … … 80 75 } 81 76 } 77 } 78 79 /** 80 * Initializes plugin's UI (localization, js script) 81 */ 82 private function init_ui() 83 { 84 if ($this->ui_initialized) 85 return; 86 87 // load localization 88 $this->add_texts('localization/', array('filters','managefilters')); 89 $this->include_script('managesieve.js'); 90 91 $this->ui_initialized = true; 82 92 } 83 93 … … 87 97 function mail_task_handler() 88 98 { 89 // load localization90 $this->add_texts('localization/');91 92 99 // use jQuery for popup window 93 100 $this->require_plugin('jqueryui'); 94 101 95 // include main js script96 $this->in clude_script('managesieve.js');102 // include js script and localization 103 $this->init_ui(); 97 104 98 105 // include styles … … 282 289 function managesieve_actions() 283 290 { 284 // load localization 285 $this->add_texts('localization/', array('filters','managefilters')); 286 287 // include main js script 288 if ($this->api->output->type == 'html') { 289 $this->include_script('managesieve.js'); 290 } 291 $this->init_ui(); 291 292 292 293 $error = $this->managesieve_start();
Note: See TracChangeset
for help on using the changeset viewer.
