diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 0f1d1265aa..99a45aeeb8 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -189,9 +189,9 @@ define([ '' + '<% } else if (/svgicon/.test(iconCls)) { %>' + ' -1 ? "icon-rtl" : "" %>">' + - '<% } else { %>' + - '' + - '<% } %>'; + '<% } else { ' + + 'print(\' \'); ' + + ' } %>'; var templateBtnCaption = '<%= caption %>' + @@ -293,9 +293,9 @@ define([ ' -1 ? "icon-rtl" : "" %>">', '<% } else if (/svgicon/.test(iconCls)) { %>', ' -1 ? "icon-rtl" : "" %>">', - '<% } else { %>', - '', - '<% } %>', + '<% } else { ', + 'print(\' \'); ', + ' } %>', '<% } %>', '<% } %>', '<% if ( !menu && onlyIcon ) { %>', @@ -474,7 +474,6 @@ define([ } parentEl.html(me.cmpEl); - me.$icon = me.$el.find('.icon'); } } else { if (me.options.el || me.cmpEl) { @@ -791,8 +790,7 @@ define([ }, changeIcon: function(opts) { - let btnIconEl = $(this.el).find('i.icon'); - let svgIcon = $(this.el).find('.icon use.zoom-int'); + const svgIcon = $(this.el).find('.icon use.zoom-int'), btnIconEl = $(this.el).find('i.icon'); if (opts && (opts.curr || opts.next)) { if (opts.curr) { @@ -816,7 +814,8 @@ define([ }, hasIcon: function(iconcls) { - return this.$icon.hasClass(iconcls); + const iconHref = this.$el.find('use.zoom-int').attr('href'); + return iconHref.includes(iconcls); }, setVisible: function(visible) { @@ -1083,7 +1082,10 @@ define([ }, updateIcon: function() { - this.$icon && this.$icon.css({'background-image': 'url('+ (this.cmpButtonFirst && (this.cmpButtonFirst.hasClass('active') || this.cmpButtonFirst.is(':active')) ? this.iconActiveImg : this.iconNormalImg) +')'}); + this.$el.find('i.icon').css({ + 'background-image': 'url('+ (this.cmpButtonFirst && (this.cmpButtonFirst.hasClass('active') || this.cmpButtonFirst.is(':active')) ? this.iconActiveImg : this.iconNormalImg) +')', + 'display': 'inline-block' + }); }, applyScaling: function (ratio) { diff --git a/apps/common/main/lib/component/MenuItem.js b/apps/common/main/lib/component/MenuItem.js index fc3ae9931d..ba583f2c5c 100644 --- a/apps/common/main/lib/component/MenuItem.js +++ b/apps/common/main/lib/component/MenuItem.js @@ -114,9 +114,9 @@ define([ template: _.template([ ' data-no-icon <% } %> 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(options.dataHintTitle) { %> data-hint-title="<%= options.dataHintTitle %>" <% }; %> >', '<% if (!_.isEmpty(iconCls)) { %>', - ' -1 ? "icon-rtl" : "" %>">', - '', - '', + '<% if (/btn-[^\\s]+/.test(iconCls)) { %>', + '', + '<% } %>', '<% } else if (!_.isEmpty(iconImg)) { %>', '', '<% } %>', diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index 69e33d5c1d..0215ef3bd9 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -585,6 +585,9 @@ define([ var menuTemplate = _.template('
' + '<% if (!_.isEmpty(iconCls)) { %>' + '' + + '<% if (/btn-[^\\s]+/.test(iconCls)) { %>' + + '' + + '<% } %>' + '<% } %>' + '<%= caption %>
' + '<% if (options.description !== null) { %>' + diff --git a/apps/common/main/resources/less/bigscaling.less b/apps/common/main/resources/less/bigscaling.less index 29967c26db..69a47f4516 100644 --- a/apps/common/main/resources/less/bigscaling.less +++ b/apps/common/main/resources/less/bigscaling.less @@ -40,9 +40,12 @@ .dropdown-menu { .menu-item { - span.menu-item-icon { - display: none; + body:not(.pixel-ratio__1_25, .pixel-ratio__1_5, .pixel-ratio__1_75) & { + span.menu-item-icon { + display: none; + } } + svg.menu-item-icon { fill: @icon-normal-ie; fill: @icon-normal; diff --git a/apps/presentationeditor/main/app/view/DocumentPreview.js b/apps/presentationeditor/main/app/view/DocumentPreview.js index 3f14c25314..50ea7facf0 100644 --- a/apps/presentationeditor/main/app/view/DocumentPreview.js +++ b/apps/presentationeditor/main/app/view/DocumentPreview.js @@ -73,9 +73,9 @@ define([ '
', '
', '
', - !Common.UI.isRTL() ? '' : '', - '', - !Common.UI.isRTL() ? '' : '', + !Common.UI.isRTL() ? '' : '', + '', + !Common.UI.isRTL() ? '' : '', '
', '
', '
', @@ -87,9 +87,9 @@ define([ '
', '
', '
', - '', + '', '
', - '', + '', '
', '
' ].join(''); @@ -109,7 +109,8 @@ define([ el: $('#btn-preview-prev',this.el), hint: this.txtPrev, hintAnchor: 'top', - hintContainer: '#pe-preview' + hintContainer: '#pe-preview', + iconCls: 'toolbar__icon btn-previtem' }); this.btnPrev.on('click', _.bind(function() { if (this.api) this.api.DemonstrationPrevSlide(); @@ -119,7 +120,8 @@ define([ el: $('#btn-preview-next',this.el), hint: this.txtNext, hintAnchor: 'top', - hintContainer: '#pe-preview' + hintContainer: '#pe-preview', + iconCls: 'toolbar__icon btn-nextitem' }); this.btnNext.on('click', _.bind(function() { if (this.api) this.api.DemonstrationNextSlide(); @@ -129,11 +131,11 @@ define([ el: $('#btn-preview-play',this.el), hint: this.txtPlay, hintAnchor: 'top', - hintContainer: '#pe-preview' + hintContainer: '#pe-preview', + iconCls: 'toolbar__icon btn-play' }); this.btnPlay.on('click', _.bind(function(btn) { - var iconEl = $('.icon', this.btnPlay.cmpEl); - if (iconEl.hasClass('btn-preview-pause')) { + if (btn.hasIcon('btn-preview-pause')) { this.btnPlay.changeIcon({curr: 'btn-preview-pause', next: 'btn-play'}); this.btnPlay.updateHint(this.txtPlay); if (this.api) @@ -150,7 +152,8 @@ define([ el: $('#btn-preview-close',this.el), hint: this.txtClose, hintAnchor: 'top', - hintContainer: '#pe-preview' + hintContainer: '#pe-preview', + iconCls: 'toolbar__icon btn-close' }); this.btnClose.on('click', _.bind(function() { if (this.api) this.api.EndDemonstration(); @@ -160,7 +163,8 @@ define([ el: $('#btn-preview-fullscreen',this.el), hint: this.txtFullScreen, hintAnchor: 'top', - hintContainer: '#pe-preview' + hintContainer: '#pe-preview', + iconCls: 'toolbar__icon btn-fullscreen' }); this.btnFullScreen.on('click', _.bind(function(btn) { this.toggleFullScreen();