Skip to content

Commit

Permalink
[PE] Hide dialog for renaming anonymous when start slide show
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Feb 27, 2024
1 parent 3187711 commit f66789f
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 f66789f

Please sign in to comment.