switched to 'ping active' system

This commit is contained in:
Julian Lam
2014-03-01 16:53:41 -05:00
parent 7ff9fa1a44
commit 7ef84e0daa
2 changed files with 27 additions and 10 deletions

View File

@@ -6,8 +6,8 @@ define(['taskbar'], function(taskbar) {
function initialise() {
socket.on('event:composer.ping', function(post_uuid) {
if (composer.active !== post_uuid) {
socket.emit('modules.composer.pingInactive', post_uuid);
if (composer.active === post_uuid) {
socket.emit('modules.composer.pingActive', post_uuid);
}
});
};
@@ -832,6 +832,8 @@ define(['taskbar'], function(taskbar) {
taskbar.discard('composer', post_uuid);
$('body').css({'margin-bottom': 0});
$('.action-bar button').removeAttr('disabled');
socket.emit('modules.composer.unregister', post_uuid);
}
};