Minor formatting tweaks
parent
ec03f8d17b
commit
b29590a185
|
|
@ -6,13 +6,11 @@
|
||||||
containment : 'parent',
|
containment : 'parent',
|
||||||
tolerance : 'pointer',
|
tolerance : 'pointer',
|
||||||
items : 'li',
|
items : 'li',
|
||||||
stop : function(event, ui)
|
stop : function(event, ui) {
|
||||||
{
|
|
||||||
var indexes = [],
|
var indexes = [],
|
||||||
lineItems = ui.item.parent().find('> li');
|
lineItems = ui.item.parent().find('> li');
|
||||||
|
|
||||||
lineItems.each(function(i)
|
lineItems.each(function(i) {
|
||||||
{
|
|
||||||
indexes.push($(this).find(':hidden[name="pk"]').val());
|
indexes.push($(this).find(':hidden[name="pk"]').val());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -20,8 +18,7 @@
|
||||||
url: ui.item.find('a.admin_sorting_url').attr('href'),
|
url: ui.item.find('a.admin_sorting_url').attr('href'),
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: { indexes: indexes.join(',') },
|
data: { indexes: indexes.join(',') },
|
||||||
success: function()
|
success: function() {
|
||||||
{
|
|
||||||
// set icons based on position
|
// set icons based on position
|
||||||
lineItems.each(function(index, element) {
|
lineItems.each(function(index, element) {
|
||||||
var icon = $(element).find('a.admin_sorting_url .fa');
|
var icon = $(element).find('a.admin_sorting_url .fa');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue