show more after remove issue fix
This commit is contained in:
@@ -397,17 +397,25 @@ Espo.define('views/record/detail', ['views/record/base', 'view-record-helper'],
|
||||
|
||||
this.notify('Removing...');
|
||||
|
||||
var collection = this.model.collection;
|
||||
|
||||
var self = this;
|
||||
this.model.destroy({
|
||||
wait: true,
|
||||
error: function () {
|
||||
self.notify('Error occured!', 'error');
|
||||
},
|
||||
this.notify('Error occured!', 'error');
|
||||
}.bind(this),
|
||||
success: function () {
|
||||
self.notify('Removed', 'success');
|
||||
self.trigger('after:delete');
|
||||
self.exit('delete');
|
||||
},
|
||||
if (collection) {
|
||||
if (collection.total > 0) {
|
||||
collection.total--;
|
||||
}
|
||||
}
|
||||
|
||||
this.notify('Removed', 'success');
|
||||
this.trigger('after:delete');
|
||||
this.exit('delete');
|
||||
}.bind(this),
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -216,6 +216,7 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
allResultIsChecked: false,
|
||||
|
||||
data: function () {
|
||||
|
||||
var paginationTop = this.pagination === 'both' || this.pagination === true || this.pagination === 'top';
|
||||
var paginationBottom = this.pagination === 'both' || this.pagination === true || this.pagination === 'bottom';
|
||||
return {
|
||||
@@ -368,9 +369,6 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
}
|
||||
} else {
|
||||
var idsRemoved = result.ids || [];
|
||||
if (this.collection.total > 0) {
|
||||
this.collection.total = this.collection.total - count;
|
||||
}
|
||||
if (count) {
|
||||
idsRemoved.forEach(function (id) {
|
||||
Espo.Ui.notify(false);
|
||||
|
||||
Reference in New Issue
Block a user