Fix MenuItem cls parameter

This commit is contained in:
Julia Radzhabova 2021-09-20 20:27:00 +03:00
parent 75fa8c5c10
commit e5a35881f8
2 changed files with 4 additions and 5 deletions

View file

@ -111,7 +111,7 @@ define([
tagName : 'li', tagName : 'li',
template: _.template([ template: _.template([
'<a id="<%= id %>" style="<%= style %>" class="<%= options.cls %>" <% if(options.canFocused) { %> tabindex="-1" type="menuitem" <% }; if(!_.isUndefined(options.stopPropagation)) { %> data-stopPropagation="true" <% }; if(!_.isUndefined(options.dataHint)) { %> data-hint="<%= options.dataHint %>" <% }; if(!_.isUndefined(options.dataHintDirection)) { %> data-hint-direction="<%= options.dataHintDirection %>" <% }; if(!_.isUndefined(options.dataHintOffset)) { %> data-hint-offset="<%= options.dataHintOffset %>" <% }; %> >', '<a id="<%= id %>" style="<%= style %>" <% if(options.canFocused) { %> tabindex="-1" type="menuitem" <% }; if(!_.isUndefined(options.stopPropagation)) { %> data-stopPropagation="true" <% }; if(!_.isUndefined(options.dataHint)) { %> data-hint="<%= options.dataHint %>" <% }; if(!_.isUndefined(options.dataHintDirection)) { %> data-hint-direction="<%= options.dataHintDirection %>" <% }; if(!_.isUndefined(options.dataHintOffset)) { %> data-hint-offset="<%= options.dataHintOffset %>" <% }; %> >',
'<% if (!_.isEmpty(iconCls)) { %>', '<% if (!_.isEmpty(iconCls)) { %>',
'<span class="menu-item-icon <%= iconCls %>"></span>', '<span class="menu-item-icon <%= iconCls %>"></span>',
'<% } %>', '<% } %>',
@ -137,7 +137,6 @@ define([
this.toggleGroup = me.options.toggleGroup; this.toggleGroup = me.options.toggleGroup;
this.template = me.options.template || this.template; this.template = me.options.template || this.template;
this.iconCls = me.options.iconCls; this.iconCls = me.options.iconCls;
this.liCls = me.options.liCls;
this.hint = me.options.hint; this.hint = me.options.hint;
this.rendered = false; this.rendered = false;
@ -217,8 +216,8 @@ define([
}); });
} }
if (this.liCls) if (this.cls)
el.addClass(this.liCls); el.addClass(this.cls);
if (this.disabled) if (this.disabled)
el.toggleClass('disabled', this.disabled); el.toggleClass('disabled', this.disabled);

View file

@ -1286,7 +1286,7 @@ define([
this.paragraphControls.push(this.cmbFontName); this.paragraphControls.push(this.cmbFontName);
this.listStylesAdditionalMenuItem = new Common.UI.MenuItem({ this.listStylesAdditionalMenuItem = new Common.UI.MenuItem({
liCls: 'save-style-container', cls: 'save-style-container',
iconCls: 'menu__icon btn-zoomup', iconCls: 'menu__icon btn-zoomup',
caption: me.textStyleMenuNew caption: me.textStyleMenuNew
}); });