add list of all extension at beginning of extensions tab

This commit is contained in:
Uwe Steinmann 2023-01-17 12:31:55 +01:00
parent cafc50ca4b
commit 0825ab0113

View File

@ -230,6 +230,17 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
header('Content-Type: application/javascript; charset=UTF-8'); header('Content-Type: application/javascript; charset=UTF-8');
?> ?>
function scrollToTargetAdjusted(target){
var element = document.getElementById(target);
var headerOffset = 60;
var elementPosition = element.getBoundingClientRect().top;
var offsetPosition = elementPosition + window.pageYOffset - headerOffset;
window.scrollTo({
top: offsetPosition,
behavior: "smooth"
});
}
$(document).ready( function() { $(document).ready( function() {
$('#settingstab li a').click(function(event) { $('#settingstab li a').click(function(event) {
$('#currenttab').val($(event.currentTarget).data('target').substring(1)); $('#currenttab').val($(event.currentTarget).data('target').substring(1));
@ -256,6 +267,11 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style {
} }
}); });
}); });
$('a.scrollto').click(function(event) {
console.log($(event.currentTarget).data('target').substring(1));
scrollToTargetAdjusted($(event.currentTarget).data('target').substring(1));
});
}); });
<?php <?php
} /* }}} */ } /* }}} */
@ -537,12 +553,15 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk))
-- SETTINGS - ADVANCED - DISPLAY -- SETTINGS - ADVANCED - DISPLAY
--> -->
<?php <?php
foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) {
echo '<a class="scrollto" data-target="#'.$extname.'">'.$extconf['title']."</a> ● ";
}
foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) { foreach($extmgr->getExtensionConfiguration() as $extname=>$extconf) {
if($this->hasHook('processConfig')) if($this->hasHook('processConfig'))
$extconf = $this->callHook('processConfig', $extname, $extconf); $extconf = $this->callHook('processConfig', $extname, $extconf);
if($this->isVisible($extname.'|')) { if($this->isVisible($extname.'|')) {
if($extconf['config']) { if($extconf['config']) {
$this->showRawConfigHeadline("<a name=\"".$extname."\"></a>".'<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" /><i class="fa fa-circle'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"></i> <span title="'.$extname.'">'.$extconf['title'].'</span>'); $this->showRawConfigHeadline("<a id=\"".$extname."\" name=\"".$extname."\"></a>".'<input type="hidden" name="extensions['.$extname.'][__disable__]" value="'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? '1' : '').'" /><i class="fa fa-circle'.(isset($settings->_extensions[$extname]["__disable__"]) && $settings->_extensions[$extname]["__disable__"] ? ' disabled' : ' enabled').'"></i> <span title="'.$extname.'">'.$extconf['title'].'</span>');
foreach($extconf['config'] as $confkey=>$conf) { foreach($extconf['config'] as $confkey=>$conf) {
ob_start(); ob_start();
if($this->isVisible($extname.'|'.$confkey)) { if($this->isVisible($extname.'|'.$confkey)) {