Merge pull request #470 from ONLYOFFICE/fix/bug-46177

[SSE] Fix Bug 46177
This commit is contained in:
Julia Radzhabova 2020-08-18 16:29:32 +03:00 committed by GitHub
commit bccfd639ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,16 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
scope: this
})
}, options);
this.options.handler = function(result, value) {
if ( result != 'ok' || this.isNameValid() ) {
if (options.handler)
options.handler.call(this, result, value);
return;
}
return true;
};
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
this._changedProps = null;
@ -88,8 +98,7 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
// Style & Size
this.inputHeader = new Common.UI.InputField({
el : $('#sliceradv-text-header'),
allowBlank : false,
blankError : me.txtEmpty,
allowBlank : true,
style : 'width: 178px;'
}).on('changed:after', function() {
me.isCaptionChanged = true;
@ -372,10 +381,6 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
me.isAltDescChanged = true;
});
this.on('show', function(obj) {
obj.getChild('.footer .primary').focus();
});
this.afterRender();
},
@ -526,6 +531,15 @@ define([ 'text!spreadsheeteditor/main/app/template/SlicerSettingsAdvanced.tem
}
},
isNameValid: function() {
if (this.isNameChanged && _.isEmpty(this.inputName.getValue())) {
this.setActiveCategory(2);
this.inputName.cmpEl.find('input').focus();
return false;
}
return true;
},
textTitle: 'Slicer - Advanced Settings',
textHeader: 'Header',
strStyle: 'Style',