From 01c86f2e7c9eb4f2dff6d670ea8f36c431b9b476 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sat, 04 Mar 2006 08:45:30 -0500 Subject: [PATCH] Minor bugfixes --- program/js/app.js | 27 +++++++++++++++++++-------- 1 files changed, 19 insertions(+), 8 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index e0e31ed..35afe86 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -231,7 +231,7 @@ this.enable_command('logout', true); // disable browser's contextmenus - //document.oncontextmenu = function(){ return false; } + document.oncontextmenu = function(){ return false; } // load body click event document.onmousedown = function(){ return rcube_webmail_client.reset_click(); }; @@ -265,7 +265,6 @@ this.in_message_list = true; e.cancelBubble = true; - if (e.stopPropagation) e.stopPropagation(); }; // reset last clicked if user clicks on anything other than the message table @@ -293,7 +292,7 @@ } if (!new_row) return false; scroll_to = new_row.offsetTop; - } else {return false}; + } else {return true;} if (mod_key != CONTROL_KEY) this.select_row(new_row.uid,mod_key); @@ -449,7 +448,7 @@ this.list_rows = this.contact_rows; if (this.env.cid) - this.select(this.env.cid); + this.highlight_row(this.env.cid); }; @@ -513,7 +512,7 @@ this.list_rows = this.identity_rows; if (this.env.iid) - this.select(this.env.iid); + this.highlight_row(this.env.iid); }; @@ -1300,7 +1299,7 @@ for (var n in this.list_rows) if (!filter || this.list_rows[n][filter]==true) - this.select(n, true); + this.highlight_row(n, true); }; @@ -2645,6 +2644,13 @@ this.set_page_buttons(); }; + // replace content of quota display + this.set_quota = function(text) + { + if (this.gui_objects.quotadisplay) + this.gui_objects.quotadisplay.innerHTML = text; + }; + // update the mailboxlist this.set_unread_count = function(mbox, count, set_title) @@ -2674,10 +2680,10 @@ } // set unread count to window title - if (set_title && document.title) + reg = /^\([0-9]+\)\s+/i; + if (set_title && count && document.title) { var doc_title = String(document.title); - reg = /^\([0-9]+\)\s+/i; if (count && doc_title.match(reg)) document.title = doc_title.replace(reg, '('+count+') '); @@ -2686,6 +2692,11 @@ else document.title = doc_title.replace(reg, ''); } + // remove unread count from window title + else if (document.title) + { + document.title = document.title.replace(reg, ''); + } }; -- Gitblit v1.9.1