diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-08-21 17:41:42 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-10-13 15:36:53 +0300 |
commit | 1ba3a26db57c51cd9f80f4c10d2cf7150bcede10 (patch) | |
tree | d6b6d5a538c97c54dde4a1b07b93ff57d0572f96 /src/view/NewFileMenu.js | |
parent | c271e3f06efc169c1e04032d0d042e81d45723d0 (diff) |
Add preload and createNewFile handlers
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/view/NewFileMenu.js')
-rw-r--r-- | src/view/NewFileMenu.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/view/NewFileMenu.js b/src/view/NewFileMenu.js index 5a6cb3a5..b5dc2f22 100644 --- a/src/view/NewFileMenu.js +++ b/src/view/NewFileMenu.js @@ -102,11 +102,14 @@ const NewFileMenu = { function(response) { if (response && response.status === 'success') { FileList.add(response.data, { animate: false, scrollTo: false }) + const fileModel = FileList.getModelForFile(filename) const path = document.getElementById('dir').value + '/' + filename OCA.RichDocuments.openWithTemplate({ fileId: -1, path, - templateId: templateId + templateId: templateId, + fileList: window.FileList, + fileModel }) } else { OC.dialogs.alert(response.data.message, t('core', 'Could not create file')) |