From 4d44774a7fdaa08ad0e318e065c0b815d83f1a7f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 4 Feb 2025 13:39:02 +0100 Subject: [PATCH] select options in extension configuration can retain order (only attributedefinitions) --- views/bootstrap/class.Settings.php | 12 +++++++++++- views/bootstrap/styles/application.js | 11 +++++++++++ views/bootstrap4/styles/application.js | 11 +++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 007fdf035..4d4924ef7 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -762,12 +762,22 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) case "attributedefinitions": $objtype = empty($conf['objtype']) ? 0 : $conf['objtype']; $attrtype = empty($conf['attrtype']) ? 0 : $conf['attrtype']; + $order = empty($conf['order']) ? '' : $conf['order']; $recs = $dms->getAllAttributeDefinitions($objtype, $attrtype); if($recs) { - echo ""; if($allowempty) echo ""; + if($order == 'keep') { + foreach($selections as $selid) { + if($rec = $dms->getAttributeDefinition($selid)) { + echo ""; + } + } + } foreach($recs as $rec) { + if($order == 'keep' && in_array($rec->getID(), $selections)) + continue; echo "