BUGFIX: removed sortable event from livequery as it no longer needs to be

This commit is contained in:
Will Rossiter 2010-05-24 02:49:16 +00:00
parent 6b7e9f576a
commit 4e8abded2e

View File

@ -183,25 +183,23 @@
/** /**
* Sort Fields in the Field List * Sort Fields in the Field List
*/ */
$("#Fields_fields").live(function() { $("#Fields_fields").sortable({
$(this).sortable({ handle : '.fieldHandler',
handle : '.fieldHandler', cursor: 'pointer',
cursor: 'pointer', items: 'li.EditableFormField',
items: 'li.EditableFormField', placeholder: 'removed-form-field',
placeholder: 'removed-form-field', opacity: 0.6,
opacity: 0.6, revert: true,
revert: true, change : function (event, ui) {
change : function (event, ui) { $("#Fields_fields").sortable('refreshPositions');
$("#Fields_fields").sortable('refreshPositions'); },
}, update : function (event, ui) {
update : function (event, ui) { // get all the fields
// get all the fields var sort = 1;
var sort = 1; $("li.EditableFormField").each(function() {
$("li.EditableFormField").each(function() { $(this).find(".sortHidden").val(sort++);
$(this).find(".sortHidden").val(sort++); });
}); }
}
});
}); });
/** /**