show more after remove issue fix

This commit is contained in:
yuri
2016-04-25 15:28:39 +03:00
parent 94c207677f
commit 3fd34fc48d
2 changed files with 15 additions and 9 deletions
+14 -6
View File
@@ -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),
});
}
},
+1 -3
View File
@@ -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);