diff --git a/apps/api/wopi/editor-wopi.ejs b/apps/api/wopi/editor-wopi.ejs index 98f6881f8..1dbb7544a 100644 --- a/apps/api/wopi/editor-wopi.ejs +++ b/apps/api/wopi/editor-wopi.ejs @@ -179,13 +179,20 @@ div { window.open(fileInfo.HostEditUrl, "_blank"); }; - var requestSharingSettings = function (event) { + var onRequestSharingSettings = function (event) { if (fileInfo.FileSharingPostMessage) _postMessage('UI_Sharing', {}); else if (fileInfo.FileSharingUrl) window.open(fileInfo.FileSharingUrl, "_blank"); }; + var onRequestHistory = function (event) { + if (fileInfo.FileVersionPostMessage) + _postMessage('UI_FileVersions', {}); + else if (fileInfo.FileVersionUrl) + window.open(fileInfo.FileVersionUrl, "_blank"); + }; + var onError = function (event) { if (event) innerAlert(event.data); @@ -258,7 +265,8 @@ div { "onError": onError, "onRequestClose": fileInfo.ClosePostMessage || fileInfo.CloseUrl ? onRequestClose : undefined, "onRequestRename": fileInfo.SupportsRename && fileInfo.UserCanRename ? onRequestRename : undefined, - "onRequestSharingSettings": fileInfo.FileSharingPostMessage || fileInfo.FileSharingUrl ? requestSharingSettings : undefined + "onRequestSharingSettings": fileInfo.FileSharingPostMessage || fileInfo.FileSharingUrl ? onRequestSharingSettings : undefined, + "onRequestHistory": fileInfo.FileVersionUrl || fileInfo.FileVersionPostMessage ? onRequestHistory : undefined } }; diff --git a/apps/documenteditor/main/app/controller/LeftMenu.js b/apps/documenteditor/main/app/controller/LeftMenu.js index 6919febba..9251da230 100644 --- a/apps/documenteditor/main/app/controller/LeftMenu.js +++ b/apps/documenteditor/main/app/controller/LeftMenu.js @@ -865,11 +865,13 @@ define([ }, showHistory: function() { - var maincontroller = DE.getController('Main'); - if (!maincontroller.loadMask) - maincontroller.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); - maincontroller.loadMask.setTitle(this.textLoadHistory); - maincontroller.loadMask.show(); + if (!this.mode.wopi) { + var maincontroller = DE.getController('Main'); + if (!maincontroller.loadMask) + maincontroller.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); + maincontroller.loadMask.setTitle(this.textLoadHistory); + maincontroller.loadMask.show(); + } Common.Gateway.requestHistory(); }, diff --git a/apps/presentationeditor/main/app/controller/LeftMenu.js b/apps/presentationeditor/main/app/controller/LeftMenu.js index c858007e7..26565ba84 100644 --- a/apps/presentationeditor/main/app/controller/LeftMenu.js +++ b/apps/presentationeditor/main/app/controller/LeftMenu.js @@ -758,11 +758,13 @@ define([ }, showHistory: function() { - var maincontroller = PE.getController('Main'); - if (!maincontroller.loadMask) - maincontroller.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); - maincontroller.loadMask.setTitle(this.textLoadHistory); - maincontroller.loadMask.show(); + if (!this.mode.wopi) { + var maincontroller = PE.getController('Main'); + if (!maincontroller.loadMask) + maincontroller.loadMask = new Common.UI.LoadMask({owner: $('#viewport')}); + maincontroller.loadMask.setTitle(this.textLoadHistory); + maincontroller.loadMask.show(); + } Common.Gateway.requestHistory(); },