From 595e7f31091fa1aebc8c55affd4c32949e127064 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Wed, 18 May 2016 10:58:38 +0200 Subject: [PATCH 1/3] wider text box for WOPI URL --- templates/admin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin.php b/templates/admin.php index ee99f77c..869bd728 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -4,7 +4,7 @@ script('richdocuments', 'admin');

t('Collabora Online')) ?>

- +
t('URL (and port) of the Collabora Online server that provides the editing functionality as a WOPI client.')) ?>
From e22151a2b5621510762ee1e5287ffa5419376964 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 29 May 2016 00:16:27 +0200 Subject: [PATCH 2/3] Pass the lang paramater to loleaflet from ownCloud user settings, which controls UI language --- controller/documentcontroller.php | 4 +++- js/documents.js | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/controller/documentcontroller.php b/controller/documentcontroller.php index ff8e3b91..d0f4d37a 100644 --- a/controller/documentcontroller.php +++ b/controller/documentcontroller.php @@ -256,7 +256,8 @@ class DocumentController extends Controller { $response = array( 'status' => 'success', 'fileid' => $info['fileid'], - 'urlsrc' => $this->getWopiSrcUrl($discovery_parsed, $mimetype, 'edit') + 'urlsrc' => $this->getWopiSrcUrl($discovery_parsed, $mimetype, 'edit'), + 'lolang' => $this->settings->getUserValue($this->uid, 'core', 'lang', 'en') ); } else { $response = array( @@ -471,6 +472,7 @@ class DocumentController extends Controller { $documents[$key]['icon'] = preg_replace('/\.png$/', '.svg', \OCP\Template::mimetype_icon($document['mimetype'])); $documents[$key]['hasPreview'] = \OC::$server->getPreviewManager()->isMimeSupported($document['mimetype']); $documents[$key]['urlsrc'] = $this->getWopiSrcUrl($discovery_parsed, $document['mimetype'], 'edit'); + $documents[$key]['lolang'] = strtolower(str_replace('_', '-', $this->settings->getUserValue($this->uid, 'core', 'lang', 'en'))); $fileIds[] = $document['fileid']; } diff --git a/js/documents.js b/js/documents.js index 28157242..cb524131 100644 --- a/js/documents.js +++ b/js/documents.js @@ -32,6 +32,7 @@ $.widget('oc.documentGrid', { .attr('title', document.path) .attr('original-title', document.path) .attr('urlsrc', document.urlsrc) + .attr('lolang', document.lolang) .find('label').text(document.name) ; @@ -234,6 +235,7 @@ var documentsMain = { var urlsrc = $('li[data-id='+ documentsMain.fileId +']>a').attr('urlsrc') + "WOPISrc=" + wopisrc + "&title=" + encodeURIComponent(title) + + "&lang=" + $('li[data-id='+ documentsMain.fileId +']>a').attr('lolang') + "&closebutton=1"; // access_token - must be passed via a form post @@ -466,6 +468,7 @@ var documentsMain = { if (response && response.fileid){ docElem.attr('data-id', response.fileid); docElem.find('a').attr('urlsrc', response.urlsrc); + docElem.find('a').attr('lolang', response.lolang); documentsMain.prepareSession(); documentsMain.joinSession(response.fileid); } else { From 65ddb5f40bc72127e7a49c9d9430d16e555feb9d Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Sun, 29 May 2016 00:20:10 +0200 Subject: [PATCH 3/3] Bump version to 0.15.2 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f5cdefd9..d6ce8b60 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=0.15.1 +VERSION=0.15.2 .PHONY: dist dist: owncloud-collabora-online.spec info.xml