From 1f977c6393a8925780121175dfd3e7eafe3cd7ad Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 23 Apr 2019 15:02:42 +0300 Subject: [PATCH] Share document when send mentions --- apps/documenteditor/main/app/view/FileMenuPanels.js | 3 ++- apps/presentationeditor/main/app/view/FileMenuPanels.js | 3 ++- apps/spreadsheeteditor/main/app/view/FileMenuPanels.js | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/documenteditor/main/app/view/FileMenuPanels.js b/apps/documenteditor/main/app/view/FileMenuPanels.js index 539eaa81b..45dafae27 100644 --- a/apps/documenteditor/main/app/view/FileMenuPanels.js +++ b/apps/documenteditor/main/app/view/FileMenuPanels.js @@ -988,11 +988,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({ diff --git a/apps/presentationeditor/main/app/view/FileMenuPanels.js b/apps/presentationeditor/main/app/view/FileMenuPanels.js index c3d19f6ce..cc0bada8e 100644 --- a/apps/presentationeditor/main/app/view/FileMenuPanels.js +++ b/apps/presentationeditor/main/app/view/FileMenuPanels.js @@ -801,11 +801,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({ diff --git a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js index 919be95ad..03a50af6e 100644 --- a/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js +++ b/apps/spreadsheeteditor/main/app/view/FileMenuPanels.js @@ -1255,11 +1255,12 @@ define([ setMode: function(mode) { this.sharingSettingsUrl = mode.sharingSettingsUrl; + !!this.sharingSettingsUrl && this.sharingSettingsUrl.length && Common.Gateway.on('showsharingsettings', _.bind(this.changeAccessRights, this)); return this; }, changeAccessRights: function(btn,event,opts) { - if (this._docAccessDlg) return; + if (this._docAccessDlg || this._readonlyRights) return; var me = this; me._docAccessDlg = new Common.Views.DocumentAccessDialog({