mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Tweaks to admin-ui batch drop-down.
This commit is contained in:
@@ -71,6 +71,7 @@ class links_admin_ui extends e_admin_ui
|
|||||||
protected $listOrder = 'link_category,link_order ASC';
|
protected $listOrder = 'link_category,link_order ASC';
|
||||||
protected $listSorting = true;
|
protected $listSorting = true;
|
||||||
|
|
||||||
|
//FIXME TOOD - Filter out 'unassigned' entries by default.
|
||||||
|
|
||||||
public $current_parent = 0;
|
public $current_parent = 0;
|
||||||
public $sublink_data = null;
|
public $sublink_data = null;
|
||||||
|
@@ -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_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_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_meta_keywords' => array('title'=> LAN_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_sef' => array('title'=> LAN_SEFURL, '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_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' ),
|
'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)
|
'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'width' => '10%', 'forced'=>TRUE, 'thclass' => 'center last', 'class' => 'center', 'sort' => true)
|
||||||
);
|
);
|
||||||
|
@@ -1194,14 +1194,28 @@ class e_form
|
|||||||
return "<optgroup class='optgroup' label='{$label}'".($disabled ? " disabled='disabled'" : '').">";
|
return "<optgroup class='optgroup' label='{$label}'".($disabled ? " disabled='disabled'" : '').">";
|
||||||
}
|
}
|
||||||
|
|
||||||
function option($option_title, $value, $selected = false, $options = array())
|
/**
|
||||||
|
* <option> tag generation.
|
||||||
|
* @param $option_title
|
||||||
|
* @param $value
|
||||||
|
* @param $selected
|
||||||
|
* @param $options (eg. disabled=1)
|
||||||
|
*/
|
||||||
|
function option($option_title, $value, $selected = false, $options = '')
|
||||||
{
|
{
|
||||||
|
if(is_string($options)) parse_str($options, $options);
|
||||||
|
|
||||||
if(false === $value) $value = '';
|
if(false === $value) $value = '';
|
||||||
$options = $this->format_options('option', '', $options);
|
$options = $this->format_options('option', '', $options);
|
||||||
$options['selected'] = $selected; //comes as separate argument just for convenience
|
$options['selected'] = $selected; //comes as separate argument just for convenience
|
||||||
|
|
||||||
return "<option value='{$value}'".$this->get_attributes($options).">".defset($option_title, $option_title)."</option>";
|
return "<option value='{$value}'".$this->get_attributes($options).">".defset($option_title, $option_title)."</option>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use selectbox() instead.
|
||||||
|
*/
|
||||||
function option_multi($option_array, $selected = false, $options = array())
|
function option_multi($option_array, $selected = false, $options = array())
|
||||||
{
|
{
|
||||||
if(is_string($option_array)) parse_str($option_array, $option_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
|
// JUST A DRAFT - generic renderForm solution
|
||||||
|
/*
|
||||||
function renderForm($forms, $nocontainer = false)
|
function renderForm($forms, $nocontainer = false)
|
||||||
{
|
{
|
||||||
$text = '';
|
$text = '';
|
||||||
@@ -3503,8 +3518,9 @@ class e_form
|
|||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// JUST A DRAFT - generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc
|
// JUST A DRAFT - generic renderFieldset solution, will be split to renderTable, renderCol/Row/Box etc
|
||||||
|
/*
|
||||||
function renderFieldset($id, $fdata)
|
function renderFieldset($id, $fdata)
|
||||||
{
|
{
|
||||||
$colgroup = '';
|
$colgroup = '';
|
||||||
@@ -3602,8 +3618,9 @@ class e_form
|
|||||||
";
|
";
|
||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
// The 2 functions below are for demonstration purposes only, and may be moved/modified before release.
|
// The 2 functions below are for demonstration purposes only, and may be moved/modified before release.
|
||||||
|
/*
|
||||||
function filterType($fieldarray)
|
function filterType($fieldarray)
|
||||||
{
|
{
|
||||||
return " frm-> filterType() is Deprecated ";
|
return " frm-> filterType() is Deprecated ";
|
||||||
@@ -3613,8 +3630,9 @@ class e_form
|
|||||||
{
|
{
|
||||||
return " frm-> filterValue() is Deprecated. ";
|
return " frm-> filterValue() is Deprecated. ";
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
|
* DEPRECATED!!! Use e_admin_form_ui::renderBatch()
|
||||||
* Generates a batch options select component
|
* 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).
|
* 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.
|
* 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
|
* @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
|
* @return string the HTML for the form component
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
function batchoptions($options, $ucOptions = null)
|
function batchoptions($options, $ucOptions = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$text = "
|
$text = "
|
||||||
<div class='f-left btn-group'>
|
<div class='f-left btn-group'>
|
||||||
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' />
|
<img src='".e_IMAGE_ABS."generic/branchbottom.gif' alt='' class='icon action' />
|
||||||
".$this->select_open('execute_batch', array('class' => 'tbox select batch e-autosubmit', 'id' => false))."
|
".$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;
|
return $text;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
class form
|
class form
|
||||||
|
Reference in New Issue
Block a user