mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 03:24:20 +02:00
#9 related - use type comma on media manager page;
multiselect "selected" fix
This commit is contained in:
@@ -543,6 +543,7 @@ class media_form_ui extends e_admin_form_ui
|
||||
|
||||
|
||||
|
||||
/*
|
||||
function media_category($curVal,$mode) // not really necessary since we can use 'dropdown' - but just an example of a custom function.
|
||||
{
|
||||
|
||||
@@ -575,9 +576,10 @@ class media_form_ui extends e_admin_form_ui
|
||||
}
|
||||
$text .= "</select>";
|
||||
return $text;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
class media_admin_ui extends e_admin_ui
|
||||
{
|
||||
|
||||
@@ -608,7 +610,7 @@ class media_admin_ui extends e_admin_ui
|
||||
'checkboxes' => array('title'=> '', 'type' => null, 'data'=> null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
|
||||
'media_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE, 'nolist'=>TRUE),
|
||||
'media_url' => array('title'=> 'Preview', 'type' => 'image', 'data'=> 'str', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>TRUE, 'writeParms'=>'thumb=180&thumb_urlraw=0&thumb_aw=180', 'width' => '110px'),
|
||||
'media_category' => array('title'=> LAN_CATEGORY, 'type' => 'method', 'data'=> 'comma', 'width' => 'auto', 'filter' => true, 'batch' => true,'writeParms'=>'multiple=1'),
|
||||
'media_category' => array('title'=> LAN_CATEGORY, 'type' => 'comma', 'data'=> 'str', 'width' => 'auto', 'filter' => true, 'batch' => true),
|
||||
|
||||
// Upload should be managed completely separately via upload-handler.
|
||||
// 'media_upload' => array('title'=> "Upload File", 'type' => 'upload', 'data'=> false, 'readParms' => 'hidden', 'writeParms' => 'disable_button=1', 'width' => '10%', 'nolist' => true),
|
||||
@@ -749,6 +751,8 @@ class media_admin_ui extends e_admin_ui
|
||||
$this->cats[$cat] = $row['media_cat_title'];
|
||||
}
|
||||
asort($this->cats);
|
||||
|
||||
$this->fields['media_category']['writeParms'] = $this->cats;
|
||||
|
||||
$pref = e107::getPref();
|
||||
$tp = e107::getParser();
|
||||
|
@@ -1034,7 +1034,7 @@ class e_form
|
||||
if(vartrue($options['multiple']))
|
||||
{
|
||||
$name = (strpos($name, '[') === false) ? $name.'[]' : $name;
|
||||
$selected = explode(",",$selected);
|
||||
if(!is_array($selected)) $selected = explode(",",$selected);
|
||||
}
|
||||
$text = $this->select_open($name, $options)."\n";
|
||||
|
||||
|
Reference in New Issue
Block a user