From 5c339648ba607c39f6861d07bcd59db8286ee2df Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sat, 4 Apr 2020 10:39:50 +0300 Subject: [PATCH] task modal complete in dropdown --- client/modules/crm/src/views/task/modals/detail.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/modules/crm/src/views/task/modals/detail.js b/client/modules/crm/src/views/task/modals/detail.js index dfaf1aaf14..8708551ce4 100644 --- a/client/modules/crm/src/views/task/modals/detail.js +++ b/client/modules/crm/src/views/task/modals/detail.js @@ -31,7 +31,7 @@ define('crm:views/task/modals/detail', 'views/modals/detail', function (Dep) { return Dep.extend({ setupRecordButtons: function () { - this.addButton({ + this.addDropdownItem({ name: 'setCompleted', label: 'Complete', }, true); @@ -46,9 +46,9 @@ define('crm:views/task/modals/detail', 'views/modals/detail', function (Dep) { && this.getAcl().check(this.model, 'edit') ) { - this.showButton('setCompleted'); + this.showActionItem('setCompleted'); } else { - this.hideButton('setCompleted'); + this.hideActionItem('setCompleted'); } Dep.prototype.controlRecordButtonsVisibility.call(this); @@ -60,7 +60,7 @@ define('crm:views/task/modals/detail', 'views/modals/detail', function (Dep) { }, { patch: true, success: function () { - this.hideButton('setCompleted'); + this.hideActionItem('setCompleted'); Espo.Ui.success(this.getLanguage().translateOption('Completed', 'status', 'Task')); this.trigger('after:save', this.model); }.bind(this),