Fix clicking on file name toggles checkbox

This commit is contained in:
Nathan Gray 2013-10-01 16:27:50 +00:00
parent 4449e9a44b
commit 04ce0638a9
3 changed files with 4 additions and 6 deletions

View File

@ -275,7 +275,7 @@ class filemanager_select
'mime' => $mime,
'onclick' => $is_dir ? "return app.filemanager.select_goto('".addslashes($path)."'".($et2?',widget':'').");" :
($content['mode'] != 'open-multiple' ? "return app.filemanager.select_show('".addslashes($name)."');" :
"return app.filemanager.select_toggle('".addslashes($name)."');"),
"return app.filemanager.select_toggle('".addslashes($name)."',widget);"),
);
if ($is_dir && $content['mode'] == 'open-multiple')
{

View File

@ -673,10 +673,8 @@ app.filemanager = AppJS.extend(
editfield.value = file;
return false;
},
select_toggle: function(file)
select_toggle: function(file,widget)
{
checkbox = document.getElementById("exec[dir][selected]["+file+"]");
if (checkbox) checkbox.checked = !checkbox.checked;
return false;
widget._parent.getWidgetById('selected['+file+']').set_value(file);
}
});

View File

@ -50,7 +50,7 @@
<row class="row">
<vfs-mime align="center" id="$row" options="16" class="selectIcon"/>
<vfs id="$row" onclick="$row_cont[onclick]"/>
<checkbox align="right" id="selected[]" options="&quot;$row_cont[name]&quot;"/>
<checkbox align="right" id="selected[{$row_cont[name]}]" options="&quot;$row_cont[name]&quot;"/>
</row>
</rows>
</grid>