Mercurial > hg > rc1
annotate plugins/thunderbird_labels/thunderbird_labels.php @ 23:5a851d965bc1
sorting, some better displays
author | Charlie Root |
---|---|
date | Wed, 17 Jan 2018 09:13:17 -0500 |
parents | 678dcc5152a8 |
children | 4869fae20b88 |
rev | line source |
---|---|
0 | 1 <?php |
2 /** | |
3 * Thunderbird Labels Plugin for Roundcube Webmail | |
4 * | |
5 * Plugin to show the 5 Message Labels Thunderbird Email-Client provides for IMAP | |
6 * | |
7 * @version $Revision$ | |
8 * @author Michael Kefeder | |
9 * @url http://code.google.com/p/rcmail-thunderbird-labels/ | |
10 */ | |
11 class thunderbird_labels extends rcube_plugin | |
12 { | |
13 public $task = 'mail|settings'; | |
14 private $rc; | |
15 private $map; | |
16 | |
17 function init() | |
18 { | |
19 $this->rc = rcmail::get_instance(); | |
20 $this->load_config(); | |
21 $this->add_texts('localization/', false); | |
22 | |
23 $this->setCustomLabels(); | |
24 | |
25 if ($this->rc->task == 'mail') | |
26 { | |
27 # -- disable plugin when printing message | |
28 if ($this->rc->action == 'print') | |
29 return; | |
30 | |
31 if (!$this->rc->config->get('tb_label_enable')) | |
32 // disable plugin according to prefs | |
33 return; | |
34 | |
9 | 35 // how many labels? |
36 $max_id = $this->rc->config->get('tb_max_label'); | |
37 // pass 'tb_max_label', 'tb_label_enable_shortcuts' | |
38 // and 'tb_label_style' prefs to JS | |
39 $this->rc->output->set_env('tb_max_label', $max_id); | |
0 | 40 $this->rc->output->set_env('tb_label_enable_shortcuts', $this->rc->config->get('tb_label_enable_shortcuts')); |
41 $this->rc->output->set_env('tb_label_style', $this->rc->config->get('tb_label_style')); | |
42 | |
43 $this->include_script('tb_label.js'); | |
44 $this->add_hook('messages_list', array($this, 'read_flags')); | |
45 $this->add_hook('message_load', array($this, 'read_single_flags')); | |
46 $this->add_hook('template_object_messageheaders', array($this, 'color_headers')); | |
47 $this->add_hook('render_page', array($this, 'tb_label_popup')); | |
48 $this->include_stylesheet($this->local_skin_path() . '/tb_label.css'); | |
49 | |
50 $this->name = get_class($this); | |
51 # -- additional TB flags | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
52 $this->add_tb_flags = array(); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
53 for ($i = 1; $i <= $max_id; $i++) { |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
54 $this->add_tb_flags['LABEL'.$i]='$Label'.$i; |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
55 } |
0 | 56 $this->message_tb_labels = array(); |
57 | |
58 $this->add_button( | |
59 array( | |
60 'command' => 'plugin.thunderbird_labels.rcm_tb_label_submenu', | |
61 'id' => 'tb_label_popuplink', | |
62 'title' => 'tb_label_button_title', | |
63 'domain' => $this->ID, | |
64 'type' => 'link', | |
65 'content' => $this->gettext('tb_label_button_label'), | |
66 'class' => 'button buttonPas disabled', | |
67 'classact' => 'button', | |
68 ), | |
69 'toolbar' | |
70 ); | |
71 | |
72 // JS function "set_flags" => PHP function "set_flags" | |
73 $this->register_action('plugin.thunderbird_labels.set_flags', array($this, 'set_flags')); | |
74 | |
75 | |
76 if (method_exists($this, 'require_plugin') | |
77 && in_array('contextmenu', $this->rc->config->get('plugins')) | |
78 && $this->require_plugin('contextmenu') | |
79 && $this->rc->config->get('tb_label_enable_contextmenu')) | |
80 { | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
81 if ($this->rc->action == 'list') |
0 | 82 $this->add_hook('render_mailboxlist', array($this, 'show_tb_label_contextmenu')); |
9 | 83 #rcube::write_log('lab','ctxt: '.$this->rc->action); |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
84 } |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
85 else { |
9 | 86 #rcube::write_log('lab','no ctxt'); |
0 | 87 } |
88 } | |
89 elseif ($this->rc->task == 'settings') | |
90 { | |
91 $this->include_stylesheet($this->local_skin_path() . '/tb_label.css'); | |
92 $this->add_hook('preferences_list', array($this, 'prefs_list')); | |
93 $this->add_hook('preferences_sections_list', array($this, 'prefs_section')); | |
94 $this->add_hook('preferences_save', array($this, 'prefs_save')); | |
95 } | |
96 } | |
97 | |
98 private function setCustomLabels() | |
99 { | |
100 $c = $this->rc->config->get('tb_label_custom_labels'); | |
101 if (empty($c)) | |
102 { | |
103 // if no user specific labels, use localized strings by default | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
104 $max_id = $this->rc->config->get('tb_max_label'); |
23 | 105 $parmLabs = array(); |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
106 $tb_flag_text = array(); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
107 for ($i = 0; $i <= $max_id; $i++) { |
23 | 108 $lab=$this->getText('label'.$i); |
109 $isParm=($lab[-1]=='1'); | |
110 $lab=substr($lab,0,strlen($lab)-1); | |
111 $tb_flag_text[$i] = $lab; | |
112 if ($isParm) { | |
113 $parmLabs[$i]=strtolower($lab); | |
114 } | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
115 } |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
116 $this->rc->config->set('tb_label_custom_labels', |
23 | 117 $tb_flag_text); |
118 $this->rc->config->set('tb_label_parm_labels', | |
119 $parmLabs); | |
0 | 120 } |
121 // pass label strings to JS | |
122 $this->rc->output->set_env('tb_label_custom_labels', $this->rc->config->get('tb_label_custom_labels')); | |
23 | 123 $this->rc->output->set_env('tb_label_parm_labels', $this->rc->config->get('tb_label_parm_labels')); |
0 | 124 } |
125 | |
126 // create a section for the tb-labels Settings | |
127 public function prefs_section($args) | |
128 { | |
129 $args['list']['thunderbird_labels'] = array( | |
130 'id' => 'thunderbird_labels', | |
131 'section' => rcube::Q($this->gettext('tb_label_options')) | |
132 ); | |
133 | |
134 return $args; | |
135 } | |
136 | |
137 // display thunderbird-labels prefs in Roundcube Settings | |
138 public function prefs_list($args) | |
139 { | |
140 if ($args['section'] != 'thunderbird_labels') | |
141 return $args; | |
142 | |
143 $this->load_config(); | |
144 $dont_override = (array) $this->rc->config->get('dont_override', array()); | |
145 | |
146 $args['blocks']['tb_label'] = array(); | |
147 $args['blocks']['tb_label']['name'] = $this->gettext('tb_label_options'); | |
148 | |
149 $key = 'tb_label_enable'; | |
150 if (!in_array($key, $dont_override)) | |
151 { | |
152 $input = new html_checkbox(array( | |
153 'name' => $key, | |
154 'id' => $key, | |
155 'value' => 1 | |
156 )); | |
157 $content = $input->show($this->rc->config->get($key)); | |
158 $args['blocks']['tb_label']['options'][$key] = array( | |
159 'title' => $this->gettext('tb_label_enable_option'), | |
160 'content' => $content | |
161 ); | |
162 } | |
163 | |
164 $key = 'tb_label_enable_shortcuts'; | |
165 if (!in_array($key, $dont_override)) | |
166 { | |
167 $input = new html_checkbox(array( | |
168 'name' => $key, | |
169 'id' => $key, | |
170 'value' => 1 | |
171 )); | |
172 $content = $input->show($this->rc->config->get($key)); | |
173 $args['blocks']['tb_label']['options'][$key] = array( | |
174 'title' => $this->gettext('tb_label_enable_shortcuts_option'), | |
175 'content' => $content | |
176 ); | |
177 } | |
178 | |
179 $key = 'tb_label_style'; | |
180 if (!in_array($key, $dont_override)) | |
181 { | |
182 $select = new html_select(array( | |
183 'name' => $key, | |
184 'id' => $key | |
185 )); | |
186 $select->add(array($this->gettext('thunderbird'), $this->gettext('bullets')), array('thunderbird', 'bullets')); | |
187 $content = $select->show($this->rc->config->get($key)); | |
188 | |
189 $args['blocks']['tb_label']['options'][$key] = array( | |
190 'title' => $this->gettext('tb_label_style_option'), | |
191 'content' => $content | |
192 ); | |
193 } | |
194 | |
195 $key = 'tb_label_custom_labels'; | |
196 if (!in_array($key, $dont_override) | |
197 && $this->rc->config->get('tb_label_modify_labels')) | |
198 { | |
199 $old = $this->rc->config->get($key); | |
23 | 200 $oldParms = $this->rc->config->get('tb_label_parm_labels'); |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
201 $max_id = $this->rc->config->get('tb_max_label'); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
202 for($i=1; $i<=$max_id; $i++) |
0 | 203 { |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
204 $oldVal = $old[$i]; |
23 | 205 $oparm=$oldParms[$i]?1:0; |
0 | 206 $input = new html_inputfield(array( |
207 'name' => $key.$i, | |
208 'id' => $key.$i, | |
209 'type' => 'text', | |
210 'autocomplete' => 'off', | |
23 | 211 'value' => $oldVal)); |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
212 $parmBox = new html_checkbox(array( |
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
213 'name' => $key.$i.'parm', |
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
214 'id' => $key.$i.'parm', |
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
215 'value' => 1)); |
0 | 216 $args['blocks']['tb_label']['options'][$key.$i] = array( |
217 'title' => $this->gettext('tb_label_label')." ".$i, | |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
218 'content' => $input->show()." ".$parmBox->show($oparm) |
0 | 219 ); |
220 } | |
221 } | |
222 | |
223 return $args; | |
224 } | |
225 | |
226 // save prefs after modified in UI | |
227 public function prefs_save($args) | |
228 { | |
9 | 229 #rcube::write_log('lab','saving: '.print_r($args,true)); |
2 | 230 if ($args['section'] != 'thunderbird_labels') |
0 | 231 return $args; |
232 | |
233 | |
234 $this->load_config(); | |
235 $dont_override = (array) $this->rc->config->get('dont_override', array()); | |
236 | |
237 if (!in_array('tb_label_enable', $dont_override)) | |
238 $args['prefs']['tb_label_enable'] = rcube_utils::get_input_value('tb_label_enable', rcube_utils::INPUT_POST) ? true : false; | |
239 | |
240 if (!in_array('tb_label_enable_shortcuts', $dont_override)) | |
241 $args['prefs']['tb_label_enable_shortcuts'] = rcube_utils::get_input_value('tb_label_enable_shortcuts', rcube_utils::INPUT_POST) ? true : false; | |
242 | |
243 if (!in_array('tb_label_style', $dont_override)) | |
244 $args['prefs']['tb_label_style'] = rcube_utils::get_input_value('tb_label_style', rcube_utils::INPUT_POST); | |
245 | |
246 if (!in_array('tb_label_custom_labels', $dont_override) | |
247 && $this->rc->config->get('tb_label_modify_labels')) | |
248 { | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
249 $max_id = $this->rc->config->get('tb_max_label'); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
250 $tb_lab_prefs = array(); |
23 | 251 $tb_parm_prefs = array(); |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
252 $tb_lab_prefs[0] = $this->gettext('label0'); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
253 for ($i = 1; $i <= $max_id; $i++) { |
23 | 254 $tb_lab_prefs[$i] = rcube_utils::get_input_value('tb_label_custom_labels'.$i, rcube_utils::INPUT_POST); |
255 if (rcube_utils::get_input_value('tb_label_custom_labels'.$i.'parm', rcube_utils::INPUT_POST)) { | |
256 $tb_parm_prefs[$i] = strtolower($tb_lab_prefs[$i]); | |
257 } | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
258 } |
2 | 259 $args['prefs']['tb_label_custom_labels'] = $tb_lab_prefs; |
23 | 260 $args['prefs']['tb_label_parm_labels'] = $tb_parm_prefs; |
0 | 261 } |
262 | |
263 return $args; | |
264 } | |
265 | |
266 public function show_tb_label_contextmenu($args) | |
267 { | |
268 #$this->api->output->add_label('copymessage.copyingmessage'); | |
9 | 269 #rcube::write_log('lab',"stblc"); |
0 | 270 $li = html::tag('li', |
271 array('class' => 'submenu'), | |
272 '<span>'.rcube::Q($this->gettext('tb_label_contextmenu_title')).'</span>' . $this->_gen_label_submenu($args, 'tb_label_ctxm_submenu')); | |
273 $out .= html::tag('ul', array('id' => 'tb_label_ctxm_mainmenu'), $li); | |
274 $this->api->output->add_footer(html::div(array('style' => 'display: none;'), $out)); | |
275 } | |
276 | |
277 private function _gen_label_submenu($args, $id) | |
278 { | |
279 $out = ''; | |
280 $custom_labels = $this->rc->config->get('tb_label_custom_labels'); | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
281 $max_id = $this->rc->config->get('tb_max_label'); |
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
282 for ($i = 0; $i <= $max_id; $i++) |
0 | 283 { |
284 $separator = ($i == 0)? ' separator_below' :''; | |
285 $out .= '<li class="label'.$i.$separator. | |
286 ' ctxm_tb_label"><a href="#ctxm_tb_label" class="active" onclick="rcmail_ctxm_label_set('.$i.')"><span>'. | |
287 $i.' '.$custom_labels[$i]. | |
288 '</span></a></li>'; | |
289 } | |
290 $out = html::tag('ul', array('class' => 'popupmenu toolbarmenu folders', 'id' => $id), $out); | |
291 return $out; | |
292 } | |
293 | |
294 public function read_single_flags($args) | |
295 { | |
9 | 296 #rcube::write_log($this->name, print_r(($args['object']), true)); |
0 | 297 if (!isset($args['object'])) { |
298 return; | |
299 } | |
300 | |
301 if (is_array($args['object']->headers->flags)) | |
302 { | |
303 $this->message_tb_labels = array(); | |
304 foreach ($args['object']->headers->flags as $flagname => $flagvalue) | |
305 { | |
306 $flag = is_numeric("$flagvalue")? $flagname:$flagvalue;// for compatibility with < 0.5.4 | |
307 $flag = strtolower($flag); | |
308 if (preg_match('/^\$?label/', $flag)) | |
309 { | |
310 $flag_no = preg_replace('/^\$?label/', '', $flag); | |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
311 rcube::write_log($this->name, "Single message Flag: ".$flag." Flag_no:".$flag_no); |
0 | 312 $this->message_tb_labels[] = (int)$flag_no; |
313 } | |
314 } | |
315 } | |
316 # -- no return value for this hook | |
317 } | |
318 | |
319 /** | |
320 * Writes labelnumbers for single message display | |
321 * Coloring of Message header table happens via Javascript | |
322 */ | |
323 public function color_headers($p) | |
324 { | |
9 | 325 #rcube::write_log($this->name, print_r($p, true)); |
0 | 326 # -- always write array, even when empty |
327 $p['content'] .= '<script type="text/javascript"> | |
328 var tb_labels_for_message = ['.join(',', $this->message_tb_labels).']; | |
329 </script>'; | |
330 return $p; | |
331 } | |
332 | |
333 public function read_flags($args) | |
334 { | |
23 | 335 rcube::write_log($this->name, "read: ".$_SESSION['sort_col']); |
0 | 336 // add color information for all messages |
337 // dont loop over all messages if we dont have any highlights or no msgs | |
338 if (!isset($args['messages']) or !is_array($args['messages'])) { | |
339 return $args; | |
340 } | |
341 // loop over all messages and add $LabelX info to the extra_flags | |
342 foreach($args['messages'] as $message) | |
343 { | |
9 | 344 #rcube::write_log($this->name, print_r($message->flags, true)); |
0 | 345 $message->list_flags['extra_flags']['tb_labels'] = array(); # always set extra_flags, needed for javascript later! |
20 | 346 $message->list_flags['extra_flags']['tb_parms'] = array(); |
23 | 347 $keyPos = array_search($_SESSION['sort_col'],$this->rc->config->get('tb_label_parm_labels')); |
348 rcube::write_log($this->name,"sort? $keyPos ".$_SESSION['sort_order']." ".print_r($this->rc->config->get('tb_label_parm_labels'),true)); | |
21 | 349 if (is_array($message->flags)) |
0 | 350 foreach ($message->flags as $flagname => $flagvalue) |
351 { | |
352 $flag = is_numeric("$flagvalue")? $flagname:$flagvalue;// for compatibility with < 0.5.4 | |
353 $flag = strtolower($flag); | |
354 if (preg_match('/^\$?label/', $flag)) | |
355 { | |
356 $flag_no = preg_replace('/^\$?label/', '', $flag); | |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
357 rcube::write_log($this->name, "Flag:".$flag." Flag_no:".$flag_no); |
20 | 358 if ($ppos = strpos($flag_no,'_') > -1) { |
359 // We have a flag parameter value... | |
23 | 360 $pn=(int)substr($flag_no,0,$ppos); |
361 $pv=substr($flag_no,$ppos+1); | |
20 | 362 $message->list_flags['extra_flags']['tb_lparms'][]=array( |
23 | 363 'number' => $pn, |
364 'parm' => $pv); | |
365 if ($keyPos) { | |
366 $message->sortKey=array_map('intval',preg_split('/[/-]/',$pv)); | |
367 } | |
20 | 368 } |
369 else { | |
370 $message->list_flags['extra_flags']['tb_labels'][] = (int)$flag_no; | |
371 } | |
0 | 372 } |
373 } | |
374 } | |
23 | 375 if ($keyPos) { |
376 $rev = $_SESSION['sort_order']=='DESC'; | |
377 usort($args['messages'], | |
378 function($a, $b) use ($rev) { | |
379 if ($ak=$a->sortKey) { | |
380 if ($bk=$b->sortKey) { | |
381 // each key is sd sm ed em | |
382 if ($ak[1]<$bk[1]) return $rev?1:-1; | |
383 if ($ak[1]>$bk[1]) return $rev?-1:1; | |
384 // start month is the same | |
385 if ($ak[0]<$bk[0]) return $rev?1:-1; | |
386 if ($ak[0]>$bk[0]) return $rev?-1:1; | |
387 // start date is the same | |
388 if ($ak[3]<$bk[3]) return $rev?1:-1; | |
389 if ($ak[3]>$bk[3]) return $rev?-1:1; | |
390 // end month is the same | |
391 if ($ak[2]<$bk[2]) return $rev?1:-1; | |
392 if ($ak[2]>$bk[2]) return $rev?-1:1; | |
393 // both dates are the same | |
394 return 0; | |
395 } | |
396 else { | |
397 return $rev?1:-1; | |
398 } | |
399 } | |
400 else if ($b->sortKey) { | |
401 return $rev?-1:1; | |
402 } | |
403 else { | |
404 return 0; | |
405 } | |
406 }); | |
407 } | |
0 | 408 return($args); |
409 } | |
410 | |
411 // set flags in IMAP server | |
412 function set_flags() | |
413 { | |
19
49706603be30
begin to add UI support for parameterised labels, e.g. Dates
Charlie Root
parents:
9
diff
changeset
|
414 rcube::write_log($this->name, "set: ".print_r($_GET, true)); |
0 | 415 |
416 $imap = $this->rc->imap; | |
417 $cbox = rcube_utils::get_input_value('_cur', rcube_utils::INPUT_GET); | |
418 $mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_GET); | |
419 $toggle_label = rcube_utils::get_input_value('_toggle_label', rcube_utils::INPUT_GET); | |
420 $flag_uids = rcube_utils::get_input_value('_flag_uids', rcube_utils::INPUT_GET); | |
421 $flag_uids = explode(',', $flag_uids); | |
422 $unflag_uids = rcube_utils::get_input_value('_unflag_uids', rcube_utils::INPUT_GET); | |
423 $unflag_uids = explode(',', $unflag_uids); | |
424 | |
425 $imap->conn->flags = array_merge($imap->conn->flags, $this->add_tb_flags); | |
426 | |
9 | 427 #rcube::write_log($this->name, print_r($flag_uids, true)); |
428 #rcube::write_log($this->name, print_r($unflag_uids, true)); | |
0 | 429 |
430 if (!is_array($unflag_uids) | |
431 || !is_array($flag_uids)) | |
432 return false; | |
433 | |
434 $imap->set_flag($flag_uids, $toggle_label, $mbox); | |
435 $imap->set_flag($unflag_uids, "UN$toggle_label", $mbox); | |
436 | |
437 $this->api->output->send(); | |
438 } | |
439 | |
440 function tb_label_popup() | |
441 { | |
442 $custom_labels = $this->rc->config->get('tb_label_custom_labels'); | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
443 $max_id = $this->rc->config->get('tb_max_label'); |
0 | 444 $out = '<div id="tb_label_popup" class="popupmenu"> |
445 <ul class="toolbarmenu">'; | |
1
5821049f1791
most of the way to allowing arbitrarily many labels
Charlie Root
parents:
0
diff
changeset
|
446 for ($i = 0; $i <= $max_id; $i++) |
0 | 447 { |
448 $separator = ($i == 0)? ' separator_below' :''; | |
449 $out .= '<li class="label'.$i.$separator.'"><a href="#" class="active">'.$i.' '.$custom_labels[$i].'</a></li>'; | |
450 } | |
451 $out .= '</ul> | |
452 </div>'; | |
453 $this->rc->output->add_gui_object('tb_label_popup_obj', 'tb_label_popup'); | |
454 $this->rc->output->add_footer($out); | |
455 } | |
456 } | |
457 |