From 84a7acd0f42e3c30c896d65699bbd4b1a3cedd41 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Sat, 28 Mar 2009 13:40:21 +0000 Subject: Implemented using a single image to display all icons via CSS positioning of the image in a div. --- roundcubemail/program/js/app.js | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'roundcubemail/program/js/app.js') diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index 7f1e7241b..4386be777 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -384,7 +384,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; @@ -402,7 +402,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; @@ -1248,7 +1248,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]; @@ -1622,13 +1622,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 @@ -3542,7 +3537,7 @@ function rcube_webmail() var col = document.createElement('TD'); col.className = 'icon'; - col.innerHTML = icon ? '' : ''; + col.innerHTML = icon ? icon : ''; row.appendChild(col); // add each submitted col @@ -3554,13 +3549,10 @@ function rcube_webmail() if (c=='flag') { - if (flags.flagged && this.env.flaggedicon) - col.innerHTML = ''; - else if(!flags.flagged && this.env.unflaggedicon) - col.innerHTML = ''; + col.innerHTML = this.env.flagicon; } else if (c=='attachment') - col.innerHTML = attachment && this.env.attachmenticon ? '' : ' '; + col.innerHTML = attachment ? this.env.attachmenticon : ' '; else col.innerHTML = cols[c]; -- cgit v1.2.3