From 63771420f4e2e76d3a2ce908d43c5617e68b004a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 2 Mar 2020 17:36:10 +0300 Subject: [PATCH] [PE] Fix Bug 44712 --- .../img/toolbar/1.5x/big/btn-audio.png | Bin 0 -> 552 bytes .../img/toolbar/1.5x/big/btn-video.png | Bin 0 -> 284 bytes .../img/toolbar/1x/big/btn-audio.png | Bin 0 -> 389 bytes .../img/toolbar/1x/big/btn-video.png | Bin 0 -> 233 bytes .../img/toolbar/2x/big/btn-audio.png | Bin 0 -> 707 bytes .../img/toolbar/2x/big/btn-video.png | Bin 0 -> 371 bytes .../main/app/controller/Toolbar.js | 12 ++++++- .../main/app/template/Toolbar.template | 5 +++ .../main/app/view/Toolbar.js | 34 +++++++++++++++++- apps/presentationeditor/main/locale/en.json | 6 +++- 10 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 apps/common/main/resources/img/toolbar/1.5x/big/btn-audio.png create mode 100644 apps/common/main/resources/img/toolbar/1.5x/big/btn-video.png create mode 100644 apps/common/main/resources/img/toolbar/1x/big/btn-audio.png create mode 100644 apps/common/main/resources/img/toolbar/1x/big/btn-video.png create mode 100644 apps/common/main/resources/img/toolbar/2x/big/btn-audio.png create mode 100644 apps/common/main/resources/img/toolbar/2x/big/btn-video.png diff --git a/apps/common/main/resources/img/toolbar/1.5x/big/btn-audio.png b/apps/common/main/resources/img/toolbar/1.5x/big/btn-audio.png new file mode 100644 index 0000000000000000000000000000000000000000..50ccbacdcfba00b737ffe440e2b8d795249bed3f GIT binary patch literal 552 zcmV+@0@wYCP);HP=Y&}CR?&WLh?xNJwkf#a_ zhF5AL+GEI4B}2&_uOm#Vo`wufgM@1)FsXWM&!m%O*UA{PnXmVLqvi<=$;2!ZU+6a; zAR3JRQNv>2CNi52(10;>DcT@mO{QbQ^m9RW;!Jd0;kSPW(+C5#eMFoVLAojQv z6D33O)?qCd6E%oqhb<#2Cw{CI6Kx=wKrvAn7ZsIpSy9(o9#^)MC|dBivgJfO8)UBz z#Y8&<*{ef2QFgDlSCkFKL>bpi91#kM+ViMKkv__Z;ymgh;@?bV7gy+e|JM~tQkCZP z>=oMob%jb*n$y!z?|7#lt+xyI@O&nEF!ZDKM!-RBfxLV0%yXS(wF&r#&%6%XGUb{~ zbXtn;G$o_AW@3+o(^3=~30iH(Xv_3D@1u_GA^TV4bJ<5BnHj1S>2epP!R}?4qZ)CU qhz^j7TjIRLlQBm^V6y??0jp`J|icy~RtkIN}iC&U0 z%0(&L%tH{0Qg%iVmC*;S<<>4kC@-V9&xQp-QAY82p{ycB@1U$8>z^!9DoUbQv|ieS zK1FemmeD32ck(hCu@jb2N@{C8C56pXo!W_#(sp#Bq)K#c5Bi=7hd~}u zP)Uuq&p_V6*`f7=ImTJ6g8b ze54%~iQEdD%`8ph8-X)sX&PU67M5wufrfi6*lXcgFvd3^Lksp=nlsuk{eQ3etO)`8 ztDwOUACTp+VT;IZv;{~q+W9$qibx-p&VVzDz9@2*2@yA#`r+-e;XTM;tJP^V>3fpn jtQ5xVdlKKFL*Jwy)B6qxp}Dg#00000NkvXXu0mjfa1yNU literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/1x/big/btn-video.png b/apps/common/main/resources/img/toolbar/1x/big/btn-video.png new file mode 100644 index 0000000000000000000000000000000000000000..13f5d8a77166c33d81056924adf6ce3daa7d5dce GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^7C!*F=Me)QSM5Zh zXDQ8Q$9K+X@tg@nQ#@w0)H`tYFzi)faPQyez{p|q$@8{}#22Q*#f4m~JHTQj8a7iremhh#Y^OS`j9eL9ivP^KLH;2QLbsnk8@w4@VLL_Eu z2I-2d%y&}V>ZUby=ClO`h3-*#x11;5yP-T$?zKqNEau7e-s?@vboI{2#{Ah|M94?jbKth06zU9 zVBqjTeLC{oR4SE9rBbO>D&LRiU8kKk3*OhEZ3@8->F;P(}PkU4pR%-vJd zn4m+BSzc4WOEZ7!nV^FsFlA0&)UdNvLNK&Zg^_-vsU715mS?aOmr3IHgv3p&YLzFa@ytLr5 zC-S;7hd1;lOP&{8?%HtOZDjs>%O}l*tLFr-yGskqw5tTy{>~c2d|gd~ysQyi`#S<~ zt;YnsloK?%Me?ji9?J>(s`V}eyMv>U&o?Z&UDgn#Fk?uUJF%70`&>hS}( zlomX?HZc_zJi0b9ZP4hur;Qu^(`JpnI|xxXJgOZ4ec-5;crMSoJAx|2{h}lC@L~J% z-^2EP(Ggj3*p8Z3>@@bbZxd0MyD8@k*CnO@(sk(ooFBgM#*=A|DZ#{j^5x+R?+JkM zix=Jp>lrfK8(FwCW`Lpm$ifl(s6waDcZN>aG-iMv-DK$Ghr5=>q@awpf4RqoN`FIe z%(#C(jkgBBezcJ*jW-9su3oM*+LIUx4^4I$?u_nTy_{)uf}N(?L(VihK~1%XtZDq5 pw)ge-|NE>`sZ=VJN~KcC!*39)=BX)ln#TYD002ovPDHLkV1iRbO!WW& literal 0 HcmV?d00001 diff --git a/apps/common/main/resources/img/toolbar/2x/big/btn-video.png b/apps/common/main/resources/img/toolbar/2x/big/btn-video.png new file mode 100644 index 0000000000000000000000000000000000000000..a5044fee82fcdfa71857cc18511697c3e44a265c GIT binary patch literal 371 zcmV-(0gV2MP)A zymLCSg6KhzB&CAqB|-F%L@BY#lPD!teIDGGR130Xs^GNFhslD&Ji(Z+Q_P zvl$Ii3z-cDd8O!Xlv_>g(1_cjl +
+
+ + +
diff --git a/apps/presentationeditor/main/app/view/Toolbar.js b/apps/presentationeditor/main/app/view/Toolbar.js index 26051856c..8257848f8 100644 --- a/apps/presentationeditor/main/app/view/Toolbar.js +++ b/apps/presentationeditor/main/app/view/Toolbar.js @@ -610,6 +610,26 @@ define([ }); me.slideOnlyControls.push(me.btnInsSlideNum); + if (window["AscDesktopEditor"] && window["AscDesktopEditor"]["IsSupportMedia"] && window["AscDesktopEditor"]["IsSupportMedia"]()) { + me.btnInsAudio = new Common.UI.Button({ + id: 'tlbtn-insaudio', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-audio', + caption: me.capInsertAudio, + lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart] + }); + me.slideOnlyControls.push(me.btnInsAudio); + + me.btnInsVideo = new Common.UI.Button({ + id: 'tlbtn-insvideo', + cls: 'btn-toolbar x-huge icon-top', + iconCls: 'toolbar__icon btn-video', + caption: me.capInsertVideo, + lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart] + }); + me.slideOnlyControls.push(me.btnInsVideo); + } + me.btnColorSchemas = new Common.UI.Button({ id: 'id-toolbar-btn-colorschemas', cls: 'btn-toolbar', @@ -961,6 +981,12 @@ define([ _injectComponent('#slot-btn-datetime', this.btnInsDateTime); _injectComponent('#slot-btn-slidenum', this.btnInsSlideNum); + this.btnInsAudio && _injectComponent('#slot-btn-insaudio', this.btnInsAudio); + this.btnInsVideo && _injectComponent('#slot-btn-insvideo', this.btnInsVideo); + if (!this.btnInsAudio && !this.btnInsVideo) { + $host.find('#slot-btn-insaudio').parents('.group').hide().prev().hide(); + } + this.btnsInsertImage = Common.Utils.injectButtons($host.find('.slot-insertimg'), 'tlbtn-insertimage-', 'toolbar__icon btn-insertimage', this.capInsertImage, [PE.enumLock.slideDeleted, PE.enumLock.lostConnect, PE.enumLock.noSlides, PE.enumLock.disableOnStart], false, true); this.btnsInsertText = Common.Utils.injectButtons($host.find('.slot-instext'), 'tlbtn-inserttext-', 'toolbar__icon btn-text', this.capInsertText, @@ -1064,6 +1090,8 @@ define([ this.btnInsertSymbol.updateHint(this.tipInsertSymbol); this.btnInsertHyperlink.updateHint(this.tipInsertHyperlink + Common.Utils.String.platformKey('Ctrl+K')); this.btnInsertTextArt.updateHint(this.tipInsertTextArt); + this.btnInsAudio && this.btnInsAudio.updateHint(this.tipInsertAudio); + this.btnInsVideo && this.btnInsVideo.updateHint(this.tipInsertVideo); this.btnColorSchemas.updateHint(this.tipColorSchemas); this.btnShapeAlign.updateHint(this.tipShapeAlign); this.btnShapeArrange.updateHint(this.tipShapeArrange); @@ -1645,7 +1673,11 @@ define([ textListSettings: 'List Settings', capBtnAddComment: 'Add Comment', capBtnInsSymbol: 'Symbol', - tipInsertSymbol: 'Insert symbol' + tipInsertSymbol: 'Insert symbol', + capInsertAudio: 'Audio', + capInsertVideo: 'Video', + tipInsertAudio: 'Insert audio', + tipInsertVideo: 'Insert video' } }()), PE.Views.Toolbar || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index c0c1a31c3..ae851767f 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1819,5 +1819,9 @@ "PE.Views.Toolbar.txtScheme8": "Flow", "PE.Views.Toolbar.txtScheme9": "Foundry", "PE.Views.Toolbar.txtSlideAlign": "Align to Slide", - "PE.Views.Toolbar.txtUngroup": "Ungroup" + "PE.Views.Toolbar.txtUngroup": "Ungroup", + "PE.Views.Toolbar.capInsertAudio": "Audio", + "PE.Views.Toolbar.capInsertVideo": "Video", + "PE.Views.Toolbar.tipInsertAudio": "Insert audio", + "PE.Views.Toolbar.tipInsertVideo": "Insert video" } \ No newline at end of file