[PE] Fix Bug 44712

This commit is contained in:
Julia Radzhabova 2020-03-02 17:36:10 +03:00
parent 7b0dd04aaf
commit 63771420f4
10 changed files with 54 additions and 3 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 552 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View file

@ -316,6 +316,8 @@ define([
toolbar.btnInsDateTime.on('click', _.bind(this.onEditHeaderClick, this, 'datetime'));
toolbar.btnInsSlideNum.on('click', _.bind(this.onEditHeaderClick, this, 'slidenum'));
Common.Gateway.on('insertimage', _.bind(this.insertImage, this));
toolbar.btnInsAudio && toolbar.btnInsAudio.on('click', _.bind(this.onAddAudio, this));
toolbar.btnInsVideo && toolbar.btnInsVideo.on('click', _.bind(this.onAddVideo, this));
this.onSetupCopyStyleButton();
},
@ -639,7 +641,7 @@ define([
this.toolbar.btnShapeArrange, this.toolbar.btnSlideSize, this.toolbar.listTheme, this.toolbar.btnEditHeader, this.toolbar.btnInsDateTime, this.toolbar.btnInsSlideNum
]});
this.toolbar.lockToolbar(PE.enumLock.noSlides, this._state.no_slides,
{ array: this.toolbar.btnsInsertImage.concat(this.toolbar.btnsInsertText, this.toolbar.btnsInsertShape, this.toolbar.btnInsertEquation, this.toolbar.btnInsertTextArt) });
{ array: this.toolbar.btnsInsertImage.concat(this.toolbar.btnsInsertText, this.toolbar.btnsInsertShape, this.toolbar.btnInsertEquation, this.toolbar.btnInsertTextArt, this.toolbar.btnInsAudio, this.toolbar.btnInsVideo) });
if (this.btnsComment)
this.toolbar.lockToolbar(PE.enumLock.noSlides, this._state.no_slides, { array: this.btnsComment });
}
@ -2228,6 +2230,14 @@ define([
this._state.lang = langId;
},
onAddAudio: function() {
this.api && this.api.asc_AddAudio();
},
onAddVideo: function() {
this.api && this.api.asc_AddVideo();
},
textEmptyImgUrl : 'You need to specify image URL.',
textWarning : 'Warning',
textFontSizeErr : 'The entered value must be more than 0',

View file

@ -131,6 +131,11 @@
<span class="btn-slot text x-huge" id="slot-btn-insertequation"></span>
<span class="btn-slot text x-huge" id="slot-btn-inssymbol"></span>
</div>
<div class="separator media long"></div>
<div class="group">
<span class="btn-slot text x-huge" id="slot-btn-insaudio"></span>
<span class="btn-slot text x-huge" id="slot-btn-insvideo"></span>
</div>
</section>
</section>
</section>

View file

@ -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 || {}));
});

View file

@ -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"
}