Merge pull request #17 from timar/master
remove dead code (from Collabora Online perspective)
This commit is contained in:
commit
fc1126506b
18
Makefile
18
Makefile
@ -1,9 +1,9 @@
|
|||||||
VERSION=1.0.7
|
VERSION=0.9.0
|
||||||
|
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
dist: owncloud-ccs.spec
|
dist: owncloud-collabora-online.spec
|
||||||
rm -rf owncloud-ccs-$(VERSION)
|
rm -rf owncloud-collabora-online-$(VERSION)
|
||||||
mkdir owncloud-ccs-$(VERSION)
|
mkdir owncloud-collabora-online-$(VERSION)
|
||||||
tar cf - *.php \
|
tar cf - *.php \
|
||||||
appinfo \
|
appinfo \
|
||||||
assets \
|
assets \
|
||||||
@ -17,10 +17,10 @@ dist: owncloud-ccs.spec
|
|||||||
l10n \
|
l10n \
|
||||||
lib \
|
lib \
|
||||||
templates \
|
templates \
|
||||||
| ( cd owncloud-ccs-$(VERSION) && tar xf - )
|
| ( cd owncloud-collabora-online-$(VERSION) && tar xf - )
|
||||||
tar cfz owncloud-ccs-$(VERSION).tar.gz owncloud-ccs-$(VERSION)
|
tar cfz owncloud-collabora-online-$(VERSION).tar.gz owncloud-collabora-online-$(VERSION)
|
||||||
rm -rf owncloud-ccs-$(VERSION)
|
rm -rf owncloud-collabora-online-$(VERSION)
|
||||||
|
|
||||||
owncloud-ccs.spec: owncloud-ccs.spec.in Makefile
|
owncloud-collabora-online.spec: owncloud-collabora-online.spec.in Makefile
|
||||||
sed -e 's/@PACKAGE_VERSION@/$(VERSION)/g' <owncloud-ccs.spec.in >owncloud-ccs.spec
|
sed -e 's/@PACKAGE_VERSION@/$(VERSION)/g' <owncloud-collabora-online.spec.in >owncloud-collabora-online.spec
|
||||||
|
|
||||||
|
260
appinfo/app.php
260
appinfo/app.php
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
namespace OCA\Richdocuments\AppInfo;
|
namespace OCA\Richdocuments\AppInfo;
|
||||||
|
|
||||||
use OCA\Richdocuments\Filter\Office;
|
|
||||||
use OCA\Richdocuments\Config;
|
use OCA\Richdocuments\Config;
|
||||||
|
|
||||||
$app = new Application();
|
$app = new Application();
|
||||||
@ -38,7 +37,7 @@ $navigationEntry = function () use ($c) {
|
|||||||
'order' => 2,
|
'order' => 2,
|
||||||
'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('richdocuments.document.index'),
|
'href' => $c->query('ServerContainer')->getURLGenerator()->linkToRoute('richdocuments.document.index'),
|
||||||
'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('richdocuments', 'documents.svg'),
|
'icon' => $c->query('ServerContainer')->getURLGenerator()->imagePath('richdocuments', 'documents.svg'),
|
||||||
'name' => $c->query('L10N')->t('Collabora Online Development Edition')
|
'name' => $c->query('L10N')->t('Collabora Online')
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
$c->getServer()->getNavigationManager()->add($navigationEntry);
|
$c->getServer()->getNavigationManager()->add($navigationEntry);
|
||||||
@ -53,262 +52,5 @@ if (isset($request->server['REQUEST_URI'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($c->query('AppConfig')->isConverterEnabled()){
|
|
||||||
$odtFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.text',
|
|
||||||
'format' => 'odt:writer8',
|
|
||||||
'extension' => 'odt'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/msword',
|
|
||||||
'format' => 'doc',
|
|
||||||
'extension' => 'doc'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$docxFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.text',
|
|
||||||
'format' => 'odt:writer8',
|
|
||||||
'extension' => 'odt'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
||||||
'format' => 'docx',
|
|
||||||
'extension' => 'docx'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$odpFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.presentation',
|
|
||||||
'format' => 'odp',
|
|
||||||
'extension' => 'odp'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.presentation',
|
|
||||||
'format' => 'dop',
|
|
||||||
'extension' => 'odp'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$odsFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.spreadsheet',
|
|
||||||
'format' => 'ods',
|
|
||||||
'extension' => 'ods'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.spreadsheet',
|
|
||||||
'format' => 'ods',
|
|
||||||
'extension' => 'ods'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$odgFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.graphics',
|
|
||||||
'format' => 'odg',
|
|
||||||
'extension' => 'odg'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.graphics',
|
|
||||||
'format' => 'odg',
|
|
||||||
'extension' => 'odg'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$docFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/msword',
|
|
||||||
'format' => 'doc',
|
|
||||||
'extension' => 'doc'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/msword',
|
|
||||||
'format' => 'doc',
|
|
||||||
'extension' => 'doc'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$lwpFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.lotus-wordpro',
|
|
||||||
'format' => 'lwp',
|
|
||||||
'extension' => 'lwp'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.lotus-wordpro',
|
|
||||||
'format' => 'lwp',
|
|
||||||
'extension' => 'lwp'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$svgFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'image/svg+xml',
|
|
||||||
'format' => 'svg',
|
|
||||||
'extension' => 'svg'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'image/svg+xml',
|
|
||||||
'format' => 'svg',
|
|
||||||
'extension' => 'svg'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$potFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-powerpoint',
|
|
||||||
'format' => 'pot',
|
|
||||||
'extension' => 'pot'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-powerpoint',
|
|
||||||
'format' => 'pot',
|
|
||||||
'extension' => 'pot'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$xlaFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-excel',
|
|
||||||
'format' => 'xla',
|
|
||||||
'extension' => 'xla'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-excel',
|
|
||||||
'format' => 'xla',
|
|
||||||
'extension' => 'xla'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$xlaFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-excel',
|
|
||||||
'format' => 'xla',
|
|
||||||
'extension' => 'xla'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.ms-excel',
|
|
||||||
'format' => 'xla',
|
|
||||||
'extension' => 'xla'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$xlsxFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
||||||
'format' => 'xlsx',
|
|
||||||
'extension' => 'xlsx'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
||||||
'format' => 'xlsx',
|
|
||||||
'extension' => 'xlsx'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$vsdFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.visio',
|
|
||||||
'format' => 'vsd',
|
|
||||||
'extension' => 'vsd'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.visio',
|
|
||||||
'format' => 'vsd',
|
|
||||||
'extension' => 'vsd'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$wpdFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.wordperfect',
|
|
||||||
'format' => 'wpd',
|
|
||||||
'extension' => 'wpd'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.wordperfect',
|
|
||||||
'format' => 'wpd',
|
|
||||||
'extension' => 'wpd'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$wpdFilter = new Office(
|
|
||||||
[
|
|
||||||
'read' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.wordperfect',
|
|
||||||
'format' => 'wpd',
|
|
||||||
'extension' => 'wpd'
|
|
||||||
],
|
|
||||||
'write' =>
|
|
||||||
[
|
|
||||||
'target' => 'application/vnd.wordperfect',
|
|
||||||
'format' => 'wpd',
|
|
||||||
'extension' => 'wpd'
|
|
||||||
]
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Listen to delete file signal
|
//Listen to delete file signal
|
||||||
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
|
\OCP\Util::connectHook('OC_Filesystem', 'delete', "OCA\Richdocuments\Storage", "onDelete");
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<info>
|
<info>
|
||||||
<id>richdocuments</id>
|
<id>richdocuments</id>
|
||||||
<name>Collabora Online Development Edition</name>
|
<name>Collabora Online</name>
|
||||||
<description>An ownCloud app to work with office documents</description>
|
<description>An ownCloud app to work with office documents</description>
|
||||||
<licence>AGPL</licence>
|
<licence>AGPL</licence>
|
||||||
<version>0.13.0</version>
|
<version>0.9.0</version>
|
||||||
<author>Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk</author>
|
<author>Collabora Productivity based on work of Frank Karlitschek, Victor Dubiniuk</author>
|
||||||
<bugs>https://www.collaboraoffice.com/</bugs>
|
<bugs>https://github.com/owncloud/richdocuments/issues</bugs>
|
||||||
<repository type="git">git://gerrit.libreoffice.org/online.git</repository>
|
<repository type="git">https://github.com/owncloud/richdocuments.git</repository>
|
||||||
<category>productivity</category>
|
<category>productivity</category>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<owncloud min-version="8.1" max-version="9.0" />
|
<owncloud min-version="8.1" max-version="9.0" />
|
||||||
|
@ -42,8 +42,7 @@ $application->registerRoutes($this, [
|
|||||||
['name' => 'document#wopiPutFile', 'url' => 'wopi/files/{fileId}/contents', 'verb' => 'POST'],
|
['name' => 'document#wopiPutFile', 'url' => 'wopi/files/{fileId}/contents', 'verb' => 'POST'],
|
||||||
//settings
|
//settings
|
||||||
['name' => 'settings#savePersonal', 'url' => 'ajax/personal.php', 'verb' => 'POST'],
|
['name' => 'settings#savePersonal', 'url' => 'ajax/personal.php', 'verb' => 'POST'],
|
||||||
['name' => 'settings#setUnstable', 'url' => 'ajax/config/unstable', 'verb' => 'POST'],
|
['name' => 'settings#setSettings', 'url' => 'ajax/admin.php', 'verb' => 'POST'],
|
||||||
['name' => 'settings#setConverter', 'url' => 'ajax/admin.php', 'verb' => 'POST'],
|
|
||||||
['name' => 'settings#getSupportedMimes', 'url' => 'ajax/mimes.php', 'verb' => 'GET'],
|
['name' => 'settings#getSupportedMimes', 'url' => 'ajax/mimes.php', 'verb' => 'GET'],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
@ -105,7 +105,6 @@ class DocumentController extends Controller{
|
|||||||
$wopiRemote = $this->settings->getAppValue('richdocuments', 'wopi_url');
|
$wopiRemote = $this->settings->getAppValue('richdocuments', 'wopi_url');
|
||||||
$response = new TemplateResponse('richdocuments', 'documents', [
|
$response = new TemplateResponse('richdocuments', 'documents', [
|
||||||
'enable_previews' => $this->settings->getSystemValue('enable_previews', true),
|
'enable_previews' => $this->settings->getSystemValue('enable_previews', true),
|
||||||
'useUnstable' => $this->settings->getAppValue('richdocuments', 'unstable', 'false'),
|
|
||||||
'savePath' => $this->settings->getUserValue($this->uid, 'richdocuments', 'save_path', '/'),
|
'savePath' => $this->settings->getUserValue($this->uid, 'richdocuments', 'save_path', '/'),
|
||||||
'uploadMaxFilesize' => $maxUploadFilesize,
|
'uploadMaxFilesize' => $maxUploadFilesize,
|
||||||
'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize),
|
'uploadMaxHumanFilesize' => \OCP\Util::humanFileSize($maxUploadFilesize),
|
||||||
@ -380,11 +379,9 @@ class DocumentController extends Controller{
|
|||||||
$fullPath = '/files' . $path;
|
$fullPath = '/files' . $path;
|
||||||
$fileInfo = \OC\Files\Filesystem::getFileInfo($path);
|
$fileInfo = \OC\Files\Filesystem::getFileInfo($path);
|
||||||
if ($fileInfo){
|
if ($fileInfo){
|
||||||
if($fileInfo->getMimeType() !== \OCA\Richdocuments\Filter\Office::NATIVE_MIMETYPE){
|
$file = new File($fileInfo->getId());
|
||||||
$file = new File($fileInfo->getId());
|
$genesis = new Genesis($file);
|
||||||
$genesis = new Genesis($file);
|
$fullPath = $genesis->getPath();
|
||||||
$fullPath = $genesis->getPath();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return new DownloadResponse($this->request, $this->uid, $fullPath);
|
return new DownloadResponse($this->request, $this->uid, $fullPath);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@ use \OCP\AppFramework\Http\JSONResponse;
|
|||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
|
||||||
use OCA\Richdocuments\AppConfig;
|
use OCA\Richdocuments\AppConfig;
|
||||||
use OCA\Richdocuments\Converter;
|
|
||||||
use OCA\Richdocuments\Filter;
|
use OCA\Richdocuments\Filter;
|
||||||
|
|
||||||
class SettingsController extends Controller{
|
class SettingsController extends Controller{
|
||||||
@ -64,7 +63,6 @@ class SettingsController extends Controller{
|
|||||||
return new TemplateResponse(
|
return new TemplateResponse(
|
||||||
$this->appName,
|
$this->appName,
|
||||||
'settings',
|
'settings',
|
||||||
[ 'unstable' => $this->appConfig->getAppValue('unstable') ],
|
|
||||||
'blank'
|
'blank'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -77,9 +75,7 @@ class SettingsController extends Controller{
|
|||||||
$this->appName,
|
$this->appName,
|
||||||
'admin',
|
'admin',
|
||||||
[
|
[
|
||||||
'converter' => $this->appConfig->getAppValue('converter'),
|
|
||||||
'wopi_url' => $this->appConfig->getAppValue('wopi_url'),
|
'wopi_url' => $this->appConfig->getAppValue('wopi_url'),
|
||||||
'converter_url' => $this->appConfig->getAppValue('converter_url'),
|
|
||||||
],
|
],
|
||||||
'blank'
|
'blank'
|
||||||
);
|
);
|
||||||
@ -114,61 +110,16 @@ class SettingsController extends Controller{
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUnstable($unstable){
|
public function setSettings($wopi_url){
|
||||||
if (!is_null($unstable)){
|
|
||||||
$this->appConfig->setAppValue('unstable', $unstable);
|
|
||||||
}
|
|
||||||
return array('status' => 'success');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setConverter($converter, $wopi_url, $url){
|
|
||||||
if (!is_null($converter)){
|
|
||||||
$this->appConfig->setAppValue('converter', $converter);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!is_null($wopi_url)){
|
if (!is_null($wopi_url)){
|
||||||
$this->appConfig->setAppValue('wopi_url', $wopi_url);
|
$this->appConfig->setAppValue('wopi_url', $wopi_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($url)){
|
|
||||||
$this->appConfig->setAppValue('converter_url', $url);
|
|
||||||
}
|
|
||||||
|
|
||||||
$response = array(
|
$response = array(
|
||||||
'status' => 'success',
|
'status' => 'success',
|
||||||
'data' => array('message' => (string) $this->l10n->t('Saved'))
|
'data' => array('message' => (string) $this->l10n->t('Saved'))
|
||||||
);
|
);
|
||||||
|
|
||||||
$currentConverter = $this->appConfig->getAppValue('converter');
|
|
||||||
if ($currentConverter == 'external'){
|
|
||||||
if (!Converter::checkConnection()){
|
|
||||||
\OC::$server->getLogger()->warning(
|
|
||||||
'Bad response from Format Filter Server',
|
|
||||||
['app' => $this->appName]
|
|
||||||
);
|
|
||||||
$response = array(
|
|
||||||
'status' => 'error',
|
|
||||||
'data'=>
|
|
||||||
array('message' => (string) $this->l10n->t('Format filter server is down or misconfigured') )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} elseif ($currentConverter === 'local') {
|
|
||||||
try {
|
|
||||||
if (!Converter::testConversion()){
|
|
||||||
$response = array(
|
|
||||||
'status' => 'error',
|
|
||||||
'data'=>
|
|
||||||
array('message' => (string) $this->l10n->t('Conversion failed. Check log for details.') )
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} catch (\Exception $e){
|
|
||||||
$response = array(
|
|
||||||
'status' => 'error',
|
|
||||||
'data'=> array('message' => $e->getMessage())
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,14 +6,9 @@ $(document).ready(function(){
|
|||||||
save : function() {
|
save : function() {
|
||||||
$('#docs_apply').attr('disabled', true);
|
$('#docs_apply').attr('disabled', true);
|
||||||
var data = {
|
var data = {
|
||||||
converter : $('[name="docs_converter"]:checked').val(),
|
|
||||||
wopi_url : $('#wopi_url').val()
|
wopi_url : $('#wopi_url').val()
|
||||||
};
|
};
|
||||||
|
|
||||||
if (data.converter === 'external'){
|
|
||||||
data.url = $('#docs_url').val();
|
|
||||||
}
|
|
||||||
|
|
||||||
OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving...'));
|
OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving...'));
|
||||||
$.post(
|
$.post(
|
||||||
OC.filePath('richdocuments', 'ajax', 'admin.php'),
|
OC.filePath('richdocuments', 'ajax', 'admin.php'),
|
||||||
@ -28,8 +23,5 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
$('#docs_converter_external, #docs_converter_local, #docs_converter_off').on('click', function(){
|
|
||||||
$('#docs_extra').toggle($('[name="docs_converter"]:checked').val() === 'external');
|
|
||||||
});
|
|
||||||
$('#docs_apply').on('click', documentsSettings.save);
|
$('#docs_apply').on('click', documentsSettings.save);
|
||||||
});
|
});
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
$(document).ready(function(){
|
|
||||||
|
|
||||||
var documentsSettings = {
|
|
||||||
save : function() {
|
|
||||||
var data = {
|
|
||||||
unstable : $('#webodf-unstable').attr('checked')==="checked"
|
|
||||||
};
|
|
||||||
$.post(OC.generateUrl('apps/richdocuments/ajax/config/unstable'), data, documentsSettings.afterSave);
|
|
||||||
},
|
|
||||||
afterSave : function(){
|
|
||||||
documentsMain.useUnstable = $('#webodf-unstable').attr('checked')==="checked";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
$('#webodf-unstable').change(documentsSettings.save);
|
|
||||||
});
|
|
@ -16,10 +16,7 @@ use \OCP\IConfig;
|
|||||||
class AppConfig{
|
class AppConfig{
|
||||||
private $appName = 'richdocuments';
|
private $appName = 'richdocuments';
|
||||||
private $defaults = [
|
private $defaults = [
|
||||||
'converter' => 'off',
|
'wopi_url' => 'http://localhost'
|
||||||
'converter_url' => 'http://localhost:16080',
|
|
||||||
'unstable' => 'false',
|
|
||||||
'wopi_url' => 'htpp://localhost'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
private $config;
|
private $config;
|
||||||
@ -28,14 +25,6 @@ use \OCP\IConfig;
|
|||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Can we convert anything to odt?
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function isConverterEnabled(){
|
|
||||||
return $this->getAppValue('converter') !== 'off';
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a value by key
|
* Get a value by key
|
||||||
* @param string $key
|
* @param string $key
|
||||||
|
@ -1,147 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ownCloud - Richdocuments App
|
|
||||||
*
|
|
||||||
* @author Victor Dubiniuk
|
|
||||||
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
|
|
||||||
*
|
|
||||||
* This file is licensed under the Affero General Public License version 3 or
|
|
||||||
* later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace OCA\Richdocuments;
|
|
||||||
|
|
||||||
use OCA\Richdocuments\AppInfo\Application;
|
|
||||||
|
|
||||||
class Converter {
|
|
||||||
|
|
||||||
const TEST_DOC_PATH = '/assets/test.doc';
|
|
||||||
|
|
||||||
public static function testConversion(){
|
|
||||||
$targetFilter = 'odt:writer8';
|
|
||||||
$targetExtension = 'odt';
|
|
||||||
$input = file_get_contents(dirname(__DIR__) . self::TEST_DOC_PATH);
|
|
||||||
$infile = \OC::$server->getTempManager()->getTemporaryFile();
|
|
||||||
$outdir = \OC::$server->getTempManager()->getTemporaryFolder();
|
|
||||||
$outfile = $outdir . '/' . basename($infile) . '.' . $targetExtension;
|
|
||||||
$cmd = Helper::findOpenOffice();
|
|
||||||
|
|
||||||
$params = ' --headless --convert-to ' . escapeshellarg($targetFilter) . ' --outdir '
|
|
||||||
. escapeshellarg($outdir)
|
|
||||||
. ' --writer '. escapeshellarg($infile)
|
|
||||||
. ' -env:UserInstallation=file://'
|
|
||||||
. escapeshellarg(\OC::$server->getTempManager()->getTempBaseDir() . '/owncloud-' . \OC_Util::getInstanceId().'/') . ' 2>&1'
|
|
||||||
;
|
|
||||||
file_put_contents($infile, $input);
|
|
||||||
|
|
||||||
$result = shell_exec($cmd . $params);
|
|
||||||
$exists = file_exists($outfile);
|
|
||||||
|
|
||||||
if (!$exists){
|
|
||||||
\OC::$server->getLogger()->warn(
|
|
||||||
'Conversion test failed. Raw output:' . $result,
|
|
||||||
['app' => 'richdocuments']
|
|
||||||
|
|
||||||
);
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
unlink($outfile);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function convert($input, $targetFilter, $targetExtension){
|
|
||||||
if (self::getAppConfig()->getAppValue('converter') === 'local'){
|
|
||||||
$output = self::convertLocal($input, $targetFilter, $targetExtension);
|
|
||||||
} else {
|
|
||||||
$output = self::convertExternal($input, $targetExtension);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($output)){
|
|
||||||
\OC::$server->getLogger()->warn(
|
|
||||||
'Empty conversion output',
|
|
||||||
['app' => 'richdocuments']
|
|
||||||
|
|
||||||
);
|
|
||||||
throw new \RuntimeException('Empty conversion output');
|
|
||||||
}
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function checkConnection(){
|
|
||||||
$expected = file_get_contents(dirname(__DIR__) . '/assets/response.odt');
|
|
||||||
$converted = self::convertExternal('', 'odt');
|
|
||||||
|
|
||||||
return $converted === $expected;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* convert via openOffice hosted on the same server
|
|
||||||
* @param string $input
|
|
||||||
* @param string $targetFilter
|
|
||||||
* @param string $targetExtension
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected static function convertLocal($input, $targetFilter, $targetExtension){
|
|
||||||
$infile = \OC::$server->getTempManager()->getTemporaryFile();
|
|
||||||
$outdir = \OC::$server->getTempManager()->getTemporaryFolder();
|
|
||||||
$cmd = Helper::findOpenOffice();
|
|
||||||
$params = ' --headless --convert-to ' . $targetFilter . ' --outdir '
|
|
||||||
. escapeshellarg($outdir)
|
|
||||||
. ' --writer '. escapeshellarg($infile)
|
|
||||||
. ' -env:UserInstallation=file://'
|
|
||||||
. escapeshellarg(\OC::$server->getTempManager()->getTempBaseDir() . '/owncloud-' . \OC_Util::getInstanceId().'/')
|
|
||||||
;
|
|
||||||
|
|
||||||
file_put_contents($infile, $input);
|
|
||||||
shell_exec($cmd . $params);
|
|
||||||
$output = file_get_contents($outdir . '/' . basename($infile) . '.' . $targetExtension);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* convert via format-filter-server installed on the same host with openOffice
|
|
||||||
* @param string $input
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected static function convertExternal($input, $targetExtension){
|
|
||||||
$options = array(
|
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
|
||||||
CURLOPT_HEADER => false,
|
|
||||||
CURLOPT_FOLLOWLOCATION => true,
|
|
||||||
CURLOPT_ENCODING => "",
|
|
||||||
CURLOPT_AUTOREFERER => true,
|
|
||||||
CURLOPT_CONNECTTIMEOUT => 120,
|
|
||||||
CURLOPT_TIMEOUT => 120,
|
|
||||||
CURLOPT_MAXREDIRS => 2,
|
|
||||||
CURLOPT_POST => 1,
|
|
||||||
CURLOPT_POSTFIELDS => $input,
|
|
||||||
CURLOPT_SSL_VERIFYHOST => 0,
|
|
||||||
CURLOPT_SSL_VERIFYPEER => 0,
|
|
||||||
CURLOPT_VERBOSE => 1
|
|
||||||
);
|
|
||||||
|
|
||||||
$ch = curl_init(self::getAppConfig()->getAppValue('converter_url') . '?target_format=' . $targetExtension);
|
|
||||||
curl_setopt_array($ch, $options);
|
|
||||||
$content = curl_exec($ch);
|
|
||||||
if (curl_errno($ch)){
|
|
||||||
\OC::$server->getLogger()->debug(
|
|
||||||
'cURL error' . curl_errno($ch) . ':' . curl_error($ch),
|
|
||||||
['app' => 'richdocuments']
|
|
||||||
|
|
||||||
);
|
|
||||||
}
|
|
||||||
curl_close($ch);
|
|
||||||
|
|
||||||
return $content;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static function getAppConfig(){
|
|
||||||
$app = new Application();
|
|
||||||
$c = $app->getContainer();
|
|
||||||
return $c->query('AppConfig');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ownCloud - RichDocuments App
|
|
||||||
*
|
|
||||||
* @author Victor Dubiniuk
|
|
||||||
* @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
|
|
||||||
*
|
|
||||||
* This file is licensed under the Affero General Public License version 3 or
|
|
||||||
* later.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace OCA\Richdocuments\Filter;
|
|
||||||
|
|
||||||
class Office {
|
|
||||||
const NATIVE_MIMETYPE = 'application/vnd.oasis.opendocument.text';
|
|
||||||
|
|
||||||
private $readSpec;
|
|
||||||
private $writeSpec;
|
|
||||||
|
|
||||||
/* sample mimespec
|
|
||||||
array (
|
|
||||||
'read' =>
|
|
||||||
array (
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.text',
|
|
||||||
'format' => 'odt:writer8',
|
|
||||||
'extension' => 'odt'
|
|
||||||
),
|
|
||||||
'write' =>
|
|
||||||
array (
|
|
||||||
'target' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
||||||
'format' => 'docx',
|
|
||||||
'extension' => 'docx'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
array(
|
|
||||||
'read' =>
|
|
||||||
array (
|
|
||||||
'target' => 'application/vnd.oasis.opendocument.text',
|
|
||||||
'format' => 'odt:writer8',
|
|
||||||
'extension' => 'odt'
|
|
||||||
),
|
|
||||||
'write' =>
|
|
||||||
array (
|
|
||||||
'target' => 'application/msword',
|
|
||||||
'format' => 'doc',
|
|
||||||
'extension' => 'doc'
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
public function __construct($mimeSpec){
|
|
||||||
$this->readSpec = $mimeSpec['read'];
|
|
||||||
$this->writeSpec = $mimeSpec['write'];
|
|
||||||
|
|
||||||
\OCA\Richdocuments\Filter::add($mimeSpec['write']['target'], $this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function read($data){
|
|
||||||
return array(
|
|
||||||
'mimetype' => $this->readSpec['target'],
|
|
||||||
'content' =>
|
|
||||||
\OCA\Richdocuments\Converter::convert(
|
|
||||||
$data['content'],
|
|
||||||
$this->readSpec['format'],
|
|
||||||
$this->readSpec['extension']
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function write($data){
|
|
||||||
return array(
|
|
||||||
'mimetype' => $this->writeSpec['target'],
|
|
||||||
'content' =>
|
|
||||||
\OCA\Richdocuments\Converter::convert(
|
|
||||||
$data['content'],
|
|
||||||
$this->writeSpec['format'],
|
|
||||||
$this->writeSpec['extension']
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -26,7 +26,7 @@ class Helper {
|
|||||||
|
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getArrayValueByKey($array, $key, $default=''){
|
public static function getArrayValueByKey($array, $key, $default=''){
|
||||||
if (array_key_exists($key, $array)){
|
if (array_key_exists($key, $array)){
|
||||||
return $array[$key];
|
return $array[$key];
|
||||||
@ -141,39 +141,5 @@ class Helper {
|
|||||||
$dB = str_pad(dechex(round($dB)), 2, "0", STR_PAD_LEFT);
|
$dB = str_pad(dechex(round($dB)), 2, "0", STR_PAD_LEFT);
|
||||||
return $dR.$dG.$dB;
|
return $dR.$dG.$dB;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function findOpenOffice(){
|
|
||||||
$config = \OC::$server->getConfig();
|
|
||||||
$cmd = '';
|
|
||||||
if (is_string($config->getSystemValue('preview_libreoffice_path', null))){
|
|
||||||
$cmd = $config->getSystemValue('preview_libreoffice_path', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
$whichLibreOffice = shell_exec('which libreoffice');
|
|
||||||
if ($cmd === '' && !empty($whichLibreOffice)){
|
|
||||||
$cmd = 'libreoffice';
|
|
||||||
}
|
|
||||||
|
|
||||||
$whichOpenOffice = shell_exec('which openoffice');
|
|
||||||
if ($cmd === '' && !empty($whichOpenOffice)){
|
|
||||||
$cmd = 'openoffice';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($cmd)){
|
|
||||||
\OC::$server->getLogger()->warn(
|
|
||||||
'Pure configuration issue. Missing open office binary that is mandatory for conversion.',
|
|
||||||
['app' => 'richdocuments']
|
|
||||||
|
|
||||||
);
|
|
||||||
\OC::$server->getLogger()->debug(
|
|
||||||
'If openoffice or libreoffice is already installed please specify the path to it using preview_libreoffice_path config. Refer to admin manual for details.',
|
|
||||||
['app' => 'richdocuments']
|
|
||||||
|
|
||||||
);
|
|
||||||
throw new \RuntimeException('Missing open office binary that is mandatory for conversion.');
|
|
||||||
}
|
|
||||||
|
|
||||||
return $cmd;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package owncloud-ccs
|
# spec file for package owncloud-collabora-online
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 Collabora
|
# Copyright (c) 2015 Collabora
|
||||||
#
|
#
|
||||||
@ -15,13 +15,13 @@
|
|||||||
|
|
||||||
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
|
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
|
||||||
|
|
||||||
Name: owncloud-ccs
|
Name: owncloud-collabora-online
|
||||||
Version: @PACKAGE_VERSION@
|
Version: @PACKAGE_VERSION@
|
||||||
Release: 0
|
Release: 0
|
||||||
Vendor: Collabora
|
Vendor: Collabora
|
||||||
Summary: Collabora CloudSuite plugin for ownCloud
|
Summary: Collabora CloudSuite plugin for ownCloud
|
||||||
License: MPL
|
License: MPL
|
||||||
Source0: owncloud-ccs-@PACKAGE_VERSION@.tar.gz
|
Source0: owncloud-collabora-online-@PACKAGE_VERSION@.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
Requires: owncloud
|
Requires: owncloud
|
||||||
Requires: loolwsd
|
Requires: loolwsd
|
@ -1,81 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copies the needed files from the build dir of the WebODF pullbox branch
|
|
||||||
#
|
|
||||||
# Prepare the webodf build dir by calling: make webodf-debug.js-target editor-compiled.js-target
|
|
||||||
|
|
||||||
if [ ! -e "README.md" ]; then
|
|
||||||
echo "Call me in the toplevel dir of OwnCloud Documents."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
|
||||||
echo "Usage : $0 prepare|copy|patch"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
WEBODF_BUILDDIR='build/'
|
|
||||||
WEBODF_SRCDIR='webodf/'
|
|
||||||
|
|
||||||
# create folders
|
|
||||||
function prepare(){
|
|
||||||
if [ ! -d "$WEBODF_SRCDIR" ]; then
|
|
||||||
git clone git@github.com:kogmbh/WebODF.git "$WEBODF_SRCDIR"
|
|
||||||
else
|
|
||||||
pushd "$WEBODF_SRCDIR"
|
|
||||||
git pull --rebase
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "$WEBODF_BUILDDIR" ]; then
|
|
||||||
mkdir "$WEBODF_BUILDDIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
pushd "$WEBODF_BUILDDIR"
|
|
||||||
cmake "../${WEBODF_SRCDIR}"
|
|
||||||
make all webodf-debug.js-target build-wodocollabtexteditor
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
# copy sources
|
|
||||||
function copy_sources(){
|
|
||||||
# webodf.js
|
|
||||||
cp "$WEBODF_BUILDDIR"/webodf/webodf.js ./js/3rdparty/webodf
|
|
||||||
cp "$WEBODF_BUILDDIR"/webodf/webodf-debug.js ./js/3rdparty/webodf
|
|
||||||
# dojo
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/dojo-amalgamation.js ./js/3rdparty/webodf
|
|
||||||
|
|
||||||
# Tools, Editor, EditorSession, MemberListView:
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/{Tools,Editor,EditorSession,MemberListView}.js ./js/3rdparty/webodf/editor
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/backend/pullbox/* ./js/3rdparty/webodf/editor/backend/pullbox -R
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/backend/ServerFactory.js ./js/3rdparty/webodf/editor/backend -R
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/widgets ./js/3rdparty/webodf/editor -R
|
|
||||||
cp "$WEBODF_BUILDDIR"/wodocollabtexteditor/wodo/{wodotexteditor,wodocollabpane}.css ./css/3rdparty/webodf
|
|
||||||
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/dojo/* ./js/3rdparty/resources/dojo -R
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/dojox/* ./js/3rdparty/resources/dojox -R
|
|
||||||
cp "$WEBODF_BUILDDIR"/programs/editor/dijit/* ./js/3rdparty/resources/dijit -R
|
|
||||||
|
|
||||||
# files which need to be adapted manually:
|
|
||||||
# "$WEBODF_BUILDDIR"/programs/editor/dojo-deps/src/app/resources/app.css -> ./css/3rdparty/webodf/dojo-app.css
|
|
||||||
# dojo-app.css has other paths then upstream, needs to be manually adapted to changes
|
|
||||||
# also is dojo.css is not imported here, other than in upstream
|
|
||||||
}
|
|
||||||
|
|
||||||
# patches against upstream
|
|
||||||
function patch_sources(){
|
|
||||||
patch -p1 -i src/patches/Patch-EditorSession.patch
|
|
||||||
patch -p1 -i src/patches/Patch-MemberListView.patch
|
|
||||||
patch -p1 -i src/patches/Patch-Tools.patch
|
|
||||||
|
|
||||||
#Just for the record
|
|
||||||
#patch -p1 -i src/patches/dojoStylesPill.patch
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
'prepare' )
|
|
||||||
prepare ;;
|
|
||||||
'copy' )
|
|
||||||
copy_sources ;;
|
|
||||||
'patch' )
|
|
||||||
patch_sources ;;
|
|
||||||
esac
|
|
@ -1,43 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
script('richdocuments', 'admin');
|
script('richdocuments', 'admin');
|
||||||
?>
|
?>
|
||||||
<div class="section" id="documents">
|
<div class="section" id="richdocuments">
|
||||||
<h2><?php p($l->t('Documents')) ?></h2>
|
<h2><?php p($l->t('Collabora Online')) ?></h2>
|
||||||
<p><?php p($l->t('MS Word support (requires openOffice/libreOffice)')) ?></p>
|
|
||||||
<p>
|
|
||||||
<input type="radio" name="docs_converter" value="local" id="docs_converter_local"
|
|
||||||
<?php print_unescaped($_['converter']=='local' ? 'checked="checked"' : '') ?>
|
|
||||||
/>
|
|
||||||
<label for="docs_converter_local"><?php p($l->t('Local')) ?></label><br>
|
|
||||||
<em><?php p($l->t('openOffice/libreOffice is installed on this server. Path to binary is provided via preview_libreoffice_path in config.php')) ?></em>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input type="radio" name="docs_converter" value="external" id="docs_converter_external"
|
|
||||||
<?php print_unescaped($_['converter']=='external' ? 'checked="checked"' : '') ?>
|
|
||||||
/>
|
|
||||||
<label for="docs_converter_external"><?php p($l->t('External')) ?></label><br>
|
|
||||||
<em><?php p($l->t('openOffice/libreOffice is installed on external server running a format filter server')) ?></em>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input type="radio" name="docs_converter" value="off" id="docs_converter_off"
|
|
||||||
<?php print_unescaped($_['converter']=='off' ? 'checked="checked"' : '') ?>
|
|
||||||
/>
|
|
||||||
<label for="docs_converter_off"><?php p($l->t('Disabled')) ?></label><br>
|
|
||||||
<em><?php p($l->t('No MS Word support')) ?></em>
|
|
||||||
</p>
|
|
||||||
<div id="docs_extra" <?php print_unescaped($_['converter']!=='external' ? 'style="display:none"' : '') ?>>
|
|
||||||
<input type="text" name="docs_url" id="docs_url"
|
|
||||||
value="<?php p($_['converter_url'])?>"
|
|
||||||
original-title="<?php p($l->t('scheme://domain.tld[:port]')) ?>"
|
|
||||||
style="width:250px;"
|
|
||||||
/>
|
|
||||||
<br /><em><?php p($l->t('Server URL')) ?></em>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div id="wopi_client">
|
<div id="wopi_client">
|
||||||
<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:250px;">
|
||||||
<br /><em><?php p($l->t('WOPI Client')) ?></em>
|
<br /><em><?php p($l->t('WOPI Client')) ?></em>
|
||||||
</div>
|
</div>
|
||||||
<br /><button type="button" id="docs_apply"><?php p($l->t('Apply and test')) ?></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>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,7 +51,6 @@ script('files', 'jquery.fileupload');
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="wopi-url" name="wopi-url" value="<?php p($_['wopi_url']) ?>" />
|
<input type="hidden" id="wopi-url" name="wopi-url" value="<?php p($_['wopi_url']) ?>" />
|
||||||
<input type="hidden" id="webodf-unstable" value="<?php p($_['useUnstable']) ?>" />
|
|
||||||
<?php if ($_['enable_previews']): ?>
|
<?php if ($_['enable_previews']): ?>
|
||||||
<input type="hidden" id="previews_enabled" value="<?php p($_['enable_previews']) ?>" />
|
<input type="hidden" id="previews_enabled" value="<?php p($_['enable_previews']) ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
script('richdocuments', 'personal');
|
script('richdocuments', 'personal');
|
||||||
?>
|
?>
|
||||||
<div class="section" id="documents-personal">
|
<div class="section" id="richdocuments-personal">
|
||||||
<h2><?php p($l->t('Documents')); ?></h2>
|
<h2><?php p($l->t('Collabora Online')); ?></h2>
|
||||||
<div>
|
<div>
|
||||||
<label for="documents-default-path"><?php p($l->t('Save new documents to')) ?></label>
|
<label for="documents-default-path"><?php p($l->t('Save new documents to')) ?></label>
|
||||||
<input type="text" id="documents-default-path" value="<?php p($_['save_path']) ?>" /><span class="msg"></span>
|
<input type="text" id="documents-default-path" value="<?php p($_['save_path']) ?>" /><span class="msg"></span>
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
<?php
|
|
||||||
script('richdocuments', 'settings');
|
|
||||||
?>
|
|
||||||
<div id="documents" class="section">
|
|
||||||
<h2><?php p($l->t('Documents')) ?></h2>
|
|
||||||
<input id="webodf-unstable" type ="checkbox"
|
|
||||||
<?php if ($_['unstable'] === 'true'){ ?>
|
|
||||||
checked="checked"
|
|
||||||
<?php } ?>
|
|
||||||
/>
|
|
||||||
<label for="webodf-unstable">
|
|
||||||
<?php p($l->t('Advanced feature-set'))?>
|
|
||||||
<?php p($l->t('(Unstable)')); ?>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
@ -5,7 +5,7 @@
|
|||||||
timeoutForMediumTests="900"
|
timeoutForMediumTests="900"
|
||||||
timeoutForLargeTests="900"
|
timeoutForLargeTests="900"
|
||||||
>
|
>
|
||||||
<testsuite name='ownCloud - Documents App Tests'>
|
<testsuite name='ownCloud - Richdocuments App Tests'>
|
||||||
<directory suffix='test.php'>.</directory>
|
<directory suffix='test.php'>.</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<!-- filters for code coverage -->
|
<!-- filters for code coverage -->
|
||||||
@ -22,4 +22,4 @@
|
|||||||
<!-- and this is where your report will be written -->
|
<!-- and this is where your report will be written -->
|
||||||
<log type="coverage-clover" target="./clover.xml"/>
|
<log type="coverage-clover" target="./clover.xml"/>
|
||||||
</logging>
|
</logging>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user