changed hook triggers to window from body

v1.18.x
psychobunny 11 years ago
parent 3d61a1b15b
commit 3955ca560f

@ -37,8 +37,8 @@ var ajaxify = {};
$(window).off('scroll');
$('body').trigger('action:ajaxify.start', { url: url });
$('body').trigger('action:ajaxifying', {url: url}); // Deprecated as of v0.4.0
$(window).trigger('action:ajaxify.start', { url: url });
$(window).trigger('action:ajaxifying', {url: url}); // Deprecated as of v0.4.0
if ($('#content').hasClass('ajaxifying')) {
templates.cancelRequest();
@ -121,7 +121,7 @@ var ajaxify = {};
}
app.refreshTitle(url);
$('body').trigger('action:ajaxify.end', { url: url });
$(window).trigger('action:ajaxify.end', { url: url });
}, url);
return true;

@ -9,7 +9,6 @@ var socket,
(function () {
var showWelcomeMessage = false;
var body = $('body');
app.loadConfig = function() {
$.ajax({
@ -42,7 +41,7 @@ var socket,
fields: ['username', 'picture', 'userslug']
}, app.updateHeader);
body.trigger('action:connected');
$(window).trigger('action:connected');
});
socket.on('event:alert', function (data) {
@ -82,7 +81,7 @@ var socket,
app.enterRoom(room, true);
socket.emit('meta.reconnected');
body.trigger('action:reconnected');
$(window).trigger('action:reconnected');
setTimeout(function() {
reconnectEl.removeClass('active').addClass("hide");
@ -95,7 +94,7 @@ var socket,
});
socket.on('event:disconnect', function() {
body.trigger('action:disconnected');
$(window).trigger('action:disconnected');
socket.socket.connect();
});

@ -8,7 +8,7 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
}
}
$('body').on('action:ajaxifying', function(ev, data) {
$(window).on('action:ajaxifying', function(ev, data) {
if(data.url.indexOf('topic') === 0) {
$('.pagination-block a').off('click').on('click', function() {

Loading…
Cancel
Save