summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-19 06:29:28 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-09-19 06:29:28 +0000
commitc9921fca64e04f8fd8de7eeda7fbb6b587d4c34e (patch)
tree918a271c03964b7ec4e51856d3419b28c60045ad /roundcubemail/program/js
parent40305a44d72a433a9d5cec42096295c5f6e0d762 (diff)
Allow vars and PHP code in templates; improved page title; fixed #1484395
git-svn-id: https://svn.roundcube.net/trunk@801 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
-rw-r--r--roundcubemail/program/js/app.js26
1 files changed, 17 insertions, 9 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js
index 506683502..9693ff53d 100644
--- a/roundcubemail/program/js/app.js
+++ b/roundcubemail/program/js/app.js
@@ -2943,6 +2943,14 @@ function rcube_webmail()
};
+ // write to the document/window title
+ this.set_pagetitle = function(title)
+ {
+ if (title && document.title)
+ document.title = title;
+ }
+
+
// display a system message
this.display_message = function(msg, type, hold)
{
@@ -3129,9 +3137,6 @@ function rcube_webmail()
if (!this.gui_objects.mailboxlist)
return false;
- if (mbox==this.env.mailbox)
- set_title = true;
-
var reg, text_obj;
var item = this.get_folder_li(mbox);
mbox = String(mbox).toLowerCase().replace(this.identifier_expr, '');
@@ -3158,13 +3163,16 @@ function rcube_webmail()
if (set_title && document.title)
{
var doc_title = String(document.title);
+ var new_title = "";
if (count && doc_title.match(reg))
- document.title = doc_title.replace(reg, '('+count+') ');
+ new_title = doc_title.replace(reg, '('+count+') ');
else if (count)
- document.title = '('+count+') '+doc_title;
+ new_title = '('+count+') '+doc_title;
else
- document.title = doc_title.replace(reg, '');
+ new_title = doc_title.replace(reg, '');
+
+ this.set_pagetitle(new_title);
}
};
@@ -3318,7 +3326,8 @@ function rcube_webmail()
ctype = ctype_array[0];
}
- this.set_busy(false);
+ if (request_obj.__lock)
+ this.set_busy(false);
console.log(request_obj.get_text());
@@ -3381,8 +3390,7 @@ function rcube_webmail()
}
this.set_busy(true, 'checkingmail');
- var d = new Date();
- this.http_request('check-recent', '_t='+d.getTime());
+ this.http_request('check-recent', '_t='+(new Date().getTime()), true);
};