Merge pull request #3048 from ONLYOFFICE/fix/slide-master-close

[PE] Add Close Master button
This commit is contained in:
Julia Radzhabova
2024-06-08 14:59:28 +03:00
committed by GitHub
4 changed files with 29 additions and 1 deletions

View File

@ -115,6 +115,9 @@ define([
'Toolbar': {
'view:compact': _.bind(function (toolbar, state) {
this.view.chToolbar.setValue(!state, true);
}, this),
'close:slide-master': _.bind(function () {
this.onChangeViewMode('normal', true);
}, this)
},
'Statusbar': {

View File

@ -140,6 +140,9 @@
<span class="btn-slot text x-huge" id="slot-chk-footers"></span>
</div>
</div>
<div class="group master-slide-mode" style="display:none;">
<span class="btn-slot text x-huge" id="slot-btn-closeslidemaster"></span>
</div>
<div class="group normal-mode">
<span class="btn-slot text x-huge slot-addslide"></span>
</div>

View File

@ -778,6 +778,18 @@ define([
});
this.slideOnlyControls.push(this.chFooters);
me.btnCloseSlideMaster = new Common.UI.Button({
id: 'tlbtn-close-slide-master',
cls: 'btn-toolbar x-huge icon-top',
iconCls: 'toolbar__icon btn-close-master',
lock: [_set.slideDeleted, _set.lostConnect, _set.noSlides, _set.disableOnStart],
caption: me.capCloseMaster,
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'small'
});
me.slideOnlyControls.push(me.btnCloseSlideMaster);
me.btnInsertTable = new Common.UI.Button({
id: 'tlbtn-inserttable',
cls: 'btn-toolbar x-huge icon-top',
@ -1353,6 +1365,7 @@ define([
_injectComponent('#slot-btn-insplaceholder', this.btnInsertPlaceholder);
_injectComponent('#slot-chk-title', this.chTitle);
_injectComponent('#slot-chk-footers', this.chFooters);
_injectComponent('#slot-btn-closeslidemaster', this.btnCloseSlideMaster);
this.btnInsAudio && _injectComponent('#slot-btn-insaudio', this.btnInsAudio);
this.btnInsVideo && _injectComponent('#slot-btn-insvideo', this.btnInsVideo);
@ -1561,6 +1574,7 @@ define([
this.btnEditHeader.updateHint(this.tipEditHeaderFooter);
this.btnInsDateTime.updateHint(this.tipDateTime);
this.btnInsSlideNum.updateHint(this.tipSlideNum);
this.btnCloseSlideMaster.updateHint(this.tipCloseMaster);
// set menus
@ -1918,6 +1932,10 @@ define([
me.fireEvent('footers:hide', [me.chFooters, state === 'checked']);
}, me));
me.btnCloseSlideMaster.on('click', function (btn, e) {
me.fireEvent('close:slide-master', [btn, e]);
});
/** coauthoring begin **/
this.showSynchTip = !Common.localStorage.getBool('pe-hide-synch');
@ -2528,7 +2546,9 @@ define([
tipInsertPicturePlaceholder: 'Insert picture placeholder',
tipInsertChartPlaceholder: 'Insert chart placeholder',
tipInsertTablePlaceholder: 'Insert table placeholder',
tipInsertSmartArtPlaceholder: 'Insert smartArt placeholder'
tipInsertSmartArtPlaceholder: 'Insert smartArt placeholder',
capCloseMaster: 'Close Master',
tipCloseMaster: 'Close Master'
}
}()), PE.Views.Toolbar || {}));
});

View File

@ -2806,6 +2806,8 @@
"PE.Views.Toolbar.txtObjectsAlign": "Align selected objects",
"PE.Views.Toolbar.txtSlideAlign": "Align to Slide",
"PE.Views.Toolbar.txtUngroup": "Ungroup",
"PE.Views.Toolbar.capCloseMaster": "Close Master",
"PE.Views.Toolbar.tipCloseMaster": "Close Master",
"PE.Views.Transitions.strDelay": "Delay",
"PE.Views.Transitions.strDuration": "Duration",
"PE.Views.Transitions.strStartOnClick": "Start On Click",