Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2022-04-28 16:03:00 +02:00
commit 2014eae334
10 changed files with 169 additions and 67 deletions

View File

@ -1227,6 +1227,8 @@ class SeedDMS_Core_AttributeDefinition { /* {{{ */
$values = explode($attrvalue[0], substr($attrvalue, 1));
else
$values = array($attrvalue);
} elseif(is_array($attrvalue)) {
$values = $attrvalue;
} elseif(is_string($attrvalue) && !$attrvalue) {
$values = array();
} else

View File

@ -1971,6 +1971,22 @@ add method SeedDMS_Core_DatabaseAccess::setLogFp()
- add callbacks on onPostUpdateAttribute, onPostRemoveAttribute, onPostAddAttribute
</notes>
</release>
<release>
<date>2022-04-22</date>
<time>13:44:55</time>
<version>
<release>5.1.26</release>
<api>5.1.26</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
- fix validating multi value attributes
</notes>
</release>
<release>
<date>2017-02-28</date>
<time>06:34:50</time>

View File

@ -553,8 +553,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
htmlspecialchars($path[$i]->getName())."</a>";
}
else {
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
}
$txtpath .= " <span class=\"divider\">/</span></li>";
}
@ -563,7 +562,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
return '<ul class="breadcrumb">'.$txtpath.'</ul>';
} /* }}} */
function pageNavigation($pageTitle, $pageType=null, $extra=null) { /* {{{ */
if ($pageType!=null && strcasecmp($pageType, "noNav")) {
@ -3825,6 +3824,24 @@ $("body").on("click", "span.openpopupbox", function(e) {
</div>
</div>
</div>
<?php
} /* }}} */
public function printAccordion2($title, $content) { /* {{{ */
$id = substr(md5(uniqid()), 0, 4);
?>
<div class="accordion2" id="accordion<?php echo $id; ?>">
<a class="accordion2-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" href="#collapse<?php echo $id; ?>">
<?php
$this->contentHeading($title);
?>
</a>
<div id="collapse<?php echo $id; ?>" class="collapse" style="height: 0px;">
<?php
echo $content;
?>
</div>
</div>
<?php
} /* }}} */
}

View File

@ -260,13 +260,11 @@ $('body').on('click', '.order-btn', function(ev) {
if(is_string($txt))
echo $txt;
else {
$owner = $folder->getOwner();
$this->contentHeading(getMLText("folder_infos"));
// $this->contentContainerStart();
$txt = $this->callHook('preFolderInfos', $folder);
if(is_string($txt))
echo $txt;
ob_start();
echo "<table class=\"table table-condensed table-sm\">\n";
if($user->isAdmin()) {
echo "<tr>";
@ -338,10 +336,11 @@ $('body').on('click', '.order-btn', function(ev) {
echo $arrarr;
}
echo "</table>\n";
$infos = ob_get_clean();
$this->printAccordion2(getMLText("folder_infos"), $infos);
$txt = $this->callHook('postFolderInfos', $folder);
if(is_string($txt))
echo $txt;
// $this->contentContainerEnd();
}
} /* }}} */
@ -591,12 +590,9 @@ $('body').on('click', '.order-btn', function(ev) {
$this->htmlStartPage(getMLText("folder_title", array("foldername" => htmlspecialchars($folder->getName()))));
$this->globalNavigation($folder);
$this->contentStart();
// $this->navigation();
?>
<div class="ajax" data-view="ViewFolder" data-action="navigation" data-no-spinner="true" <?php echo ($folder ? "data-query=\"folderid=".$folder->getID()."\"" : "") ?>></div>
<?php
$this->rowStart();
// dynamic columns - left column removed if no content and right column then fills span12.

View File

@ -252,6 +252,10 @@ div.statusbar-container h1 {
font-weight: normal;
}
a.accordion2-toggle:focus, a.accordion2-toggle:hover {
text-decoration: none;
}
span.datepicker {
padding: 0px;
}

View File

@ -797,7 +797,7 @@ function onAddClipboard(ev) { /* {{{ */
formData.append(key, value);
}
});
} else {
} else if(typeof data !== 'undefined') {
formData.append(previousKey, data);
}
}

View File

@ -476,8 +476,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
htmlspecialchars($path[$i]->getName())."</a>";
}
else {
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".
htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
$txtpath .= ($tagAll ? "<a href=\"".$this->params['settings']->_httpRoot."out/out.ViewFolder.php?folderid=".$path[$i]->getID()."&showtree=".showtree()."\">".htmlspecialchars($path[$i]->getName())."</a>" : htmlspecialchars($path[$i]->getName()));
}
}
if($document)
@ -485,11 +484,12 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
return '<nav aria-label="breadcrumb"><ol class="breadcrumb">'.$txtpath.'</ol></nav>';
} /* }}} */
function pageNavigation($pageTitle, $pageType=null, $extra=null) { /* {{{ */
if ($pageType!=null && strcasecmp($pageType, "noNav")) {
echo "<nav class=\"navbar navbar-expand-lg mb-4 bg-light navbar-light\">\n";
// echo "<div class=\"fixed-top\" style=\"z-index: 1029; margin-top: 51px;\">";
echo "<nav class=\"navbar navbar-expand-lg bg-light navbar-light\">\n";
echo '<a class="navbar-brand">'.getMLText('nav_brand_'.$pageType).'</a>';
echo "<button class=\"navbar-toggler\" type=\"button\" data-toggle=\"collapse\" data-target=\"#navbarPageContent\" aria-controls=\"navbarMain\" aria-expanded=\"false\" aria-label=\"Toggle navigation\">\n";
echo " <span class=\"navbar-toggler-icon\"></span>\n";
@ -528,6 +528,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
echo "</nav>\n";
if($pageType == "view_folder" || $pageType == "view_document")
echo $pageTitle."\n";
// echo "</div>";
} else {
echo "<legend>".$pageTitle."</legend>\n";
}
@ -3816,6 +3817,24 @@ $("body").on("click", "span.openpopupbox", function(e) {
</div>
</div>
</div>
<?php
} /* }}} */
public function printAccordion2($title, $content) { /* {{{ */
$id = substr(md5(uniqid()), 0, 4);
?>
<div class="accordion2" id="accordion<?php echo $id; ?>">
<a class="accordion2-toggle" data-toggle="collapse" data-parent="#accordion<?php echo $id; ?>" data-target="#collapse<?php echo $id; ?>">
<?php
$this->contentHeading($title);
?>
</a>
<div id="collapse<?php echo $id; ?>" class="collapse" data-parent="accordion<?php echo $id; ?>">
<?php
echo $content;
?>
</div>
</div>
<?php
} /* }}} */
}

View File

@ -260,6 +260,10 @@ div.statusbar-container h1 {
font-weight: normal;
}
a.accordion2-toggle:focus, a.accordion2-toggle:hover {
text-decoration: none;
}
span.datepicker {
padding: 0px;
}

View File

@ -828,7 +828,7 @@ function onAddClipboard(ev) { /* {{{ */
formData.append(key, value);
}
});
} else {
} else if(typeof data !== 'undefined') {
formData.append(previousKey, data);
}
}

File diff suppressed because one or more lines are too long