mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
moved widget rendering up a bit
This commit is contained in:
@@ -493,18 +493,18 @@ var socket,
|
|||||||
|
|
||||||
app.load = function() {
|
app.load = function() {
|
||||||
$('document').ready(function () {
|
$('document').ready(function () {
|
||||||
var url = window.location.pathname.slice(1),
|
var url = window.location.pathname.slice(1).replace(/\/$/, ""),
|
||||||
search = window.location.search,
|
search = window.location.search,
|
||||||
hash = window.location.hash,
|
hash = window.location.hash,
|
||||||
tpl_url = ajaxify.getTemplateMapping(url),
|
tpl_url = ajaxify.getTemplateMapping(url),
|
||||||
$window = $(window);
|
$window = $(window);
|
||||||
|
|
||||||
url = url.replace(/\/$/, "");
|
|
||||||
|
|
||||||
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
if (url.indexOf(RELATIVE_PATH.slice(1)) !== -1) {
|
||||||
url = url.slice(RELATIVE_PATH.length);
|
url = url.slice(RELATIVE_PATH.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ajaxify.widgets.render(tpl_url, url);
|
||||||
|
|
||||||
$window.trigger('action:ajaxify.start', {
|
$window.trigger('action:ajaxify.start', {
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
@@ -531,8 +531,6 @@ var socket,
|
|||||||
ajaxify.currentPage = url;
|
ajaxify.currentPage = url;
|
||||||
app.processPage();
|
app.processPage();
|
||||||
|
|
||||||
ajaxify.widgets.render(tpl_url, url);
|
|
||||||
|
|
||||||
if (window.history && window.history.replaceState) {
|
if (window.history && window.history.replaceState) {
|
||||||
window.history.replaceState({
|
window.history.replaceState({
|
||||||
url: url + search + hash
|
url: url + search + hash
|
||||||
|
|||||||
Reference in New Issue
Block a user