update to bootstrap 4.6.1, make navigation, breadcrumbs fixed to top, add new printAccordion2() method

This commit is contained in:
Uwe Steinmann 2022-04-26 18:50:22 +02:00
parent b9a993c2b3
commit e5755d593f
5 changed files with 147 additions and 68 deletions

View File

@ -473,8 +473,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>";
}
@ -483,7 +482,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")) {
@ -3665,6 +3664,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

@ -474,8 +474,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)
@ -483,11 +482,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";
@ -526,6 +526,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";
}
@ -3738,6 +3739,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

@ -1,5 +1,5 @@
body { /* Add top padding for full-width layout */
padding-top: 3.7rem;
padding-top: 9.3rem;
}
#login_wrapper {
margin: auto auto;

File diff suppressed because one or more lines are too long