Mercurial > hg > rc1
changeset 22:61316094e61d
a bit better wrt Dates: displaying, but not popup for setting
author | Charlie Root |
---|---|
date | Tue, 16 Jan 2018 17:48:15 -0500 |
parents | 678dcc5152a8 |
children | 5a851d965bc1 |
files | plugins/thunderbird_labels/tb_label.js |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/thunderbird_labels/tb_label.js Tue Jan 16 13:10:10 2018 -0500 +++ b/plugins/thunderbird_labels/tb_label.js Tue Jan 16 17:48:15 2018 -0500 @@ -60,11 +60,11 @@ } if (message.flags && message.flags.tb_lparms) { if (message.flags.tb_lparms.length) { - for (parm in message.flags.tb_lparms) { + for (i=0,p=message.flags.tb_lparms,l=p.length;i<l;i++) { col="dates"; // should look up parm.number somewhere FIXME var tdobj = rowobj.find("td."+col); - tdobj.append("<span class='labelparm"+parm.number+"'>"+ - parm.parm+"</span>"); + tdobj.append("<span class='labelparm"+p[i].number+"'>"+ + p[i].parm+"</span>"); } } } @@ -221,6 +221,8 @@ cur_a.click(function() { var toggle_label = $(this).parent().attr('class'); var toggle_label_no = parseInt(toggle_label.replace('label', '')); + var label_name = rcmail.env.tb_label_custom_labels[toggle_label_no]; + var hasParm = label_name[label_name.length-1]=='1'; var selection = rcm_tb_label_get_selection(); if (!selection.length) @@ -263,6 +265,9 @@ tb_labels_for_message) >= 0) first_toggle_mode = 'off'; } + if (hasParm && first_toggle_mode == 'on') { + toggle_label+='_21/7-11/8'; + } var flag_uids = []; var unflag_uids = []; jQuery.each(selection, function (idx, uid) {