Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authormerttumer <mert.tumer@collabora.com>2019-02-27 16:33:24 +0300
committermerttumer <mert.tumer@collabora.com>2019-02-27 16:33:24 +0300
commita6019504a26e63b7373c8f5582bf43f03b5b59a2 (patch)
treefe0f4395a8c45c31cf1e3a23c437627a90924b18 /js
parent4214e66e7161a2d157a49fef7ced523f519182df (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.js2
-rw-r--r--js/viewer/viewer.js2
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;