From 710b21823a04334abdd9f9e92cf678fba9814156 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 26 Feb 2013 17:18:37 -0800 Subject: [PATCH] Tweaks to admin-ui batch drop-down. --- e107_admin/links.php | 3 ++- e107_admin/newspost.php | 6 +++--- e107_handlers/form_handler.php | 33 +++++++++++++++++++++++++++------ 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/e107_admin/links.php b/e107_admin/links.php index 61439a81c..8f97ef792 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -70,7 +70,8 @@ class links_admin_ui extends e_admin_ui protected $batchCopy = true; protected $listOrder = 'link_category,link_order ASC'; protected $listSorting = true; - + + //FIXME TOOD - Filter out 'unassigned' entries by default. public $current_parent = 0; public $sublink_data = null; diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index bc3d4c6d2..0e017af0b 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -102,9 +102,9 @@ class news_cat_ui extends e_admin_ui 'category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE, 'validate' => true, 'inline' => true), 'category_meta_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto', 'thclass' => 'left','readParms' => 'expand=...&truncate=150&bb=1', 'readonly'=>FALSE), - 'category_meta_keywords' => array('title'=> "Meta Keywords", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), - 'category_sef' => array('title'=> "SEF Url String", 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE), // Display name - 'category_manager' => array('title'=> "Manage Permissions",'type' => 'userclass', 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), + 'category_meta_keywords' => array('title'=> LAN_KEYWORDS, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left', 'readonly'=>FALSE), + 'category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'width' => 'auto', 'readonly'=>FALSE), // Display name + 'category_manager' => array('title'=> "Manage Permissions",'type' => 'userclass', 'inline'=>true, 'width' => 'auto', 'data' => 'int','batch'=>TRUE, 'filter'=>TRUE), 'category_order' => array('title'=> LAN_ORDER, 'type' => 'text', 'width' => 'auto', 'thclass' => 'right', 'class'=> 'right' ), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center', 'sort' => true) ); diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index fc5b4a64b..251a2674e 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -1194,14 +1194,28 @@ class e_form return ""; } - function option($option_title, $value, $selected = false, $options = array()) + /** + * "; } + + /** + * Use selectbox() instead. + */ function option_multi($option_array, $selected = false, $options = array()) { if(is_string($option_array)) parse_str($option_array, $option_array); @@ -3468,6 +3482,7 @@ class e_form // JUST A DRAFT - generic renderForm solution + /* function renderForm($forms, $nocontainer = false) { $text = ''; @@ -3503,8 +3518,9 @@ class e_form } return $text; } - + */ // JUST A DRAFT - generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc + /* function renderFieldset($id, $fdata) { $colgroup = ''; @@ -3602,8 +3618,9 @@ class e_form "; return $text; } - + */ // The 2 functions below are for demonstration purposes only, and may be moved/modified before release. + /* function filterType($fieldarray) { return " frm-> filterType() is Deprecated    "; @@ -3613,9 +3630,10 @@ class e_form { return " frm-> filterValue() is Deprecated.   "; } - + */ /** - * Generates a batch options select component + * DEPRECATED!!! Use e_admin_form_ui::renderBatch() + * Generates a batch options select component * This component is generally associated with a table of items where one or more rows in the table can be selected (using checkboxes). * The list options determine some processing that wil lbe applied to all checked rows when the form is submitted. * @@ -3623,13 +3641,15 @@ class e_form * @param array ucOptions [optional] associative array of userclass option groups to display, keyed on the option value prefix * @return string the HTML for the form component */ + /* function batchoptions($options, $ucOptions = null) { + $text = "
".$this->select_open('execute_batch', array('class' => 'tbox select batch e-autosubmit', 'id' => false))." - ".$this->option('With selected...', '')." + ".$this->option('With selected...', '', true, 'hellodisabled')." "; @@ -3697,6 +3717,7 @@ class e_form return $text; } + */ } class form