Use the nifty new DocumentTitleAPI to update notification count
and page titles when browsing assets. This removes the need for updateTitle()
This commit is contained in:
@@ -87,8 +87,9 @@ script(type="text/javascript").
|
||||
$(function () {
|
||||
$('#tags').select2();
|
||||
|
||||
page_title = 'Edit: {{ node.name }} — {{ project.name }}';
|
||||
updateTitle(unread_on_load, page_title);
|
||||
// Set the page title on the document
|
||||
var page_title = 'Edit: {{ node.name }} - {{ project.name }} — Blender Cloud';
|
||||
DocumentTitleAPI.set_page_title(page_title);
|
||||
|
||||
/* Build the markdown preview when typing in textarea */
|
||||
var convert = new Markdown.getSanitizingConverter();
|
||||
|
@@ -340,10 +340,9 @@ script.
|
||||
|
||||
updateToggleProjHeaderMenuItem();
|
||||
|
||||
var nodeTitle = document.getElementById('node-title');
|
||||
page_title = $(nodeTitle).text() + " - {{ project.name }} - Blender Cloud";
|
||||
|
||||
updateTitle(unread_on_load, page_title);
|
||||
// Set the page title on the document
|
||||
var page_title = $('#node-title').text() + " - {{ project.name }} — Blender Cloud";
|
||||
DocumentTitleAPI.set_page_title(page_title);
|
||||
|
||||
// TODO: Maybe remove this, now it's also in loadNodeContent(), but double-check
|
||||
// it's done like that in all users of updateUi().
|
||||
|
Reference in New Issue
Block a user