Merge branch 'seeddms-4.3.x' into seeddms-5.0.x

This commit is contained in:
Uwe Steinmann 2016-11-08 11:39:02 +01:00
commit 2ed68b22d2
9 changed files with 30 additions and 9 deletions

View File

@ -1,5 +1,5 @@
VERSION=5.0.7
SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install restapi
VERSION=5.0.8
SRC=CHANGELOG inc conf utils index.php languages views op out controllers doc drop-tables-innodb.sql styles js TODO LICENSE Makefile webdav install restapi pdfviewer
# webapp
EXTENSIONS := \

View File

@ -328,7 +328,7 @@ class SeedDMS_Core_DMS {
$this->callbacks = array();
$this->version = '@package_version@';
if($this->version[0] == '@')
$this->version = '5.0.7';
$this->version = '5.0.8';
} /* }}} */
/**

View File

@ -28,9 +28,15 @@ add new previewer which converts document to pdf instead of png
<contents>
<dir baseinstalldir="SeedDMS" name="/">
<dir name="Preview">
<file name="Base.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="Previewer.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file name="PdfPreviewer.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir> <!-- /Lucene -->
<dir name="tests">
</dir> <!-- /tests -->

View File

@ -20,7 +20,7 @@
class SeedDMS_Version {
public $_number = "5.0.7";
public $_number = "5.0.8";
private $_string = "SeedDMS";
function __construct() {

View File

@ -118,7 +118,7 @@ function fileExistsInIncludePath($file) { /* {{{ */
* Load default settings + set
*/
define("SEEDDMS_INSTALL", "on");
define("SEEDDMS_VERSION", "5.0.7");
define("SEEDDMS_VERSION", "5.0.8");
require_once('../inc/inc.ClassSettings.php');

View File

@ -461,7 +461,7 @@ $(document).ready( function() {
function onAddClipboard(ev) { /* {{{ */
ev.preventDefault();
var source_info = JSON.parse(e.originalEvent.dataTransfer.getData("text"));
var source_info = JSON.parse(ev.originalEvent.dataTransfer.getData("text"));
source_type = source_info.type;
source_id = source_info.id;
formtoken = source_info.formtoken;
@ -698,6 +698,7 @@ $(document).ready(function() {
attr_rel = $(e.currentTarget).attr('rel');
target_type = attr_rel.split("_")[0];
target_id = attr_rel.split("_")[1];
console.log(e.originalEvent.dataTransfer.getData("text"));
var source_info = JSON.parse(e.originalEvent.dataTransfer.getData("text"));
source_type = source_info.type;
source_id = source_info.id;

View File

@ -62,6 +62,12 @@ class SeedDMS_View_DocumentVersionDetail extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.Download.php?documentid='.$document->getID().'&version='.$version->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default:

View File

@ -53,7 +53,9 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
} /* }}} */
function js() { /* {{{ */
header('Content-Type: application/javascript');
header('Content-Type: application/javascript; charset=UTF-8');
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
$this->printFolderChooserJs("form1");
$this->printDeleteFolderButtonJs();
@ -478,7 +480,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
else
$comment = htmlspecialchars($document->getComment());
if (strlen($comment) > 150) $comment = substr($comment, 0, 147) . "...";
print "<tr id=\"table-row-document-".$document->getID()."\">";
print "<tr id=\"table-row-document-".$document->getID()."\" class=\"table-row-document\" rel=\"document_".$document->getID()."\" formtoken=\"".createFormKey('movedocument')."\" draggable=\"true\">";
//print "<td><img src=\"../out/images/file.gif\" class=\"mimeicon\"></td>";
if (in_array(2, $searchin)) {
$docName = $this->markQuery(htmlspecialchars($document->getName()), "i");
@ -564,7 +566,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
} else {
$folderName = htmlspecialchars($folder->getName());
}
print "<tr id=\"table-row-folder-".$folder->getID()."\" rel=\"folder_".$folder->getID()."\" class=\"folder\" ondragover=\"allowDrop(event)\" ondrop=\"onDrop(event)\">";
print "<tr id=\"table-row-folder-".$folder->getID()."\" draggable=\"true\" rel=\"folder_".$folder->getID()."\" class=\"folder table-row-folder\" formtoken=\"".createFormKey('movefolder')."\">";
print "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\"><img src=\"".$this->imgpath."folder.png\" width=\"24\" height=\"24\" border=0></a></td>";
print "<td><a class=\"standardText\" href=\"../out/out.ViewFolder.php?folderid=".$folder->getID()."\">";
$path = $folder->getPath();

View File

@ -191,6 +191,12 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.Download.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default: