Mercurial > hg > rc1
comparison plugins/thunderbird_labels/tb_label.js @ 1:5821049f1791
most of the way to allowing arbitrarily many labels
author | Charlie Root |
---|---|
date | Thu, 04 Jan 2018 16:23:36 -0500 |
parents | 1e000243b222 |
children | 7a7f68b4358e |
comparison
equal
deleted
inserted
replaced
0:1e000243b222 | 1:5821049f1791 |
---|---|
179 return selection; | 179 return selection; |
180 } | 180 } |
181 | 181 |
182 function rcm_tb_label_create_popupmenu() | 182 function rcm_tb_label_create_popupmenu() |
183 { | 183 { |
184 for (i = 0; i < 6; i++) | 184 for (i = 0; i < 7; i++) |
185 { | 185 { |
186 var cur_a = $('li.label' + i +' a'); | 186 var cur_a = $('li.label' + i +' a'); |
187 | 187 |
188 // add/remove active class | 188 // add/remove active class |
189 var selection = rcm_tb_label_get_selection(); | 189 var selection = rcm_tb_label_get_selection(); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 function rcm_tb_label_init_onclick() | 198 function rcm_tb_label_init_onclick() |
199 { | 199 { |
200 for (i = 0; i < 6; i++) | 200 for (i = 0; i < 7; i++) |
201 { | 201 { |
202 // find the "HTML a tags" of tb-label submenus | 202 // find the "HTML a tags" of tb-label submenus |
203 var cur_a = $('#tb_label_popup li.label' + i +' a'); | 203 var cur_a = $('#tb_label_popup li.label' + i +' a'); |
204 | 204 |
205 // TODO check if click event is defined instead of unbinding? | 205 // TODO check if click event is defined instead of unbinding? |
217 var unset_all = false; | 217 var unset_all = false; |
218 // special case flag 0 means remove all flags | 218 // special case flag 0 means remove all flags |
219 if (toggle_label_no == 0) | 219 if (toggle_label_no == 0) |
220 { | 220 { |
221 from = 1; | 221 from = 1; |
222 to = 6; | 222 to = 7; |
223 unset_all = true; | 223 unset_all = true; |
224 } | 224 } |
225 for (i = from; i < to; i++) | 225 for (i = from; i < to; i++) |
226 { | 226 { |
227 toggle_label = 'label' + i; | 227 toggle_label = 'label' + i; |