[SSE] Fix Bug 47467

This commit is contained in:
Julia Radzhabova 2020-11-16 21:23:53 +03:00
parent 371102c19d
commit 83f2b6ba74

View file

@ -150,6 +150,11 @@ define([
}); });
this.btnDelete.on('click', _.bind(this.onDelete, this)); this.btnDelete.on('click', _.bind(this.onDelete, this));
this.btnOk = new Common.UI.Button({
el: this.$window.find('.primary'),
disabled: true
});
this.afterRender(); this.afterRender();
}, },
@ -188,6 +193,7 @@ define([
this.btnRename.setDisabled(!val); this.btnRename.setDisabled(!val);
this.btnDuplicate.setDisabled(!val); this.btnDuplicate.setDisabled(!val);
this.btnDelete.setDisabled(!val); this.btnDelete.setDisabled(!val);
this.btnOk.setDisabled(!val);
if (val>0) { if (val>0) {
if (selectedItem===undefined || selectedItem===null) selectedItem = 0; if (selectedItem===undefined || selectedItem===null) selectedItem = 0;
if (_.isNumber(selectedItem)) { if (_.isNumber(selectedItem)) {
@ -332,6 +338,16 @@ define([
this.onPrimary(); 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', txtTitle: 'Sheet View Manager',
textViews: 'Sheet views', textViews: 'Sheet views',
closeButtonText : 'Close', closeButtonText : 'Close',