Skip to content

Commit

Permalink
Merge pull request #2862 from ONLYOFFICE/fix/pe-anonymous
Browse files Browse the repository at this point in the history
[PE] Hide dialog for renaming anonymous when start slide show
  • Loading branch information
JuliaRadzhabova authored Feb 27, 2024
2 parents 186e3b7 + f66789f commit 3eb6915
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions apps/presentationeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ define([
this.api.asc_registerCallback('asc_onMeta', _.bind(this.onMeta, this));
this.api.asc_registerCallback('asc_onAdvancedOptions', _.bind(this.onAdvancedOptions, this));
this.api.asc_registerCallback('asc_onSpellCheckInit', _.bind(this.loadLanguages, this));
Common.NotificationCenter.on('preview:start', _.bind(this.onPreviewStart, this));
this.api.asc_registerCallback('asc_onEndDemonstration', _.bind(this.onEndDemonstration, this));
Common.NotificationCenter.on('api:disconnect', _.bind(this.onCoAuthoringDisconnect, this));
Common.NotificationCenter.on('goback', _.bind(this.goBack, this));
Common.NotificationCenter.on('close', _.bind(this.closeEditor, this));
Expand Down Expand Up @@ -2609,6 +2611,7 @@ define([
me._renameDialog = undefined;
});
this._renameDialog.show(Common.Utils.innerWidth() - this._renameDialog.options.width - 15, 30);
this._state.previewStarted && this._renameDialog.hide();
},

onLanguageLoaded: function() {
Expand Down Expand Up @@ -2833,6 +2836,18 @@ define([
}
},

onPreviewStart: function() {
this._state.previewStarted = true;
if (this._renameDialog && this._renameDialog.isVisible())
this._renameDialog.hide();
},

onEndDemonstration: function() {
this._state.previewStarted = false;
if (this._renameDialog && !this._renameDialog.isVisible())
this._renameDialog.show();
},

// Translation
leavePageText: 'You have unsaved changes in this document. Click \'Stay on this Page\' then \'Save\' to save them. Click \'Leave this Page\' to discard all the unsaved changes.',
criticalErrorTitle: 'Error',
Expand Down

0 comments on commit 3eb6915

Please sign in to comment.