Mercurial > hg > rc1
comparison plugins/thunderbird_labels/tb_label.js @ 24:4869fae20b88
do better at flag deletion, unthreaded dates sort working, preparing for threaded
author | Charlie Root |
---|---|
date | Wed, 17 Jan 2018 17:40:51 -0500 |
parents | 61316094e61d |
children | b2b6c0af2383 |
comparison
equal
deleted
inserted
replaced
23:5a851d965bc1 | 24:4869fae20b88 |
---|---|
158 { | 158 { |
159 // remove colors | 159 // remove colors |
160 var rowobj = $(row.obj); | 160 var rowobj = $(row.obj); |
161 if (rcmail.env.tb_label_style=='bullets') { | 161 if (rcmail.env.tb_label_style=='bullets') { |
162 rowobj.find("td.subject span.tb_label_dots span.label"+toggle_label_no).remove(); | 162 rowobj.find("td.subject span.tb_label_dots span.label"+toggle_label_no).remove(); |
163 rowobj.find("td.dates span").remove(); | |
163 } else { | 164 } else { |
164 rowobj.removeClass('label'+toggle_label_no); | 165 rowobj.removeClass('label'+toggle_label_no); |
165 } | 166 } |
166 | 167 |
167 // remove from flag list | 168 // remove from flag list |
220 cur_a.unbind('click'); | 221 cur_a.unbind('click'); |
221 cur_a.click(function() { | 222 cur_a.click(function() { |
222 var toggle_label = $(this).parent().attr('class'); | 223 var toggle_label = $(this).parent().attr('class'); |
223 var toggle_label_no = parseInt(toggle_label.replace('label', '')); | 224 var toggle_label_no = parseInt(toggle_label.replace('label', '')); |
224 var label_name = rcmail.env.tb_label_custom_labels[toggle_label_no]; | 225 var label_name = rcmail.env.tb_label_custom_labels[toggle_label_no]; |
225 var hasParm = label_name[label_name.length-1]=='1'; | 226 var hasParm = rcmail.env.tb_label_parm_labels[toggle_label_no]; |
226 var selection = rcm_tb_label_get_selection(); | 227 var selection = rcm_tb_label_get_selection(); |
227 | 228 |
228 if (!selection.length) | 229 if (!selection.length) |
229 return; | 230 return; |
230 | 231 |
264 if (jQuery.inArray(toggle_label_no, | 265 if (jQuery.inArray(toggle_label_no, |
265 tb_labels_for_message) >= 0) | 266 tb_labels_for_message) >= 0) |
266 first_toggle_mode = 'off'; | 267 first_toggle_mode = 'off'; |
267 } | 268 } |
268 if (hasParm && first_toggle_mode == 'on') { | 269 if (hasParm && first_toggle_mode == 'on') { |
269 toggle_label+='_21/7-11/8'; | 270 var dates=prompt("Booking dates in form d/m-d/m : ","25/7-1/8"); |
271 if (dates!=null){ | |
272 toggle_label+='_'+dates; | |
273 } | |
274 else { | |
275 return; | |
276 } | |
270 } | 277 } |
271 var flag_uids = []; | 278 var flag_uids = []; |
272 var unflag_uids = []; | 279 var unflag_uids = []; |
273 jQuery.each(selection, function (idx, uid) { | 280 jQuery.each(selection, function (idx, uid) { |
274 // message list not available (example: in detailview) | 281 // message list not available (example: in detailview) |