On Wed, 2010-06-23 at 17:17 +0200, [email protected] wrote:
> From: Jan Provaznik <[email protected]>
> 
> Added missing JS function which checks checkbox on click anywhere in row.
> ---
>  src/app/views/instance/_list.html.erb |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/src/app/views/instance/_list.html.erb 
> b/src/app/views/instance/_list.html.erb
> index 9d12c76..4328978 100644
> --- a/src/app/views/instance/_list.html.erb
> +++ b/src/app/views/instance/_list.html.erb
> @@ -1,3 +1,15 @@
> +<script type="text/javascript">
> +  function clickRow(ev) {
> +    var box = $('input[name="image_id[]"]', ev.target.parentNode);
> +    if ($(ev.target).attr('name') != "image_id[]")
> +      box.attr('checked', !box.attr('checked'));
> +  }
> +
> +  function checkAll(ev) {
> +    $('input[name="image_id[]"]', dataTable_instances_table).attr('checked', 
> $(ev.target).attr('checked'))
> +  }
> +</script>
> +
>  <%= datatable(
>    Instance::COLUMNS.map {|c| c[:opts]},
>    {

ACK, works for me.

-j

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to