commit
216b31c917
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
|||||||
VERSION=1.0.4
|
VERSION=1.0.5
|
||||||
|
|
||||||
.PHONY: dist
|
.PHONY: dist
|
||||||
dist: owncloud-ccs.spec
|
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;
|
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . 'ccs-' . $fileId;
|
||||||
if (file_exists($filename))
|
if (file_exists($filename)) {
|
||||||
$filename = tempnam(dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH, 'ccs-' . $fileId . '-');
|
return array(
|
||||||
|
'status' => 'success', 'filename' => $filename,
|
||||||
|
'basename' => basename($filename)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = $view->file_get_contents($path);
|
||||||
|
|
||||||
file_put_contents($filename, $content);
|
file_put_contents($filename, $content);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ var documentsMain = {
|
|||||||
var viewer = window.location.protocol + '//' + window.location.host + '/cloudsuite/cloudsuite.html?' +
|
var viewer = window.location.protocol + '//' + window.location.host + '/cloudsuite/cloudsuite.html?' +
|
||||||
'file_path=' + documentsMain.url +
|
'file_path=' + documentsMain.url +
|
||||||
'&host=' + 'ws://' + window.location.hostname + ':9980' +
|
'&host=' + 'ws://' + window.location.hostname + ':9980' +
|
||||||
'&edit=' + 'false' +
|
'&permission=' + 'view' +
|
||||||
'×tamp=' + '';
|
'×tamp=' + '';
|
||||||
|
|
||||||
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"/>';
|
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?' +
|
var viewer = window.location.protocol + '//' + window.location.host + '/cloudsuite/cloudsuite.html?' +
|
||||||
'file_path=' + context.dir + '/' + filename +
|
'file_path=' + context.dir + '/' + filename +
|
||||||
'&host=' + 'ws://' + window.location.hostname + ':9980' +
|
'&host=' + 'ws://' + window.location.hostname + ':9980' +
|
||||||
'&edit=' + 'false' +
|
'&permission=' + 'view' +
|
||||||
'×tamp=' + '';
|
'×tamp=' + '';
|
||||||
|
|
||||||
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"/>';
|
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…
x
Reference in New Issue
Block a user