Show file versions for wopi
This commit is contained in:
parent
59c658ecab
commit
b14b245698
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
||||
|
|
|
@ -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();
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue