moved registerLoader/refresh to top

v1.18.x
barisusakli 10 years ago
parent 776fb29dce
commit 47c1092842

@ -251,9 +251,10 @@ $(document).ready(function() {
};
$('document').ready(function () {
if (!window.history || !window.history.pushState) {
templates.registerLoader(ajaxify.loadTemplate);
templatesModule.refresh(app.load);
if (!window.history || !window.history.pushState) {
return; // no ajaxification for old browsers
}
@ -271,7 +272,7 @@ $(document).ready(function() {
app.previousUrl = window.location.href;
}
if ((!e.ctrlKey && !e.shiftKey && !e.metaKey) && e.which === 1) {
if (!e.ctrlKey && !e.shiftKey && !e.metaKey && e.which === 1) {
if (this.host === '' || this.host === window.location.host) {
// Internal link
var url = this.href.replace(rootUrl + '/', '');
@ -301,8 +302,6 @@ $(document).ready(function() {
}
});
templates.registerLoader(ajaxify.loadTemplate);
templatesModule.refresh(app.load);
});
});

Loading…
Cancel
Save