add double click event with jquery
- Single Page
Posted 04 March 2012 - 13:09 PM
This is my question, as I can list you could add to the event with jquery to double click to edit the contents of the table, for example, instead of pressing the edit button, can double click on the rowand has the same effect when I press the edit button.
Thanks and forgive my mistakes in English
Posted 28 February 2013 - 16:55 PM
Hey, I've tryed to do it today too.
So, my solution is something like:
* It work ok with the theme "flexigrid"
1) In the file /assets/grocery_crud/themes/flexigrid/views/list.php
About line 28, abvore the following foreach ...
<?php foreach($list as $num_row => $row){ ?>
you should change the next line to:
<tr <?php if(!$unset_edit){?> ondblclick="editMe('<?php echo $row->edit_url ?>')" <?php } if($num_row % 2 == 1){?>class="erow"<?php }?>>
2) in the file /assets/grocery_crud/themes/flexigrid/views/list_template.php
At the end of file, add this
<?php if (!$unset_edit) { ?> <script> function editMe(url){ window.location.href = url; } </script> <?php } ?>
Maybe is not the best solution, but in my case, I wanna this behavior in all pages that I use GroceryCrud.
Works fine!
Posted 05 June 2013 - 20:09 PM