1
0
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:
SecretR
2013-01-09 10:49:33 +02:00
parent b5d3e19eed
commit e7e51734d7
2 changed files with 7 additions and 3 deletions

View File

@@ -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();

View File

@@ -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";