diff options
author | merttumer <mert.tumer@collabora.com> | 2019-02-27 16:33:24 +0300 |
---|---|---|
committer | merttumer <mert.tumer@collabora.com> | 2019-02-27 16:33:24 +0300 |
commit | a6019504a26e63b7373c8f5582bf43f03b5b59a2 (patch) | |
tree | fe0f4395a8c45c31cf1e3a23c437627a90924b18 /js | |
parent | 4214e66e7161a2d157a49fef7ced523f519182df (diff) |
Fix template preview when creating documents and upload template on settings
Signed-off-by: merttumer <mert.tumer@collabora.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/admin.js | 2 | ||||
-rw-r--r-- | js/viewer/viewer.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/js/admin.js b/js/admin.js index f70dd93a..dc85c314 100644 --- a/js/admin.js +++ b/js/admin.js @@ -338,7 +338,7 @@ function initTemplateManager() { // fileupload plugin $('#richdocuments-templates').fileupload({ dataType: 'json', - url: OC.generateUrl(OC.linkTo('richdocuments', 'template')), + url: OC.generateUrl('apps/richdocuments/template'), type: 'POST', add: function (e, data) { diff --git a/js/viewer/viewer.js b/js/viewer/viewer.js index 01a4933c..ef0f35cf 100644 --- a/js/viewer/viewer.js +++ b/js/viewer/viewer.js @@ -361,7 +361,7 @@ var odfViewer = { var self = this; var template = dlg.querySelector('.template-model').cloneNode(true); template.className = ''; - template.querySelector('img').src = data.preview; + template.querySelector('img').src = OC.generateUrl('apps/richdocuments/template/preview/'+data.id); template.querySelector('h2').textContent = data.name; template.onclick = function() { dlg.dataset.templateId = data.id; |