select records button disable
This commit is contained in:
@@ -91,6 +91,7 @@ Espo.define('views/modals/select-records', ['views/modal', 'search-manager'], fu
|
||||
name: 'select',
|
||||
style: 'primary',
|
||||
label: 'Select',
|
||||
disabled: true,
|
||||
onClick: function (dialog) {
|
||||
var listView = this.getView('list');
|
||||
|
||||
@@ -193,10 +194,20 @@ Espo.define('views/modals/select-records', ['views/modal', 'search-manager'], fu
|
||||
checkAllResultDisabled: !this.massRelateEnabled,
|
||||
buttonsDisabled: true
|
||||
}, function (view) {
|
||||
view.once('select', function (model) {
|
||||
this.listenToOnce(view, 'select', function (model) {
|
||||
this.trigger('select', model);
|
||||
this.close();
|
||||
}.bind(this));
|
||||
|
||||
if (this.multiple) {
|
||||
this.listenTo(view, 'check', function () {
|
||||
if (view.checkedList.length) {
|
||||
this.enableButton('select');
|
||||
} else {
|
||||
this.disableButton('select');
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
}.bind(this));
|
||||
|
||||
}.bind(this));
|
||||
|
||||
@@ -161,6 +161,8 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
this.$el.find('.actions-button').attr('disabled', true);
|
||||
this.$el.find('.list > table tbody tr').removeClass('active');
|
||||
}
|
||||
|
||||
this.trigger('check');
|
||||
},
|
||||
'click .action': function (e) {
|
||||
var $el = $(e.currentTarget);
|
||||
@@ -1002,6 +1004,8 @@ Espo.define('views/record/list', 'view', function (Dep) {
|
||||
} else {
|
||||
this.$el.find('.select-all').prop('checked', false);
|
||||
}
|
||||
|
||||
this.trigger('check');
|
||||
},
|
||||
|
||||
getRowActionsDefs: function () {
|
||||
|
||||
Reference in New Issue
Block a user