From 83f2b6ba74d527d9dbae0c6c5087469cf121bcf8 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 16 Nov 2020 21:23:53 +0300 Subject: [PATCH] [SSE] Fix Bug 47467 --- .../main/app/view/ViewManagerDlg.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js index e5b54797a..7984ee0c2 100644 --- a/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js +++ b/apps/spreadsheeteditor/main/app/view/ViewManagerDlg.js @@ -150,6 +150,11 @@ define([ }); this.btnDelete.on('click', _.bind(this.onDelete, this)); + this.btnOk = new Common.UI.Button({ + el: this.$window.find('.primary'), + disabled: true + }); + this.afterRender(); }, @@ -188,6 +193,7 @@ define([ this.btnRename.setDisabled(!val); this.btnDuplicate.setDisabled(!val); this.btnDelete.setDisabled(!val); + this.btnOk.setDisabled(!val); if (val>0) { if (selectedItem===undefined || selectedItem===null) selectedItem = 0; if (_.isNumber(selectedItem)) { @@ -332,6 +338,16 @@ define([ this.onPrimary(); }, + onPrimary: function() { + if (this.btnOk.isDisabled()) return false; + + if ( this.handler && this.handler.call(this, 'ok', this.getSettings()) ) + return; + + this.close(); + return false; + }, + txtTitle: 'Sheet View Manager', textViews: 'Sheet views', closeButtonText : 'Close',