diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-08-03 19:39:01 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-10-13 15:36:51 +0300 |
commit | a13a3fc36fcfc5d2016dff2222dbd70db9472a84 (patch) | |
tree | 613735dda0f379efad7b2a0c1bc30e1846bda81a /src | |
parent | ec17df695e69888e03f83332b1a009c5791f4398 (diff) |
Add saveAs handler
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/document.js | 2 | ||||
-rw-r--r-- | src/files.js | 3 | ||||
-rw-r--r-- | src/view/FilesAppIntegration.js | 11 |
3 files changed, 15 insertions, 1 deletions
diff --git a/src/document.js b/src/document.js index 488a8e61..43cd89af 100644 --- a/src/document.js +++ b/src/document.js @@ -395,7 +395,7 @@ const documentsMain = { t('richdocuments', 'Save As'), function(result, value) { if (result === true && value) { - PostMessages.sendWOPIPostMessage('loolframe', 'Action_SaveAs', { 'Filename': value }) + PostMessages.sendWOPIPostMessage('loolframe', 'Action_SaveAs', { Filename: value, Notify: true }) } }, true, diff --git a/src/files.js b/src/files.js index 92ae3715..261f71bd 100644 --- a/src/files.js +++ b/src/files.js @@ -304,6 +304,9 @@ $(document).ready(function() { case 'File_Rename': FilesAppIntegration.rename(args.NewName) break + case 'Action_Save_Resp': + FilesAppIntegration.saveAs() + break case 'close': odfViewer.onClose() break diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index 06b794d4..0ab60274 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -102,6 +102,17 @@ export default { $('#richdocuments-header').remove() }, + saveAs() { + if (this.handlers.saveAs && this.handlers.saveAs(this)) { + return + } + + if (this.getFileList()) { + this.getFileList() + .reload() + } + }, + share() { if (this.handlers.share && this.handlers.share(this)) { return |