Merge pull request #4 from timar/master

version 1.0.5
pull/1/head
Andras Timar 8 years ago
commit 216b31c917

@ -1,4 +1,4 @@
VERSION=1.0.4
VERSION=1.0.5
.PHONY: dist
dist: owncloud-ccs.spec

@ -143,13 +143,15 @@ class DocumentController extends Controller{
);
}
$content = $view->file_get_contents($path);
// copy; the first user gets a predictable filename so that cloudsuite
// uses the tile cache, others get tempnam
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . 'ccs-' . $fileId;
if (file_exists($filename))
$filename = tempnam(dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH, 'ccs-' . $fileId . '-');
if (file_exists($filename)) {
return array(
'status' => 'success', 'filename' => $filename,
'basename' => basename($filename)
);
}
$content = $view->file_get_contents($path);
file_put_contents($filename, $content);

@ -182,7 +182,7 @@ var documentsMain = {
var viewer = window.location.protocol + '//' + window.location.host + '/cloudsuite/cloudsuite.html?' +
'file_path=' + documentsMain.url +
'&host=' + 'ws://' + window.location.hostname + ':9980' +
'&edit=' + 'false' +
'&permission=' + 'view' +
'&timestamp=' + '';
var frame = '<iframe id="loleafletframe" allowfullscreen style="width:100%;height:100%;position:absolute;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups allow-modals"/>';

@ -92,7 +92,7 @@ var odfViewer = {
var viewer = window.location.protocol + '//' + window.location.host + '/cloudsuite/cloudsuite.html?' +
'file_path=' + context.dir + '/' + filename +
'&host=' + 'ws://' + window.location.hostname + ':9980' +
'&edit=' + 'false' +
'&permission=' + 'view' +
'&timestamp=' + '';
var frame = '<iframe id="loleafletframe" style="width:100%;height:100%;display:block;position:fixed;top:46px;" src="' + viewer + '" sandbox="allow-scripts allow-same-origin allow-popups"/>';

Loading…
Cancel
Save