workaround because chrome doesn't support onclick in select options

This commit is contained in:
lenovo
2022-11-14 13:42:18 +01:00
parent 49daf21ae6
commit 48e1572957
8 changed files with 46 additions and 37 deletions

View File

@@ -2,25 +2,24 @@
function mp_filter_drop_down($key, &$filter) {
/*
onfocusin="filter_show_only_selection(this, '.json_encode($value->indexes).', '."'".$key."'".')"
onclick="filter_show_only_selection(this, '.json_encode($value->indexes).', '."'".$key."'".')"
onfocus="filter_show_only_selection(this, '.json_encode($value->indexes).', '."'".$key."'".')"
onclick="filter_show_only_selection(this, '.json_encode(array()).', '."'".$key."'".')"
onchange="filter_show_only_selection(this, '.json_encode($value->indexes).', '."'".$key."'".')"
*/
$content = '
<select
form="ljdp_form"
class="filter_menu filter_menu_drop"
onchange="filter_show_only_selection(this, '.json_encode(array()).', '."'".$key."'".')"
>
<option
selected
onclick="filter_show_only_selection(this, '.json_encode(array()).', '."'".$key."'".')"
>
'.$key.'
</option>
<option selected>'.$key.'</option>
';
foreach ($filter as $value) {
$content .= '
<option
onclick="filter_show_only_selection(this, '.json_encode($value->indexes).', '."'".$key."'".')"
>
'.$value->_name.'
</option>
<option title="'.json_encode($value->indexes).'">'.$value->_name.'</option>
';
}
$content .= '