websocket update fixes
This commit is contained in:
@@ -168,6 +168,9 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em
|
||||
}, function (view) {
|
||||
view.render();
|
||||
view.notify(false);
|
||||
this.listenTo(view, 'before:save', function () {
|
||||
this.getView('record').blockUpdateWebSocket(true);
|
||||
}, this);
|
||||
this.listenToOnce(view, 'after:save', function () {
|
||||
this.model.fetch();
|
||||
this.removeMenuItem('createContact');
|
||||
@@ -227,6 +230,9 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em
|
||||
this.removeMenuItem('createCase');
|
||||
view.close();
|
||||
}, this);
|
||||
this.listenTo(view, 'before:save', function () {
|
||||
this.getView('record').blockUpdateWebSocket(true);
|
||||
}, this);
|
||||
});
|
||||
}.bind(this));
|
||||
},
|
||||
@@ -306,6 +312,9 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em
|
||||
this.removeMenuItem('createLead');
|
||||
view.close();
|
||||
}.bind(this));
|
||||
this.listenTo(view, 'before:save', function () {
|
||||
this.getView('record').blockUpdateWebSocket(true);
|
||||
}, this);
|
||||
}.bind(this));
|
||||
|
||||
},
|
||||
|
||||
@@ -169,6 +169,10 @@ Espo.define('views/modals/edit', 'views/modal', function (Dep) {
|
||||
this.dialog.close();
|
||||
}, this);
|
||||
|
||||
editView.once('before:save', function () {
|
||||
this.trigger('before:save', model);
|
||||
}, this);
|
||||
|
||||
var $buttons = this.dialog.$el.find('.modal-footer button');
|
||||
$buttons.addClass('disabled').attr('disabled', 'disabled');
|
||||
|
||||
|
||||
@@ -1837,8 +1837,14 @@ define('views/record/detail', ['views/record/base', 'view-record-helper'], funct
|
||||
}
|
||||
},
|
||||
|
||||
blockUpdateWebSocket: function () {
|
||||
blockUpdateWebSocket: function (toUnblock) {
|
||||
this.updateWebSocketIsBlocked = true;
|
||||
|
||||
if (toUnblock) {
|
||||
setTimeout(function () {
|
||||
this.unblockUpdateWebSocket();
|
||||
}.bind(this), this.blockUpdateWebSocketPeriod || 500);
|
||||
}
|
||||
},
|
||||
|
||||
unblockUpdateWebSocket: function () {
|
||||
|
||||
Reference in New Issue
Block a user