Show run presentation icon in Impress slide sorter toolbar
This fixes regression from commit ae5e33b30c
remove-w2ui: convert presentation toolbar to JSDialogs
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2f7c34369f1d2683be481fb466656b972de50cd4
pull/8974/head
parent
58e5208027
commit
05ed084481
|
@ -52,14 +52,12 @@ class PresentationBar {
|
|||
id: 'presentation',
|
||||
type: 'customtoolitem',
|
||||
text: this._getItemUnoName('presentation'),
|
||||
command: 'presentation',
|
||||
visible: false
|
||||
command: 'presentation'
|
||||
},
|
||||
{
|
||||
id: 'presentationbreak',
|
||||
type: 'separator',
|
||||
orientation: 'vertical',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
id: 'insertpage',
|
||||
|
@ -100,8 +98,10 @@ class PresentationBar {
|
|||
this.parentContainer.innerHTML = '';
|
||||
this.builder.build(this.parentContainer, data);
|
||||
|
||||
if (this.map.getDocType() === 'drawing')
|
||||
this.enableItem('presentation', false);
|
||||
if (this.map.getDocType() === 'drawing') {
|
||||
this.showItem('presentation', false);
|
||||
this.showItem('presentationbreak', false);
|
||||
}
|
||||
}
|
||||
|
||||
enableItem(command, enable) {
|
||||
|
@ -143,14 +143,16 @@ class PresentationBar {
|
|||
|
||||
onWopiProps(e) {
|
||||
if (e.HideExportOption) {
|
||||
this.hideItem('presentation');
|
||||
this.hideItem('presentationbreak');
|
||||
this.showItem('presentation', false);
|
||||
this.showItem('presentationbreak', false);
|
||||
}
|
||||
}
|
||||
|
||||
onDocLayerInit() {
|
||||
if (!this.map['wopi'].HideExportOption && this.map.getDocType() !== 'drawing')
|
||||
this.showItem('presentation');
|
||||
if (!this.map['wopi'].HideExportOption && this.map.getDocType() !== 'drawing') {
|
||||
this.showItem('presentation', true);
|
||||
this.showItem('presentationbreak', true);
|
||||
}
|
||||
|
||||
if (!window.mode.isMobile())
|
||||
this.show();
|
||||
|
|
Loading…
Reference in New Issue