commit
fdcd865244
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION=0.15.1
|
VERSION=0.15.2
|
||||||
|
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
dist: owncloud-collabora-online.spec info.xml
|
dist: owncloud-collabora-online.spec info.xml
|
||||||
|
@ -256,7 +256,8 @@ class DocumentController extends Controller {
|
|||||||
$response = array(
|
$response = array(
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'fileid' => $info['fileid'],
|
'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 {
|
} else {
|
||||||
$response = array(
|
$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]['icon'] = preg_replace('/\.png$/', '.svg', \OCP\Template::mimetype_icon($document['mimetype']));
|
||||||
$documents[$key]['hasPreview'] = \OC::$server->getPreviewManager()->isMimeSupported($document['mimetype']);
|
$documents[$key]['hasPreview'] = \OC::$server->getPreviewManager()->isMimeSupported($document['mimetype']);
|
||||||
$documents[$key]['urlsrc'] = $this->getWopiSrcUrl($discovery_parsed, $document['mimetype'], 'edit');
|
$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'];
|
$fileIds[] = $document['fileid'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@ $.widget('oc.documentGrid', {
|
|||||||
.attr('title', document.path)
|
.attr('title', document.path)
|
||||||
.attr('original-title', document.path)
|
.attr('original-title', document.path)
|
||||||
.attr('urlsrc', document.urlsrc)
|
.attr('urlsrc', document.urlsrc)
|
||||||
|
.attr('lolang', document.lolang)
|
||||||
.find('label').text(document.name)
|
.find('label').text(document.name)
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -234,6 +235,7 @@ var documentsMain = {
|
|||||||
var urlsrc = $('li[data-id='+ documentsMain.fileId +']>a').attr('urlsrc') +
|
var urlsrc = $('li[data-id='+ documentsMain.fileId +']>a').attr('urlsrc') +
|
||||||
"WOPISrc=" + wopisrc +
|
"WOPISrc=" + wopisrc +
|
||||||
"&title=" + encodeURIComponent(title) +
|
"&title=" + encodeURIComponent(title) +
|
||||||
|
"&lang=" + $('li[data-id='+ documentsMain.fileId +']>a').attr('lolang') +
|
||||||
"&closebutton=1";
|
"&closebutton=1";
|
||||||
|
|
||||||
// access_token - must be passed via a form post
|
// access_token - must be passed via a form post
|
||||||
@ -466,6 +468,7 @@ var documentsMain = {
|
|||||||
if (response && response.fileid){
|
if (response && response.fileid){
|
||||||
docElem.attr('data-id', response.fileid);
|
docElem.attr('data-id', response.fileid);
|
||||||
docElem.find('a').attr('urlsrc', response.urlsrc);
|
docElem.find('a').attr('urlsrc', response.urlsrc);
|
||||||
|
docElem.find('a').attr('lolang', response.lolang);
|
||||||
documentsMain.prepareSession();
|
documentsMain.prepareSession();
|
||||||
documentsMain.joinSession(response.fileid);
|
documentsMain.joinSession(response.fileid);
|
||||||
} else {
|
} else {
|
||||||
|
@ -4,7 +4,7 @@ script('richdocuments', 'admin');
|
|||||||
<div class="section" id="richdocuments">
|
<div class="section" id="richdocuments">
|
||||||
<h2><?php p($l->t('Collabora Online')) ?></h2>
|
<h2><?php p($l->t('Collabora Online')) ?></h2>
|
||||||
<label for="wopi_url"><?php p($l->t('Collabora Online server')) ?></label>
|
<label for="wopi_url"><?php p($l->t('Collabora Online server')) ?></label>
|
||||||
<input type="text" name="wopi_url" id="wopi_url" value="<?php p($_['wopi_url'])?>" style="width:250px;">
|
<input type="text" name="wopi_url" id="wopi_url" value="<?php p($_['wopi_url'])?>" style="width:300px;">
|
||||||
<br /><em><?php p($l->t('URL (and port) of the Collabora Online server that provides the editing functionality as a WOPI client.')) ?></em>
|
<br /><em><?php p($l->t('URL (and port) of the Collabora Online server that provides the editing functionality as a WOPI client.')) ?></em>
|
||||||
<br /><button type="button" id="docs_apply"><?php p($l->t('Apply')) ?></button>
|
<br /><button type="button" id="docs_apply"><?php p($l->t('Apply')) ?></button>
|
||||||
<span id="documents-admin-msg" class="msg"></span>
|
<span id="documents-admin-msg" class="msg"></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user