added ajaxify.start and ajaxify.end client-side hooks

This commit is contained in:
Julian Lam
2014-01-29 14:29:45 -05:00
parent 024cfc17c5
commit 3f876fec80

View File

@@ -35,7 +35,8 @@ var ajaxify = {};
// "quiet": If set to true, will not call pushState // "quiet": If set to true, will not call pushState
app.enterRoom('global'); app.enterRoom('global');
$('body').trigger('action:ajaxifying', {url: url}); $('body').trigger('action:ajaxify.start', { url: url });
$('body').trigger('action:ajaxifying', {url: url}); // Deprecated as of v0.4.0
if ($('#content').hasClass('ajaxifying')) { if ($('#content').hasClass('ajaxifying')) {
templates.cancelRequest(); templates.cancelRequest();
@@ -118,7 +119,7 @@ var ajaxify = {};
} }
app.refreshTitle(url); app.refreshTitle(url);
$('body').trigger('action:ajaxify.end', { url: url });
}, url); }, url);
return true; return true;