Use a the updateTitle() function to update page titles
This commit is contained in:
parent
d3cd6a884e
commit
1bf2a87726
@ -1,3 +1,14 @@
|
|||||||
|
var page_title = document.title;
|
||||||
|
|
||||||
|
function updateTitle(unread_on_load, page_title){
|
||||||
|
|
||||||
|
if (unread_on_load > 0){
|
||||||
|
document.title = '(' + unread_on_load + ') ' + page_title;
|
||||||
|
} else {
|
||||||
|
document.title = page_title;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Status Bar */
|
/* Status Bar */
|
||||||
function statusBarClear(delay_class, delay_html){
|
function statusBarClear(delay_class, delay_html){
|
||||||
var statusBar = $("#status-bar");
|
var statusBar = $("#status-bar");
|
||||||
|
@ -341,9 +341,9 @@ script.
|
|||||||
updateToggleProjHeaderMenuItem();
|
updateToggleProjHeaderMenuItem();
|
||||||
|
|
||||||
var nodeTitle = document.getElementById('node-title');
|
var nodeTitle = document.getElementById('node-title');
|
||||||
var nodeTitleText = $(nodeTitle).text() + " - {{ project.name }} - Blender Cloud";
|
page_title = $(nodeTitle).text() + " - {{ project.name }} - Blender Cloud";
|
||||||
|
|
||||||
document.title = nodeTitleText;
|
updateTitle(unread_on_load, page_title);
|
||||||
|
|
||||||
// TODO: Maybe remove this, now it's also in loadNodeContent(), but double-check
|
// TODO: Maybe remove this, now it's also in loadNodeContent(), but double-check
|
||||||
// it's done like that in all users of updateUi().
|
// it's done like that in all users of updateUi().
|
||||||
|
Loading…
x
Reference in New Issue
Block a user