removing defunct "template" argument in ajaxify.go

v1.18.x
Julian Lam 11 years ago
parent 65d5a6cb81
commit d86aefb518

@ -25,7 +25,7 @@ var ajaxify = {};
window.onpopstate = function (event) {
// "quiet": If set to true, will not call pushState
if (event !== null && event.state && event.state.url !== undefined) {
ajaxify.go(event.state.url, null, null, true);
ajaxify.go(event.state.url, null, true);
}
};
@ -33,7 +33,7 @@ var ajaxify = {};
ajaxify.currentPage = null;
ajaxify.go = function (url, callback, template, quiet) {
ajaxify.go = function (url, callback, quiet) {
// start: the following should be set like so: ajaxify.onchange(function(){}); where the code actually belongs
$(window).off('scroll');
app.enterRoom('global');
@ -125,7 +125,7 @@ var ajaxify = {};
app.refreshTitle(url);
}, url, template);
}, url);
return true;
}

@ -465,7 +465,7 @@ var socket,
jQuery('document').ready(function () {
$('#search-form').on('submit', function () {
var input = $(this).find('input');
ajaxify.go("search/" + input.val(), null, "search");
ajaxify.go("search/" + input.val());
input.val('');
return false;
});
@ -476,6 +476,8 @@ var socket,
$(window).focus(function(){
app.isFocused = true;
app.alternatingTitle('');
});
});

@ -126,8 +126,7 @@
templates.load_template = function (callback, url, template) {
var location = document.location || window.location,
api_url = (url === '' || url === '/') ? 'home' : url,
tpl_url = templates.get_custom_map(api_url.split('?')[0]),
trimmed = api_url;
tpl_url = templates.get_custom_map(api_url.split('?')[0]);
if (!tpl_url) {
tpl_url = templates.getTemplateNameFromUrl(api_url);

Loading…
Cancel
Save