From 2bbfe4d1f4c8d0b7408179102a65f9c8919e3f2e Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Thu, 20 Apr 2017 16:36:15 +0300 Subject: [PATCH] [PE] svg icon in button --- apps/common/main/lib/component/Button.js | 14 ++++++++++++-- apps/common/main/lib/view/Header.js | 2 +- apps/common/main/resources/less/toolbar.less | 14 ++++++++++++++ .../main/app/controller/Toolbar.js | 2 +- apps/presentationeditor/main/index.html | 17 ++++++++++++++++- 5 files changed, 44 insertions(+), 5 deletions(-) diff --git a/apps/common/main/lib/component/Button.js b/apps/common/main/lib/component/Button.js index 7b06a4e47..48f6abc36 100644 --- a/apps/common/main/lib/component/Button.js +++ b/apps/common/main/lib/component/Button.js @@ -125,7 +125,11 @@ define([ '<% if ( iconImg ) { %>' + '' + '<% } else { %>' + - ' ' + + '<% if (/svgicon/.test(iconCls)) {' + + 'print(\'\');' + + '} else ' + + 'print(\' \'); %>' + + // ' ' + '<% } %>' + '' + '<%= caption %>' + @@ -182,7 +186,13 @@ define([ template: _.template([ '<% var applyicon = function() { %>', '<% if (iconImg) { print(\'\'); } else { %>', - '<% if (iconCls != "") { print(\' \'); }} %>', + // '<% if (iconCls != "") { print(\' \'); }} %>', + '<% if (iconCls != "") { ' + + ' if (/svgicon/.test(iconCls)) {' + + 'print(\'\');' + + '} else ' + + 'print(\' \'); ' + + '}} %>', '<% } %>', '<% if ( !menu ) { %>', '