From 5fb7ef6ee8fe1d1f9c25b046c246506acdd01d07 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 27 Jan 2021 08:45:34 -0800 Subject: [PATCH] Theme Manager: Online browser now uses admin-ui search/filtering. --- e107_admin/theme.php | 204 +++++++++++---------- e107_handlers/theme_handler.php | 305 +++++++------------------------- 2 files changed, 173 insertions(+), 336 deletions(-) diff --git a/e107_admin/theme.php b/e107_admin/theme.php index 8537dfc3e..c165d5dc7 100644 --- a/e107_admin/theme.php +++ b/e107_admin/theme.php @@ -199,7 +199,7 @@ class theme_admin_ui extends e_admin_ui 'name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data' => 'str', 'width'=>'5%', 'thclass' => '', 'forced'=> TRUE, 'primary'=>TRUE/*, 'noedit'=>TRUE*/), //Primary ID is not editable 'thumbnail' => array('title'=> LAN_IMAGE, 'type' => 'image', 'readParms'=>array('thumb'=>1,'w'=>300,'h'=>169,'crop'=>1, 'link'=>false, 'fallback'=>'{e_IMAGE}admin_images/nopreview.png'), 'data' => 'str', 'width'=>'auto', 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE), 'folder' => array('title'=> 'Folder', 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'thclass' => ''), - 'category' => array('title'=> LAN_CATEGORY, 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'thclass' => ''), + 'category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'data' => 'str', 'filter'=>true, 'width' => 'auto', 'thclass' => '', 'writeParms'=>array()), 'version' => array('title'=> 'Version', 'type' => 'text', 'data' => 'str', 'width' => 'auto', 'thclass' => ''), 'price' => array('title'=> LAN_AUTHOR, 'type' => 'method', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'), // 'blank_authorURL' => array('title'=> "Url", 'type' => 'url', 'data' => 'str', 'width' => 'auto', 'thclass' => 'left'), @@ -222,6 +222,8 @@ class theme_admin_ui extends e_admin_ui { require_once(e_HANDLER."theme_handler.php"); $this->themeObj = new themeHandler; // handles POSTed data. + $this->fields['category']['writeParms']['optArray'] = e107::getTheme()->getCategoryList(); // array('plugin_category_0','plugin_category_1', 'plugin_category_2'); // Example Drop-down array. + parent::__construct($request,$response,$params); } @@ -317,7 +319,9 @@ class theme_admin_ui extends e_admin_ui public function OnlineObserver() { - $this->ChooseObserver(); + unset($this->fields['checkboxes']); + $this->perPage = 500; + } public function ChooseAjaxObserver() @@ -350,7 +354,7 @@ class theme_admin_ui extends e_admin_ui return $frm->search($name, $searchVal, $submitName, $filterName, $filterArray, $filterVal); } - +/* public function OnlinePageOld() { global $e107SiteUsername, $e107SiteUserpass; @@ -386,7 +390,7 @@ class theme_admin_ui extends e_admin_ui $amount =$limit; - $c = 1; + $c = 1;*/ /* $text = "