I created a small module with a table that has the option of sorting rows. This looks identical to the table in categories.
The sort function works, but does not update data in the DB table module.
Below is a significant piece of code.
Please suggest what to change, add some parameters, or refer to other variables.
<script type="text/javascript" src="../js/jquery/plugins/jquery.tablednd.js"></script> <form id="module_form" class="defaultForm form-horizontal" action="updatePositions" method="post" enctype="multipart/form-data" novalidate=""> <input type="hidden" name="page" value="{$page|intval}"/> <input type="hidden" name="selected_pagination" value="{$selected_pagination|intval}"/> [...] <div class="panel-footer"> <a href="index.php?controller=AdminModules&configure={$name}&token={$token|escape:'html':'UTF-8'}" class="btn btn-default"> <i class="process-icon-back"></i> Back to list</a> </div> </div> </div> </form> <script type="text/javascript" src="../js/admin/dnd.js"></script> <script type="text/javascript"> var come_from = 'dic'; var alternate = '1'; </script>
I also tried to create an "ajax.php" file where I would intercept the query, for example: url: {$ url_base | escape: 'html': 'UTF-8'} modules / dpeasyextendproducts / ajax.php? secure_key = {$ secure_key | escape: 'html' : 'UTF-8'} but I do not really know how to construct it in JavaCcriot.
Best regards.