ctrl+s fixes
This commit is contained in:
@@ -622,8 +622,17 @@ define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (D
|
||||
view.render();
|
||||
view.notify(false);
|
||||
|
||||
this.listenToOnce(view, 'after:save', (model) => {
|
||||
this.addModel(model);
|
||||
let added = false;
|
||||
|
||||
this.listenTo(view, 'after:save', (model) => {
|
||||
if (!added) {
|
||||
this.addModel(model);
|
||||
added = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
this.updateModel(model);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
define('crm:views/calendar/modals/edit', 'views/modals/edit', function (Dep) {
|
||||
define('crm:views/calendar/modals/edit', ['views/modals/edit'], function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
@@ -224,6 +224,10 @@ define('crm:views/calendar/modals/edit', 'views/modals/edit', function (Dep) {
|
||||
text: this.translate('Remove')
|
||||
});
|
||||
}
|
||||
|
||||
this.once('after:save', () => {
|
||||
this.$el.find('.scope-switcher').remove();
|
||||
})
|
||||
},
|
||||
|
||||
actionRemove: function () {
|
||||
|
||||
@@ -705,7 +705,7 @@ define('crm:views/calendar/timeline', ['view', 'lib!vis'], function (Dep, Vis) {
|
||||
view.render();
|
||||
view.notify(false);
|
||||
|
||||
this.listenToOnce(view, 'after:save', () => {
|
||||
this.listenTo(view, 'after:save', () => {
|
||||
this.runFetch();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -559,7 +559,7 @@ define('views/modals/detail', ['views/modal', 'helpers/action-item-setup'], func
|
||||
this.remove();
|
||||
});
|
||||
|
||||
this.listenToOnce(view, 'after:save', (model) => {
|
||||
this.listenTo(view, 'after:save', (model) => {
|
||||
this.model.set(model.getClonedAttributes());
|
||||
|
||||
this.trigger('after:save', model);
|
||||
|
||||
Reference in New Issue
Block a user