new build_title function to be called via socket

also added categories.getCategoryField and refactored all calls to
getTopicField to be error-first
This commit is contained in:
Julian Lam
2013-08-11 16:12:20 -04:00
parent 04d94a7462
commit e8f1d645fe
9 changed files with 76 additions and 35 deletions

View File

@@ -49,7 +49,7 @@ var ajaxify = {};
} else if (templates[url]) {
tpl_url = url;
}
if (templates.is_available(tpl_url) && !templates.force_refresh(tpl_url)) {
if (quiet !== true) {
window.history.pushState({
@@ -78,6 +78,10 @@ var ajaxify = {};
}, url, template);
socket.emit('api:meta.buildTitle', url, function(title) {
document.title = title;
});
return true;
}