From 5158f9f39ca93dac87bd43f518bc420dbb266eba Mon Sep 17 00:00:00 2001 From: camer0n Date: Sun, 20 Apr 2025 05:13:38 -0700 Subject: [PATCH] Issue #5473 Added getMenuIcon() and getMenuTitle() --- e107_handlers/admin_ui.php | 43 +++++++++++++++----- e107_themes/bootstrap3/css/modern-dark-2.css | 2 +- 2 files changed, 33 insertions(+), 12 deletions(-) diff --git a/e107_handlers/admin_ui.php b/e107_handlers/admin_ui.php index 8369976b4..d45e3d5db 100755 --- a/e107_handlers/admin_ui.php +++ b/e107_handlers/admin_ui.php @@ -1298,6 +1298,26 @@ class e_admin_dispatcher return $this->adminMenuAliases; } + /** + * Retrieves the menu icon associated with the admin panel. + * + * @return string The menu icon. + */ + public function getMenuIcon() + { + return $this->adminMenuIcon; + } + + /** + * Retrieves the menu title. + * + * @return string The title of the menu. + */ + public function getMenuTitle() + { + return $this->menuTitle; + } + /** * Get request object * @return e_admin_request @@ -1579,8 +1599,7 @@ class e_admin_dispatcher $var = array(); $selected = false; - - foreach($this->adminMenu as $key => $val) + foreach($this->getMenuData() as $key => $val) { if(isset($val['perm']) && $val['perm'] !== '' && !getperms($val['perm'])) { @@ -1681,14 +1700,15 @@ class e_admin_dispatcher return ''; } - - $selected = vartrue($this->adminMenuAliases[$selected], $selected); + $adminMenuAliases = $this->getMenuAliases(); + $selected = vartrue($adminMenuAliases[$selected], $selected); $icon = ''; - if(!empty($this->adminMenuIcon)) + $adminMenuIcon = $this->getMenuIcon(); + if(!empty($adminMenuIcon)) { - $icon = e107::getParser()->toIcon($this->adminMenuIcon); + $icon = e107::getParser()->toIcon($adminMenuIcon); } elseif(deftrue('e_CURRENT_PLUGIN')) { @@ -1700,7 +1720,8 @@ class e_admin_dispatcher $var['_extras_'] = array('icon' => $icon, 'return' => true); // e107::getMessage()->addDebug(print_a($var, true)); - return $toggle . e107::getNav()->admin($this->menuTitle, $selected, $var); + + return $toggle . e107::getNav()->admin($this->getMenuTitle(), $selected, $var); } @@ -4983,7 +5004,7 @@ class e_admin_controller_ui extends e_admin_controller * @param mixed $qryField Specific query field(s) to filter. * @param mixed $isfilter Determines if a specific filter is applied. * @param mixed $handleAction Custom action handler for the search process. - * @return string|false + * @return string|false|array */ public function _modifyListQrySearch(string|null $listQry, string $searchTerm, string $filterOptions, string $tablePath, string $tableFrom, string|null $primaryName, $raw, $orderField, $qryAsc, $forceFrom, int $qryFrom, $forceTo, int $perPage, $qryField, $isfilter, $handleAction) { @@ -6191,7 +6212,7 @@ class e_admin_ui extends e_admin_controller_ui if($scount > 0) { - e107::getMessage()->addSuccess(LAN_CREATED. ' (' .$scount. ') ' .LAN_PLUGIN_FEATUREBOX_NAME); + e107::getMessage()->addSuccess(LAN_CREATED. ' (' .$scount. ') ' .defset('LAN_PLUGIN_FEATUREBOX_NAME')); e107::getMessage()->addSuccess("'); return $scount; } @@ -6447,7 +6468,7 @@ class e_admin_ui extends e_admin_controller_ui if(empty($string)) { - return null; + return ''; } return $selected. " LIKE '%".e107::getParser()->toDB($string)."%' "; // array($selected, $this->getQuery('searchquery')); @@ -6840,7 +6861,7 @@ class e_admin_ui extends e_admin_controller_ui if(!empty($this->sortParent) && !empty($this->sortField) ) { - return null; + return; } diff --git a/e107_themes/bootstrap3/css/modern-dark-2.css b/e107_themes/bootstrap3/css/modern-dark-2.css index abd947cca..7482c43f5 100644 --- a/e107_themes/bootstrap3/css/modern-dark-2.css +++ b/e107_themes/bootstrap3/css/modern-dark-2.css @@ -807,7 +807,7 @@ tbody.collapse.in{display:table-row-group} .collapsing{height:0;overflow:hidden;-webkit-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;transition-timing-function:ease} .caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent} .dropdown-toggle:focus{outline:0} -.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#212121;border:1px solid #171717;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box} +.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:rgb(16, 16, 16);border:1px solid #171717;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);background-clip:padding-box} .btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle,.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0} .btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child,.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0} .btn-group-vertical>.btn:not(:first-child):not(:last-child),.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn,.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}