From: Michael M Slusarz Date: Mon, 28 Jun 2010 23:01:14 +0000 (-0600) Subject: Fix thread/subject toggling, since new prototypejs code blows away element storage... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0217d059e2e1a8f9bab3193d863996ef5c80a7c7;p=horde.git Fix thread/subject toggling, since new prototypejs code blows away element storage when calling update() --- diff --git a/imp/js/dimpbase.js b/imp/js/dimpbase.js index 45e47803b..cf27aba61 100644 --- a/imp/js/dimpbase.js +++ b/imp/js/dimpbase.js @@ -1058,16 +1058,17 @@ var DimpBase = { tmp = m.down('.msgSubject'); if (this.isSearch() || this.viewport.getMetaData('nothread')) { - hdr = { l: 'subject', t: tmp }; + hdr = { l: ptr.get('subject') }; } else if (sortby == ptr.get('thread').v) { - hdr = { l: 'thread', s: 'subject', t: tmp }; + hdr = { l: ptr.get('thread'), s: ptr.get('subject') }; } else { - hdr = { l: 'subject', s: 'thread', t: tmp }; + hdr = { l: ptr.get('subject'), s: ptr.get('thread') }; } - hdr.t.update().update(ptr.get(hdr.l).e.removeClassName('smallSort').update(ptr.get(hdr.l).t)); + tmp.update(hdr.l.e.removeClassName('smallSort').update(hdr.l.t)); + hdr.l.e.store('sortby', hdr.l.v); if (hdr.s) { - hdr.t.insert(ptr.get(hdr.s).e.addClassName('smallSort').update('[' + ptr.get(hdr.s).t + ']')); + tmp.insert(hdr.s.e.store('sortby', hdr.s.v).addClassName('smallSort').update('[' + hdr.s.t + ']')); } ptr.find(function(s) {