mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
a870602324
|
@ -127,6 +127,10 @@
|
||||||
- add section in README.Install.md on how to secure the configuration
|
- add section in README.Install.md on how to secure the configuration
|
||||||
- fix php error when removing a version of a document
|
- fix php error when removing a version of a document
|
||||||
- major rework of ViewFolder page, most parts of the page are now loaded by ajax
|
- major rework of ViewFolder page, most parts of the page are now loaded by ajax
|
||||||
|
- do not set mandatory reviewer when document is uploaded and workflow mode is
|
||||||
|
set to 'traditional without review'.
|
||||||
|
- turn off auto complete for date fields
|
||||||
|
- new hook pageNavigationBar
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.12
|
Changes in version 5.1.12
|
||||||
|
|
|
@ -1796,6 +1796,8 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
$version = $resArr[0]['m']+1;
|
$version = $resArr[0]['m']+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($fileType == '.')
|
||||||
|
$fileType = '';
|
||||||
$filesize = SeedDMS_Core_File::fileSize($tmpFile);
|
$filesize = SeedDMS_Core_File::fileSize($tmpFile);
|
||||||
$checksum = SeedDMS_Core_File::checksum($tmpFile);
|
$checksum = SeedDMS_Core_File::checksum($tmpFile);
|
||||||
|
|
||||||
|
@ -1968,6 +1970,9 @@ class SeedDMS_Core_Document extends SeedDMS_Core_Object { /* {{{ */
|
||||||
if(!$content)
|
if(!$content)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if($fileType == '.')
|
||||||
|
$fileType = '';
|
||||||
|
|
||||||
/* Check if $user, $orgFileName, $fileType and $mimetype are the same */
|
/* Check if $user, $orgFileName, $fileType and $mimetype are the same */
|
||||||
if($user->getID() != $content->getUser()->getID()) {
|
if($user->getID() != $content->getUser()->getID()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -3146,20 +3151,31 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Recalculate the status of a document
|
* Recalculate the status of a document
|
||||||
|
*
|
||||||
* The methods checks the review and approval status and sets the
|
* The methods checks the review and approval status and sets the
|
||||||
* status of the document accordingly.
|
* status of the document accordingly.
|
||||||
* If status is S_RELEASED and version has workflow set status
|
*
|
||||||
* to S_IN_WORKFLOW
|
* If status is S_RELEASED and the version has a workflow, then set
|
||||||
* If status is S_RELEASED and there are reviewers set status S_DRAFT_REV
|
* the status to S_IN_WORKFLOW
|
||||||
* If status is S_RELEASED or S_DRAFT_REV and there are approvers set
|
* If status is S_RELEASED and there are reviewers => set status S_DRAFT_REV
|
||||||
|
* If status is S_RELEASED or S_DRAFT_REV and there are approvers => set
|
||||||
* status S_DRAFT_APP
|
* status S_DRAFT_APP
|
||||||
* If status is draft and there are no approver and no reviewers set
|
* If status is draft and there are no approver and no reviewers => set
|
||||||
* status to S_RELEASED
|
* status to S_RELEASED
|
||||||
* The status of a document with the current status S_OBSOLETE, S_REJECTED,
|
* The status of a document with the current status S_OBSOLETE, S_REJECTED,
|
||||||
* or S_EXPIRED will not be changed unless the parameter
|
* or S_EXPIRED will not be changed unless the parameter
|
||||||
* $ignorecurrentstatus is set to true.
|
* $ignorecurrentstatus is set to true.
|
||||||
|
*
|
||||||
|
* This method may not be called after a negative approval or review to
|
||||||
|
* recalculated the status, because
|
||||||
|
* it doesn't take a defeating approval or review into account. It will
|
||||||
|
* just check for a pending workflow, approval or review and set the status
|
||||||
|
* accordingly, e.g. after the list of reviewers or appovers has been
|
||||||
|
* modified. If there is not pending workflow, approval or review the
|
||||||
|
* status will be set to S_RELEASED.
|
||||||
|
*
|
||||||
* This method will call {@see SeedDMS_Core_DocumentContent::setStatus()}
|
* This method will call {@see SeedDMS_Core_DocumentContent::setStatus()}
|
||||||
* which checks if the state has actually changed. This is, why this
|
* which checks if the status has actually changed. This is, why this
|
||||||
* function can be called at any time without harm to the status log.
|
* function can be called at any time without harm to the status log.
|
||||||
* The $initialstatus can be set, to define the status set when no other
|
* The $initialstatus can be set, to define the status set when no other
|
||||||
* status is set. This happens if the document has no
|
* status is set. This happens if the document has no
|
||||||
|
@ -3226,7 +3242,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* First check for an open review, approval, revision. */
|
/* First check for a running workflow, review, approval, revision. */
|
||||||
if ($hasworkflow) $this->setStatus(S_IN_WORKFLOW,$msg,$user);
|
if ($hasworkflow) $this->setStatus(S_IN_WORKFLOW,$msg,$user);
|
||||||
elseif ($pendingReview) $this->setStatus(S_DRAFT_REV,$msg,$user);
|
elseif ($pendingReview) $this->setStatus(S_DRAFT_REV,$msg,$user);
|
||||||
elseif ($pendingApproval) $this->setStatus(S_DRAFT_APP,$msg,$user);
|
elseif ($pendingApproval) $this->setStatus(S_DRAFT_APP,$msg,$user);
|
||||||
|
@ -3331,7 +3347,16 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */
|
||||||
return $this->_user;
|
return $this->_user;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getPath() { return $this->_document->getDir() . $this->_version . $this->_fileType; }
|
/**
|
||||||
|
* Return path of file on disk relative to the content directory
|
||||||
|
*
|
||||||
|
* Since version 5.1.13 a single '.' in the fileType will be skipped.
|
||||||
|
* On Windows a file named 'name.' will be saved as 'name' but the fileType
|
||||||
|
* will contain the a single '.'.
|
||||||
|
*
|
||||||
|
* @return string path of file on disc
|
||||||
|
*/
|
||||||
|
function getPath() { return $this->_document->getDir() . $this->_version . ($this->_fileType != '.' ? $this->_fileType : ''); }
|
||||||
|
|
||||||
function setRevisionDate($date = false) { /* {{{ */
|
function setRevisionDate($date = false) { /* {{{ */
|
||||||
$db = $this->_document->_dms->getDB();
|
$db = $this->_document->_dms->getDB();
|
||||||
|
|
|
@ -80,11 +80,10 @@ a revision can also be started if some revisors have already reviewed the docume
|
||||||
<file name="inc.ClassWorkflow.php" role="php">
|
<file name="inc.ClassWorkflow.php" role="php">
|
||||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||||
</file>
|
</file>
|
||||||
<<<<<<< HEAD
|
|
||||||
<file name="inc.ClassTransmittal.php" role="php">
|
<file name="inc.ClassTransmittal.php" role="php">
|
||||||
=======
|
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||||
|
</file>
|
||||||
<file name="inc.ClassDecorator.php" role="php">
|
<file name="inc.ClassDecorator.php" role="php">
|
||||||
>>>>>>> seeddms-5.1.x
|
|
||||||
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
<tasks:replace from="@package_version@" to="version" type="package-info" />
|
||||||
</file>
|
</file>
|
||||||
</dir> <!-- /DTD -->
|
</dir> <!-- /DTD -->
|
||||||
|
@ -1714,6 +1713,7 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
|
||||||
<notes>
|
<notes>
|
||||||
- add decorators
|
- add decorators
|
||||||
- add new methods SeedDMS_Core_Document::isType(), SeedDMS_Core_Folder::isType(), SeedDMS_Core_DocumentContent::isType(). Use them instead of checking the class name.
|
- add new methods SeedDMS_Core_Document::isType(), SeedDMS_Core_Folder::isType(), SeedDMS_Core_DocumentContent::isType(). Use them instead of checking the class name.
|
||||||
|
- skip a fileType with just a '.'
|
||||||
</notes>
|
</notes>
|
||||||
</release>
|
</release>
|
||||||
<release>
|
<release>
|
||||||
|
|
|
@ -99,6 +99,7 @@ class SeedDMS_SQLiteFTS_Indexer {
|
||||||
$sql = "INSERT INTO docs (docid, title, comment, keywords, category, owner, content, mimetype, origfilename, created) VALUES(".$doc->getFieldValue('document_id').", ".$this->_conn->quote($doc->getFieldValue('title')).", ".$this->_conn->quote($doc->getFieldValue('comment')).", ".$this->_conn->quote($doc->getFieldValue('keywords')).", ".$this->_conn->quote($doc->getFieldValue('category')).", ".$this->_conn->quote($doc->getFieldValue('owner')).", ".$this->_conn->quote($doc->getFieldValue('content')).", ".$this->_conn->quote($doc->getFieldValue('mimetype')).", ".$this->_conn->quote($doc->getFieldValue('origfilename')).", ".time().")";
|
$sql = "INSERT INTO docs (docid, title, comment, keywords, category, owner, content, mimetype, origfilename, created) VALUES(".$doc->getFieldValue('document_id').", ".$this->_conn->quote($doc->getFieldValue('title')).", ".$this->_conn->quote($doc->getFieldValue('comment')).", ".$this->_conn->quote($doc->getFieldValue('keywords')).", ".$this->_conn->quote($doc->getFieldValue('category')).", ".$this->_conn->quote($doc->getFieldValue('owner')).", ".$this->_conn->quote($doc->getFieldValue('content')).", ".$this->_conn->quote($doc->getFieldValue('mimetype')).", ".$this->_conn->quote($doc->getFieldValue('origfilename')).", ".time().")";
|
||||||
$res = $this->_conn->exec($sql);
|
$res = $this->_conn->exec($sql);
|
||||||
if($res === false) {
|
if($res === false) {
|
||||||
|
return false;
|
||||||
var_dump($this->_conn->errorInfo());
|
var_dump($this->_conn->errorInfo());
|
||||||
}
|
}
|
||||||
return $res;
|
return $res;
|
||||||
|
|
|
@ -352,6 +352,10 @@ class SeedDMS_Extension_Mgr {
|
||||||
public function updateExtension($file) { /* {{{ */
|
public function updateExtension($file) { /* {{{ */
|
||||||
/* unzip the extension in a temporary directory */
|
/* unzip the extension in a temporary directory */
|
||||||
$newdir = $this->cachedir ."/ext.new";
|
$newdir = $this->cachedir ."/ext.new";
|
||||||
|
/* First remove a left over from a previous extension */
|
||||||
|
if(file_exists($newdir)) {
|
||||||
|
self::rrmdir($newdir);
|
||||||
|
}
|
||||||
if(!mkdir($newdir, 0755)) {
|
if(!mkdir($newdir, 0755)) {
|
||||||
$this->errmsgs[] = "Cannot create temp. extension directory";
|
$this->errmsgs[] = "Cannot create temp. extension directory";
|
||||||
return false;
|
return false;
|
||||||
|
@ -379,7 +383,10 @@ class SeedDMS_Extension_Mgr {
|
||||||
$this->rrmdir($this->extdir ."/". $extname);
|
$this->rrmdir($this->extdir ."/". $extname);
|
||||||
}
|
}
|
||||||
/* Move the temp. created ext directory to the final location */
|
/* Move the temp. created ext directory to the final location */
|
||||||
rename($newdir, $this->extdir ."/". $extname);
|
if(!rename($newdir, $this->extdir ."/". $extname)) {
|
||||||
|
$this->rrmdir($this->extdir ."/". $extname);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
|
@ -181,11 +181,20 @@ class SeedDMS_View_Common {
|
||||||
* null if no hook was called
|
* null if no hook was called
|
||||||
*/
|
*/
|
||||||
public function hasHook($hook) { /* {{{ */
|
public function hasHook($hook) { /* {{{ */
|
||||||
|
$tmps = array();
|
||||||
$tmp = explode('_', get_class($this));
|
$tmp = explode('_', get_class($this));
|
||||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp[2])])) {
|
$tmps[] = $tmp[2];
|
||||||
foreach($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp[2])] as $hookObj) {
|
$tmp = explode('_', get_parent_class($this));
|
||||||
if (method_exists($hookObj, $hook)) {
|
$tmps[] = $tmp[2];
|
||||||
return true;
|
/* Run array_unique() in case the parent class has the same suffix */
|
||||||
|
$tmps = array_unique($tmps);
|
||||||
|
$ret = null;
|
||||||
|
foreach($tmps as $tmp) {
|
||||||
|
if(isset($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp)])) {
|
||||||
|
foreach($GLOBALS['SEEDDMS_HOOKS']['view'][lcfirst($tmp)] as $hookObj) {
|
||||||
|
if (method_exists($hookObj, $hook)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -688,47 +688,54 @@ switch($command) {
|
||||||
$reviewers["g"] = array();
|
$reviewers["g"] = array();
|
||||||
$approvers["i"] = array();
|
$approvers["i"] = array();
|
||||||
$approvers["g"] = array();
|
$approvers["g"] = array();
|
||||||
|
$workflow = null;
|
||||||
|
|
||||||
// add mandatory reviewers/approvers
|
if($settings->_workflowMode == 'traditional' || $settings->_workflowMode == 'traditional_only_approval') {
|
||||||
$docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp);
|
// add mandatory reviewers/approvers
|
||||||
$res=$user->getMandatoryReviewers();
|
$docAccess = $folder->getReadAccessList($settings->_enableAdminRevApp, $settings->_enableOwnerRevApp);
|
||||||
foreach ($res as $r){
|
if($settings->_workflowMode == 'traditional') {
|
||||||
|
$res=$user->getMandatoryReviewers();
|
||||||
|
foreach ($res as $r){
|
||||||
|
|
||||||
if ($r['reviewerUserID']!=0){
|
if ($r['reviewerUserID']!=0){
|
||||||
foreach ($docAccess["users"] as $usr)
|
foreach ($docAccess["users"] as $usr)
|
||||||
if ($usr->getID()==$r['reviewerUserID']){
|
if ($usr->getID()==$r['reviewerUserID']){
|
||||||
$reviewers["i"][] = $r['reviewerUserID'];
|
$reviewers["i"][] = $r['reviewerUserID'];
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
else if ($r['reviewerGroupID']!=0){
|
||||||
else if ($r['reviewerGroupID']!=0){
|
foreach ($docAccess["groups"] as $grp)
|
||||||
foreach ($docAccess["groups"] as $grp)
|
if ($grp->getID()==$r['reviewerGroupID']){
|
||||||
if ($grp->getID()==$r['reviewerGroupID']){
|
$reviewers["g"][] = $r['reviewerGroupID'];
|
||||||
$reviewers["g"][] = $r['reviewerGroupID'];
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
$res=$user->getMandatoryApprovers();
|
||||||
$res=$user->getMandatoryApprovers();
|
foreach ($res as $r){
|
||||||
foreach ($res as $r){
|
|
||||||
|
|
||||||
if ($r['approverUserID']!=0){
|
if ($r['approverUserID']!=0){
|
||||||
foreach ($docAccess["users"] as $usr)
|
foreach ($docAccess["users"] as $usr)
|
||||||
if ($usr->getID()==$r['approverUserID']){
|
if ($usr->getID()==$r['approverUserID']){
|
||||||
$approvers["i"][] = $r['approverUserID'];
|
$approvers["i"][] = $r['approverUserID'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($r['approverGroupID']!=0){
|
else if ($r['approverGroupID']!=0){
|
||||||
foreach ($docAccess["groups"] as $grp)
|
foreach ($docAccess["groups"] as $grp)
|
||||||
if ($grp->getID()==$r['approverGroupID']){
|
if ($grp->getID()==$r['approverGroupID']){
|
||||||
$approvers["g"][] = $r['approverGroupID'];
|
$approvers["g"][] = $r['approverGroupID'];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} elseif($settings->_workflowMode == 'advanced') {
|
||||||
|
$workflow = $user->getMandatoryWorkflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
$workflow = $user->getMandatoryWorkflow();
|
|
||||||
|
|
||||||
$expires = false;
|
$expires = false;
|
||||||
if($settings->_presetExpirationDate) {
|
if($settings->_presetExpirationDate) {
|
||||||
|
|
|
@ -98,6 +98,7 @@ if($view) {
|
||||||
$view->setParam('incItemsPerPage', $settings->_incItemsPerPage != 0 ? $settings->_incItemsPerPage : $settings->_maxItemsPerPage);
|
$view->setParam('incItemsPerPage', $settings->_incItemsPerPage != 0 ? $settings->_incItemsPerPage : $settings->_maxItemsPerPage);
|
||||||
$view->setParam('offset', $offset);
|
$view->setParam('offset', $offset);
|
||||||
$view->setParam('limit', $limit);
|
$view->setParam('limit', $limit);
|
||||||
|
$view->setParam('onepage', true); // do most navigation by reloading areas of pages with ajax
|
||||||
$view($_GET);
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,6 +157,7 @@ $(document).ready( function() {
|
||||||
|
|
||||||
$('body').on('click', 'a.addtoclipboard', function(ev) { /* {{{ */
|
$('body').on('click', 'a.addtoclipboard', function(ev) { /* {{{ */
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
attr_rel = $(ev.currentTarget).attr('rel');
|
attr_rel = $(ev.currentTarget).attr('rel');
|
||||||
attr_msg = $(ev.currentTarget).attr('msg');
|
attr_msg = $(ev.currentTarget).attr('msg');
|
||||||
type = attr_rel.substring(0, 1) == 'F' ? 'folder' : 'document';
|
type = attr_rel.substring(0, 1) == 'F' ? 'folder' : 'document';
|
||||||
|
@ -545,7 +546,7 @@ function onAddClipboard(ev) { /* {{{ */
|
||||||
maxFileSizeMsg = msg;
|
maxFileSizeMsg = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendFileToServer(formData,status) {
|
function sendFileToServer(formData,status,callback) {
|
||||||
var uploadURL = ajaxurl; //Upload URL
|
var uploadURL = ajaxurl; //Upload URL
|
||||||
var extraData ={}; //Extra Data.
|
var extraData ={}; //Extra Data.
|
||||||
var jqXHR=$.ajax({
|
var jqXHR=$.ajax({
|
||||||
|
@ -584,6 +585,9 @@ function onAddClipboard(ev) { /* {{{ */
|
||||||
timeout: 1500,
|
timeout: 1500,
|
||||||
});
|
});
|
||||||
status.statusbar.after($('<a href="../out/out.EditDocument.php?documentid=' + data.data + '" class="btn btn-mini btn-primary">' + editBtnLabel + '</a>'));
|
status.statusbar.after($('<a href="../out/out.EditDocument.php?documentid=' + data.data + '" class="btn btn-mini btn-primary">' + editBtnLabel + '</a>'));
|
||||||
|
if(callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
noty({
|
noty({
|
||||||
text: data.message,
|
text: data.message,
|
||||||
|
@ -665,7 +669,10 @@ function onAddClipboard(ev) { /* {{{ */
|
||||||
statusbar.parent().show();
|
statusbar.parent().show();
|
||||||
var status = new createStatusbar(statusbar);
|
var status = new createStatusbar(statusbar);
|
||||||
status.setFileNameSize(files[i].name,files[i].size);
|
status.setFileNameSize(files[i].name,files[i].size);
|
||||||
sendFileToServer(fd,status);
|
sendFileToServer(fd,status,function(){
|
||||||
|
if(target_id == seeddms_folder)
|
||||||
|
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder});
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
noty({
|
noty({
|
||||||
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',
|
text: maxFileSizeMsg + '<br /><em>' + files[i].name + ' (' + files[i].size + ' Bytes)</em>',
|
||||||
|
@ -1155,7 +1162,6 @@ $(document).ready(function() { /* {{{ */
|
||||||
|
|
||||||
var updateDropFolder = function() {
|
var updateDropFolder = function() {
|
||||||
$('#menu-dropfolder > div.ajax').trigger('update', {folderid: seeddms_folder});
|
$('#menu-dropfolder > div.ajax').trigger('update', {folderid: seeddms_folder});
|
||||||
console.log(seeddms_folder);
|
|
||||||
timeOutId = setTimeout(updateDropFolder, 60000);
|
timeOutId = setTimeout(updateDropFolder, 60000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,22 @@ $(document).ready( function() {
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label"><?php printMLText("attrdef_type");?>:</label>
|
<label class="control-label"><?php printMLText("attrdef_type");?>:</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<select name="type"><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option><option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option></select>
|
<select name="type">
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_int ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_int) echo "selected"; ?>><?php printMLText('attrdef_type_int'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_float ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_float) echo "selected"; ?>><?php printMLText('attrdef_type_float'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_string ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_string) echo "selected"; ?>><?php printMLText('attrdef_type_string'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_boolean ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_boolean) echo "selected"; ?>><?php printMLText('attrdef_type_boolean'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_date ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_date) echo "selected"; ?>><?php printMLText('attrdef_type_date'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_email ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_email) echo "selected"; ?>><?php printMLText('attrdef_type_email'); ?></option>
|
||||||
|
<option value="<?php echo SeedDMS_Core_AttributeDefinition::type_url ?>" <?php if($attrdef && $attrdef->getType() == SeedDMS_Core_AttributeDefinition::type_url) echo "selected"; ?>><?php printMLText('attrdef_type_url'); ?></option>
|
||||||
|
<?php
|
||||||
|
if($moreoptions = $this->callHook('additionalTypes', $attrdef)) {
|
||||||
|
foreach($moreoptions as $option) {
|
||||||
|
echo '<option value="'.(int) $option['value'].'" '.($attrdef && $attrdef->getType() == $option['value'] ? "selected" : "").'>'.$option['name'].'</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -534,6 +534,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
||||||
case "calendar";
|
case "calendar";
|
||||||
$this->calendarNavigationBar($extra);
|
$this->calendarNavigationBar($extra);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
if($this->hasHook('pageNavigationBar')) {
|
||||||
|
$menubar = $this->callHook('pageNavigationBar', $pageType, $extra);
|
||||||
|
if(is_string($menubar))
|
||||||
|
echo $menubar;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
echo " </div>\n";
|
echo " </div>\n";
|
||||||
|
@ -1205,14 +1211,14 @@ $(document).ready(function() {
|
||||||
echo self::getFileChooserHtml($varname, $multiple, $accept);
|
echo self::getFileChooserHtml($varname, $multiple, $accept);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function printDateChooser($defDate = '', $varName) { /* {{{ */
|
function printDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd') { /* {{{ */
|
||||||
echo self::getDateChooser($defDate, $varName);
|
echo self::getDateChooser($defDate, $varName, $lang, $dateformat);
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function getDateChooser($defDate = '', $varName, $lang='') { /* {{{ */
|
function getDateChooser($defDate = '', $varName, $lang='', $dateformat='yyyy-mm-dd') { /* {{{ */
|
||||||
$content = '
|
$content = '
|
||||||
<span class="input-append date span12 datepicker" id="'.$varName.'date" data-date="'.$defDate.'" data-selectmenu="presetexpdate" data-date-format="yyyy-mm-dd"'.($lang ? 'data-date-language="'.str_replace('_', '-', $lang).'"' : '').'>
|
<span class="input-append date span12 datepicker" id="'.$varName.'date" data-date="'.$defDate.'" data-selectmenu="presetexpdate" data-date-format="'.$dateformat.'"'.($lang ? 'data-date-language="'.str_replace('_', '-', $lang).'"' : '').'>
|
||||||
<input class="span6" size="16" name="'.$varName.'" type="text" value="'.$defDate.'">
|
<input class="span6" size="16" name="'.$varName.'" id="'.$varName.'" type="text" value="'.$defDate.'" autocomplete="off">
|
||||||
<span class="add-on"><i class="icon-calendar"></i></span>
|
<span class="add-on"><i class="icon-calendar"></i></span>
|
||||||
</span>';
|
</span>';
|
||||||
return $content;
|
return $content;
|
||||||
|
@ -1748,19 +1754,24 @@ $(document).ready(function() {
|
||||||
* @param boolean $showdocs set to true if tree shall contain documents
|
* @param boolean $showdocs set to true if tree shall contain documents
|
||||||
* as well.
|
* as well.
|
||||||
* @param integer $expandtree level to which the tree shall be opened
|
* @param integer $expandtree level to which the tree shall be opened
|
||||||
|
* @param boolean $partialtree set to true if the given folder is the start folder
|
||||||
*/
|
*/
|
||||||
function printNewTreeNavigationJs($folderid=0, $accessmode=M_READ, $showdocs=0, $formid='form1', $expandtree=0, $orderby='', $partialtree=false) { /* {{{ */
|
function printNewTreeNavigationJs($folderid=0, $accessmode=M_READ, $showdocs=0, $formid='form1', $expandtree=0, $orderby='', $partialtree=false) { /* {{{ */
|
||||||
function jqtree($obj, $path, $folder, $user, $accessmode, $showdocs=1, $expandtree=0, $orderby='', $level=0) {
|
function jqtree($obj, $path, $folder, $user, $accessmode, $showdocs=1, $expandtree=0, $orderby='', $level=0) {
|
||||||
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
||||||
if($path || $expandtree>=$level) {
|
if($path/* || $expandtree>=$level*/) {
|
||||||
if($path)
|
if($path)
|
||||||
$pathfolder = array_shift($path);
|
$pathfolder = array_shift($path);
|
||||||
$children = array();
|
$children = array();
|
||||||
$subfolders = $folder->getSubFolders(isset($orderby[0]) ? $orderby[0] : '', $orderdir);
|
if($expandtree) {
|
||||||
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, $accessmode);
|
$subfolders = $folder->getSubFolders(isset($orderby[0]) ? $orderby[0] : '', $orderdir);
|
||||||
|
$subfolders = SeedDMS_Core_DMS::filterAccess($subfolders, $user, $accessmode);
|
||||||
|
} else {
|
||||||
|
$subfolders = array($pathfolder);
|
||||||
|
}
|
||||||
foreach($subfolders as $subfolder) {
|
foreach($subfolders as $subfolder) {
|
||||||
$node = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>($subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs)) ? true : false, 'is_folder'=>true);
|
$node = array('label'=>$subfolder->getName(), 'id'=>$subfolder->getID(), 'load_on_demand'=>($subfolder->hasSubFolders() || ($subfolder->hasDocuments() && $showdocs)) ? true : false, 'is_folder'=>true);
|
||||||
if($expandtree>=$level || $pathfolder->getID() == $subfolder->getID()) {
|
if(/*$expandtree>=$level ||*/ $pathfolder->getID() == $subfolder->getID()) {
|
||||||
$node['children'] = jqtree($obj, $path, $subfolder, $user, $accessmode, $showdocs, $expandtree, $orderby, $level+1);
|
$node['children'] = jqtree($obj, $path, $subfolder, $user, $accessmode, $showdocs, $expandtree, $orderby, $level+1);
|
||||||
if($showdocs) {
|
if($showdocs) {
|
||||||
$documents = $subfolder->getDocuments(isset($orderby[0]) ? $orderby[0] : '', $orderdir);
|
$documents = $subfolder->getDocuments(isset($orderby[0]) ? $orderby[0] : '', $orderdir);
|
||||||
|
@ -1792,10 +1803,11 @@ $(document).ready(function() {
|
||||||
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
$orderdir = (isset($orderby[1]) ? ($orderby[1] == 'd' ? 'desc' : 'asc') : 'asc');
|
||||||
if($folderid) {
|
if($folderid) {
|
||||||
$folder = $this->params['dms']->getFolder($folderid);
|
$folder = $this->params['dms']->getFolder($folderid);
|
||||||
$path = $folder->getPath();
|
|
||||||
if(!$partialtree) {
|
if(!$partialtree) {
|
||||||
$folder = array_shift($path);
|
$path = $folder->getPath();
|
||||||
}
|
}
|
||||||
|
/* Get the first folder (root folder) of path */
|
||||||
|
$folder = array_shift($path);
|
||||||
$node = array('label'=>$folder->getName(), 'id'=>$folder->getID(), 'load_on_demand'=>false, 'is_folder'=>true);
|
$node = array('label'=>$folder->getName(), 'id'=>$folder->getID(), 'load_on_demand'=>false, 'is_folder'=>true);
|
||||||
if(!$folder->hasSubFolders()) {
|
if(!$folder->hasSubFolders()) {
|
||||||
$node['load_on_demand'] = true;
|
$node['load_on_demand'] = true;
|
||||||
|
@ -1831,7 +1843,7 @@ $(function() {
|
||||||
const $tree = $('#jqtree<?php echo $formid ?>');
|
const $tree = $('#jqtree<?php echo $formid ?>');
|
||||||
$tree.tree({
|
$tree.tree({
|
||||||
// saveState: true,
|
// saveState: true,
|
||||||
selectable: false,
|
selectable: true,
|
||||||
data: data,
|
data: data,
|
||||||
saveState: 'jqtree<?php echo $formid; ?>',
|
saveState: 'jqtree<?php echo $formid; ?>',
|
||||||
openedIcon: $('<i class="icon-minus-sign"></i>'),
|
openedIcon: $('<i class="icon-minus-sign"></i>'),
|
||||||
|
@ -1842,7 +1854,7 @@ $(function() {
|
||||||
} else
|
} else
|
||||||
documentSelected<?php echo $formid ?>(node.id, node.name);
|
documentSelected<?php echo $formid ?>(node.id, node.name);
|
||||||
},
|
},
|
||||||
autoOpen: true,
|
autoOpen: false,
|
||||||
drapAndDrop: true,
|
drapAndDrop: true,
|
||||||
onCreateLi: function(node, $li) {
|
onCreateLi: function(node, $li) {
|
||||||
// Add 'icon' span before title
|
// Add 'icon' span before title
|
||||||
|
@ -2001,6 +2013,7 @@ $(function() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// $('.delete-document-btn').click(function(ev) {
|
// $('.delete-document-btn').click(function(ev) {
|
||||||
$('body').on('click', 'a.delete-document-btn', function(ev){
|
$('body').on('click', 'a.delete-document-btn', function(ev){
|
||||||
|
ev.stopPropagation();
|
||||||
id = $(ev.currentTarget).attr('rel');
|
id = $(ev.currentTarget).attr('rel');
|
||||||
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
||||||
msg = $(ev.currentTarget).attr('msg');
|
msg = $(ev.currentTarget).attr('msg');
|
||||||
|
@ -2074,6 +2087,7 @@ $(function() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
// $('.delete-folder-btn').click(function(ev) {
|
// $('.delete-folder-btn').click(function(ev) {
|
||||||
$('body').on('click', 'a.delete-folder-btn', function(ev){
|
$('body').on('click', 'a.delete-folder-btn', function(ev){
|
||||||
|
ev.stopPropagation();
|
||||||
id = $(ev.currentTarget).attr('rel');
|
id = $(ev.currentTarget).attr('rel');
|
||||||
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
confirmmsg = $(ev.currentTarget).attr('confirmmsg');
|
||||||
msg = $(ev.currentTarget).attr('msg');
|
msg = $(ev.currentTarget).attr('msg');
|
||||||
|
@ -2411,6 +2425,7 @@ $(document).ready( function() {
|
||||||
$previewwidth = $this->params['previewWidthList'];
|
$previewwidth = $this->params['previewWidthList'];
|
||||||
$enableClipboard = $this->params['enableclipboard'];
|
$enableClipboard = $this->params['enableclipboard'];
|
||||||
$accessop = $this->params['accessobject'];
|
$accessop = $this->params['accessobject'];
|
||||||
|
$onepage = $this->params['onepage'];
|
||||||
|
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
||||||
|
@ -2471,8 +2486,11 @@ $(document).ready( function() {
|
||||||
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
$content .= "<img draggable=\"false\" class=\"mimeicon\" width=\"".$previewwidth."\" src=\"".$this->getMimeIcon($latestContent->getFileType())."\" title=\"".htmlspecialchars($latestContent->getMimeType())."\">";
|
||||||
$content .= "</td>";
|
$content .= "</td>";
|
||||||
|
|
||||||
$content .= "<td>";
|
$content .= "<td>";
|
||||||
$content .= "<a draggable=\"false\" href=\"../out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
|
if($onepage)
|
||||||
|
$content .= "<b>".htmlspecialchars($document->getName()) . "</b>";
|
||||||
|
else
|
||||||
|
$content .= "<a draggable=\"false\" href=\"../out/out.ViewDocument.php?documentid=".$docID."&showtree=".$showtree."\">" . htmlspecialchars($document->getName()) . "</a>";
|
||||||
if(isset($extracontent['below_title']))
|
if(isset($extracontent['below_title']))
|
||||||
$content .= $extracontent['below_title'];
|
$content .= $extracontent['below_title'];
|
||||||
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666; \">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $document->getDate())."</b>, ".getMLText('version')." <b>".$version."</b> - <b>".date('Y-m-d', $latestContent->getDate())."</b>".($document->expires() ? ", ".getMLText('expires').": <b>".getReadableDate($document->getExpires())."</b>" : "")."</span>";
|
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666; \">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $document->getDate())."</b>, ".getMLText('version')." <b>".$version."</b> - <b>".date('Y-m-d', $latestContent->getDate())."</b>".($document->expires() ? ", ".getMLText('expires').": <b>".getReadableDate($document->getExpires())."</b>" : "")."</span>";
|
||||||
|
@ -2603,6 +2621,7 @@ $(document).ready( function() {
|
||||||
$enableRecursiveCount = $this->params['enableRecursiveCount'];
|
$enableRecursiveCount = $this->params['enableRecursiveCount'];
|
||||||
$maxRecursiveCount = $this->params['maxRecursiveCount'];
|
$maxRecursiveCount = $this->params['maxRecursiveCount'];
|
||||||
$enableClipboard = $this->params['enableclipboard'];
|
$enableClipboard = $this->params['enableclipboard'];
|
||||||
|
$onepage = $this->params['onepage'];
|
||||||
|
|
||||||
$owner = $subFolder->getOwner();
|
$owner = $subFolder->getOwner();
|
||||||
$comment = $subFolder->getComment();
|
$comment = $subFolder->getComment();
|
||||||
|
@ -2611,7 +2630,10 @@ $(document).ready( function() {
|
||||||
$content = '';
|
$content = '';
|
||||||
$content .= $this->folderListRowStart($subFolder);
|
$content .= $this->folderListRowStart($subFolder);
|
||||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\"><img draggable=\"false\" src=\"".$this->getMimeIcon(".folder")."\" width=\"24\" height=\"24\" border=0></a></td>\n";
|
||||||
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
if($onepage)
|
||||||
|
$content .= "<td>" . "<b>".htmlspecialchars($subFolder->getName())."</b>";
|
||||||
|
else
|
||||||
|
$content .= "<td><a draggable=\"false\" href=\"../out/out.ViewFolder.php?folderid=".$subFolder->getID()."&showtree=".$showtree."\">" . htmlspecialchars($subFolder->getName()) . "</a>";
|
||||||
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
|
$content .= "<br /><span style=\"font-size: 85%; font-style: italic; color: #666;\">".getMLText('owner').": <b>".htmlspecialchars($owner->getFullName())."</b>, ".getMLText('creation_date').": <b>".date('Y-m-d', $subFolder->getDate())."</b></span>";
|
||||||
if($comment) {
|
if($comment) {
|
||||||
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
$content .= "<br /><span style=\"font-size: 85%;\">".htmlspecialchars($comment)."</span>";
|
||||||
|
|
|
@ -806,17 +806,17 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp">
|
<div class="tab-pane <?php if($currenttab == 'revapp') echo 'active'; ?>" id="revapp">
|
||||||
<?php
|
<?php
|
||||||
print "<div class=\"row-fluid\">";
|
print "<div class=\"row-fluid\">";
|
||||||
print "<div class=\"span6\">";
|
|
||||||
// $this->contentContainerStart();
|
|
||||||
print "<legend>".getMLText('reviewers')."</legend>";
|
|
||||||
print "<table class=\"table table-condensed\">\n";
|
|
||||||
|
|
||||||
/* Just check fo an exting reviewStatus, even workflow mode is set
|
/* Just check fo an exting reviewStatus, even workflow mode is set
|
||||||
* to traditional_only_approval. There may be old documents which
|
* to traditional_only_approval. There may be old documents which
|
||||||
* are still in S_DRAFT_REV.
|
* are still in S_DRAFT_REV.
|
||||||
*/
|
*/
|
||||||
if (/*$workflowmode != 'traditional_only_approval' &&*/ is_array($reviewStatus) && count($reviewStatus)>0) {
|
if (/*$workflowmode != 'traditional_only_approval' &&*/ is_array($reviewStatus) && count($reviewStatus)>0) {
|
||||||
|
|
||||||
|
print "<div class=\"span6\">";
|
||||||
|
// $this->contentContainerStart();
|
||||||
|
print "<legend>".getMLText('reviewers')."</legend>";
|
||||||
|
print "<table class=\"table table-condensed\">\n";
|
||||||
|
|
||||||
print "<tr>\n";
|
print "<tr>\n";
|
||||||
print "<th>".getMLText("name")."</th>\n";
|
print "<th>".getMLText("name")."</th>\n";
|
||||||
print "<th>".getMLText("last_update").", ".getMLText("comment")."</th>\n";
|
print "<th>".getMLText("last_update").", ".getMLText("comment")."</th>\n";
|
||||||
|
@ -898,11 +898,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
print "</table>";
|
||||||
print "</table>";
|
|
||||||
// $this->contentContainerEnd();
|
// $this->contentContainerEnd();
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
|
}
|
||||||
print "<div class=\"span6\">";
|
print "<div class=\"span6\">";
|
||||||
// $this->contentContainerStart();
|
// $this->contentContainerStart();
|
||||||
print "<legend>".getMLText('approvers')."</legend>";
|
print "<legend>".getMLText('approvers')."</legend>";
|
||||||
|
|
|
@ -100,15 +100,23 @@ class SeedDMS_View_ViewFolder extends SeedDMS_Bootstrap_Style {
|
||||||
$enableDropUpload = $this->params['enableDropUpload'];
|
$enableDropUpload = $this->params['enableDropUpload'];
|
||||||
$maxItemsPerPage = $this->params['maxItemsPerPage'];
|
$maxItemsPerPage = $this->params['maxItemsPerPage'];
|
||||||
$showtree = $this->params['showtree'];
|
$showtree = $this->params['showtree'];
|
||||||
|
$onepage = $this->params['onepage'];
|
||||||
|
$sitename = trim(strip_tags($this->params['sitename']));
|
||||||
|
|
||||||
header('Content-Type: application/javascript; charset=UTF-8');
|
header('Content-Type: application/javascript; charset=UTF-8');
|
||||||
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
|
parent::jsTranslations(array('cancel', 'splash_move_document', 'confirm_move_document', 'move_document', 'confirm_transfer_link_document', 'transfer_content', 'link_document', 'splash_move_folder', 'confirm_move_folder', 'move_folder'));
|
||||||
?>
|
?>
|
||||||
seeddms_folder = <?= $folder->getID() ?>;
|
seeddms_folder = <?= $folder->getID() ?>;
|
||||||
function folderSelected(id, name) {
|
function folderSelected(id, name) {
|
||||||
// window.location = '../out/out.ViewFolder.php?folderid=' + id;
|
<?php if(!$onepage) { ?>
|
||||||
|
window.location = '../out/out.ViewFolder.php?folderid=' + id;
|
||||||
|
<?php } else { ?>
|
||||||
seeddms_folder = id;
|
seeddms_folder = id;
|
||||||
|
title_prefix = "<?= (strlen($sitename)>0 ? $sitename : "SeedDMS") ?>";
|
||||||
$('div.ajax').trigger('update', {folderid: id, orderby: '<?= $orderby ?>'});
|
$('div.ajax').trigger('update', {folderid: id, orderby: '<?= $orderby ?>'});
|
||||||
|
document.title = title_prefix+": "+name;
|
||||||
|
window.history.pushState({"html":"","pageTitle":title_prefix+": "+name},"", '../out/out.ViewFolder.php?folderid=' + id);
|
||||||
|
<?php } ?>
|
||||||
}
|
}
|
||||||
<?php if($maxItemsPerPage) { ?>
|
<?php if($maxItemsPerPage) { ?>
|
||||||
function loadMoreObjects(element, limit) {
|
function loadMoreObjects(element, limit) {
|
||||||
|
@ -147,15 +155,32 @@ $('#loadmore').click(function(e) {
|
||||||
});
|
});
|
||||||
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
/*
|
<?php
|
||||||
$('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
if($onepage) {
|
||||||
attr_id = $(ev.currentTarget).attr('id').split('-')[3];
|
?>
|
||||||
|
window.onpopstate = function(event) {
|
||||||
|
console.log("location: " + document.location + ", state: " + JSON.stringify(event.state));
|
||||||
|
console.log(JSON.stringify(event.state));
|
||||||
|
window.location = document.location;
|
||||||
|
};
|
||||||
|
$('body').on('click', '[id^=\"table-row-folder\"] td:nth-child(2)', function(ev) {
|
||||||
|
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
||||||
folderSelected(attr_id, '');
|
folderSelected(attr_id, '');
|
||||||
$([document.documentElement, document.body]).animate({
|
$([document.documentElement, document.body]).animate({
|
||||||
scrollTop: 200
|
scrollTop: 200
|
||||||
}, 200);
|
}, 200);
|
||||||
});
|
});
|
||||||
*/
|
$('body').on('click', '[id^=\"table-row-document\"] td:nth-child(2)', function(ev) {
|
||||||
|
attr_id = $(ev.currentTarget).parent().attr('id').split('-')[3];
|
||||||
|
window.location = '../out/out.ViewDocument.php?documentid=' + attr_id;
|
||||||
|
});
|
||||||
|
$('body').on('click', '.order-btn', function(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
var element = $(this);
|
||||||
|
var orderby = element.data('orderby');
|
||||||
|
$("div.ajax[data-action='folderList']").trigger('update', {folderid: seeddms_folder, orderby: orderby});
|
||||||
|
});
|
||||||
|
<?php } ?>
|
||||||
<?php
|
<?php
|
||||||
if($showtree == 1)
|
if($showtree == 1)
|
||||||
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', ($expandFolderTree == 1) ? -1 : 3, $orderby);
|
$this->printNewTreeNavigationJs($folder->getID(), M_READ, 0, '', ($expandFolderTree == 1) ? -1 : 3, $orderby);
|
||||||
|
@ -233,7 +258,6 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||||
foreach($attributes as $attribute) {
|
foreach($attributes as $attribute) {
|
||||||
$arr = $this->callHook('showFolderAttribute', $folder, $attribute);
|
$arr = $this->callHook('showFolderAttribute', $folder, $attribute);
|
||||||
if(is_array($arr)) {
|
if(is_array($arr)) {
|
||||||
echo $txt;
|
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td>".$arr[0].":</td>";
|
echo "<td>".$arr[0].":</td>";
|
||||||
echo "<td>".$arr[1].":</td>";
|
echo "<td>".$arr[1].":</td>";
|
||||||
|
@ -268,6 +292,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||||
$previewconverters = $this->params['previewConverters'];
|
$previewconverters = $this->params['previewConverters'];
|
||||||
$timeout = $this->params['timeout'];
|
$timeout = $this->params['timeout'];
|
||||||
$xsendfile = $this->params['xsendfile'];
|
$xsendfile = $this->params['xsendfile'];
|
||||||
|
$onepage = $this->params['onepage'];
|
||||||
|
|
||||||
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile);
|
||||||
$previewer->setConverters($previewconverters);
|
$previewer->setConverters($previewconverters);
|
||||||
|
@ -286,7 +311,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||||
if($documents === null)
|
if($documents === null)
|
||||||
$documents = $folder->getDocuments($orderby[0], $orderdir);
|
$documents = $folder->getDocuments($orderby[0], $orderdir);
|
||||||
$documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ);
|
$documents = SeedDMS_Core_DMS::filterAccess($documents, $user, M_READ);
|
||||||
$parent = null; //$folder->getParent();
|
$parent = $onepage ? $folder->getParent() : null;
|
||||||
|
|
||||||
$txt = $this->callHook('folderListPreContent', $folder, $subFolders, $documents);
|
$txt = $this->callHook('folderListPreContent', $folder, $subFolders, $documents);
|
||||||
if(is_string($txt))
|
if(is_string($txt))
|
||||||
|
@ -301,9 +326,9 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||||
print "<thead>\n<tr>\n";
|
print "<thead>\n<tr>\n";
|
||||||
print "<th>".($parent ? '<button class="btn btn-mini btn-default" id="table-row-folder-'.$parent->getID().'"><i class="icon-arrow-up"></i></button>' : '')."</th>\n";
|
print "<th>".($parent ? '<button class="btn btn-mini btn-default" id="table-row-folder-'.$parent->getID().'"><i class="icon-arrow-up"></i></button>' : '')."</th>\n";
|
||||||
print "<th>".getMLText("name");
|
print "<th>".getMLText("name");
|
||||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($orderby=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
|
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="n"||$orderby=="na"?"&orderby=nd":"&orderby=n")."\" data-orderby=\"".($orderby=="n"||$orderby=="na"?"nd":"n")."\"title=\"".getMLText("sort_by_name")."\">".($orderby=="n"||$orderby=="na"?' <i class="icon-sort-by-alphabet selected"></i>':($orderby=="nd"?' <i class="icon-sort-by-alphabet-alt selected"></i>':' <i class="icon-sort-by-alphabet"></i>'))."</a>";
|
||||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="icon-sort-by-order selected"></i>':($orderby=="sd"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
|
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="s"||$orderby=="sa"?"&orderby=sd":"&orderby=s")."\" data-orderby=\"".($orderby=="s"||$orderby=="sa"?"sd":"s")."\" title=\"".getMLText("sort_by_sequence")."\">".($orderby=="s"||$orderby=="sa"?' <i class="icon-sort-by-order selected"></i>':($orderby=="sd"?' <i class="icon-sort-by-order-alt selected"></i>':' <i class="icon-sort-by-order"></i>'))."</a>";
|
||||||
print " <a href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="icon-sort-by-attributes selected"></i>':($orderby=="dd"?' <i class="icon-sort-by-attributes-alt selected"></i>':' <i class="icon-sort-by-attributes"></i>'))."</a>";
|
print " <a class=\"order-btn\" href=\"../out/out.ViewFolder.php?folderid=". $folderid .($orderby=="d"||$orderby=="da"?"&orderby=dd":"&orderby=d")."\" data-orderby=\"".($orderby=="d"||$orderby=="da"?"dd":"d")."\" title=\"".getMLText("sort_by_date")."\">".($orderby=="d"||$orderby=="da"?' <i class="icon-sort-by-attributes selected"></i>':($orderby=="dd"?' <i class="icon-sort-by-attributes-alt selected"></i>':' <i class="icon-sort-by-attributes"></i>'))."</a>";
|
||||||
print "</th>\n";
|
print "</th>\n";
|
||||||
// print "<th>".getMLText("owner")."</th>\n";
|
// print "<th>".getMLText("owner")."</th>\n";
|
||||||
print "<th>".getMLText("status")."</th>\n";
|
print "<th>".getMLText("status")."</th>\n";
|
||||||
|
@ -547,7 +572,7 @@ $('body').on('click', '[id^=\"table-row-folder\"]', function(ev) {
|
||||||
echo "<div class=\"span4\">";
|
echo "<div class=\"span4\">";
|
||||||
// $this->dropUpload();
|
// $this->dropUpload();
|
||||||
?>
|
?>
|
||||||
<div class="ajax" data-view="ViewFolder" data-action="dropUpload" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
|
<div class="ajax" data-view="ViewFolder" data-action="dropUpload" data-no-spinner="true" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
echo "</div>";
|
echo "</div>";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user