Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.arlenshop.fr_1556185825
/
htdocs
/
modules
/
csmegamenu
/
js
/
//srv/data/trash/vhost_www.arlenshop.fr_1556185825/htdocs/modules/csmegamenu/js/csmegamenu_dnd.js
/* * 2007-2013 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <contact@prestashop.com> * @copyright 2007-2013 PrestaShop SA * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ $(document).ready(function() { initTableDnD(); }); function objToString(obj) { var str = ''; for (var p in obj) { if (obj.hasOwnProperty(p)) { str += p + '=' + obj[p] + '&'; } } return str; } $.fn.rowCount = function() { return $('tr', $(this).find('tbody')).length; }; function initTableDnD(table) { if (typeof(table) == 'undefined') table = 'table.tableDnD'; $(table).tableDnD({ onDragStart: function(table, row) { originalOrder = $.tableDnD.serialize(); }, dragHandle: 'dragHandle', onDragClass: 'myDragClass', onDrop: function(table, row) { if (originalOrder != $.tableDnD.serialize()) { if (table.id == 'menu') { $.ajax({ type: 'POST', headers: { "cache-control": "no-cache" }, async: false, url : currentIndex + '&configure=' + name + '&token=' + token + '&sortpostition', data: $.tableDnD.serialize(), success: function(result) { $(".sidebar").html(result); } }); } else { //alert($.tableDnD.serialize()); $.ajax({ type: 'POST', headers: { "cache-control": "no-cache" }, async: false, url : currentIndex + '&configure=' + name + '&token=' + token + '&sortpostitionoption' + '&table_name=' + table.id, data: $.tableDnD.serialize(), success: function(result) { $(".sidebar").html(result); } }); id_menu = table.id.substring(14); $("#image_more_options" + id_menu).attr("src","../img/admin/less.png"); $("#option_menu_" + id_menu).show(); } } initTableDnD(); $('table.tableOption').each(function() { if($(this).rowCount() > 0) { id = $(this).attr("id"); initTableDnD("table." + id); } }); } }); }