From 741b51da66fc64059d79eb8d35f94f8b2e6d9920 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Tue, 31 Mar 2009 18:40:55 -0400 Subject: Cherry-picked rev 84a7acd which implemented CSS sprites into branch npk. --- roundcubemail/program/js/app.js | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'roundcubemail/program/js') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 4daf0239b..a64c98ff0 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -388,7 +388,7 @@ function rcube_webmail() } // set eventhandler to message icon - if ((row.icon = row.obj.cells[0].childNodes[0]) && row.icon.nodeName=='IMG') + if ((row.icon = row.obj.cells[0].childNodes[1]) && row.icon.nodeName=='DIV') { var p = this; row.icon.id = 'msgicn_'+row.uid; @@ -406,7 +406,7 @@ function rcube_webmail() // set eventhandler to flag icon, if icon found if (this.env.flagged_col && (row.flagged_icon = row.obj.cells[this.env.flagged_col].childNodes[0]) - && row.flagged_icon.nodeName=='IMG') + && row.flagged_icon.nodeName=='DIV') { var p = this; row.flagged_icon.id = 'flaggedicn_'+row.uid; @@ -1305,7 +1305,7 @@ function rcube_webmail() { var div; if ((li = this.get_folder_li(id)) && - (div = li.getElementsByTagName("div")[0]) && + (div = li.getElementsByTagName("div")[1]) && (div.className.match(/collapsed/) || div.className.match(/expanded/))) { var ul = li.getElementsByTagName("ul")[0]; @@ -1679,13 +1679,8 @@ function rcube_webmail() icn_src = ''; - if (rows[uid].flagged && this.env.flaggedicon) - icn_src = this.env.flaggedicon; - else if (!rows[uid].flagged && this.env.unflaggedicon) - icn_src = this.env.unflaggedicon; - - if (rows[uid].flagged_icon && icn_src) - rows[uid].flagged_icon.src = icn_src; + if (rows[uid].flagged && this.env.flagicon) + icn_src = this.env.flagicon; } // set message status @@ -3667,7 +3662,7 @@ function rcube_webmail() } } - tree += icon ? '' : ''; + tree += icon ? icon : ''; // add each submitted col for (var n = 0; n < this.coltypes.length; n++) @@ -3679,13 +3674,13 @@ function rcube_webmail() var html; if (c=='flag') { - if (flags.flagged && this.env.flaggedicon) - html = ''; - else if(!flags.flagged && this.env.unflaggedicon) - html = ''; + if (flags.flagged) + html = this.env.flaggedicon; + else if(!flags.flagged) + html = this.env.unflaggedicon; } else if (c=='attachment') - html = attachment && this.env.attachmenticon ? '' : ' '; + html = attachment ? this.env.attachmenticon : ' '; else html = cols[c]; if (n == 0) -- cgit v1.2.3