mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
BUGFIX: removed sortable event from livequery as it no longer needs to be
This commit is contained in:
parent
6b7e9f576a
commit
4e8abded2e
@ -183,25 +183,23 @@
|
||||
/**
|
||||
* Sort Fields in the Field List
|
||||
*/
|
||||
$("#Fields_fields").live(function() {
|
||||
$(this).sortable({
|
||||
handle : '.fieldHandler',
|
||||
cursor: 'pointer',
|
||||
items: 'li.EditableFormField',
|
||||
placeholder: 'removed-form-field',
|
||||
opacity: 0.6,
|
||||
revert: true,
|
||||
change : function (event, ui) {
|
||||
$("#Fields_fields").sortable('refreshPositions');
|
||||
},
|
||||
update : function (event, ui) {
|
||||
// get all the fields
|
||||
var sort = 1;
|
||||
$("li.EditableFormField").each(function() {
|
||||
$(this).find(".sortHidden").val(sort++);
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#Fields_fields").sortable({
|
||||
handle : '.fieldHandler',
|
||||
cursor: 'pointer',
|
||||
items: 'li.EditableFormField',
|
||||
placeholder: 'removed-form-field',
|
||||
opacity: 0.6,
|
||||
revert: true,
|
||||
change : function (event, ui) {
|
||||
$("#Fields_fields").sortable('refreshPositions');
|
||||
},
|
||||
update : function (event, ui) {
|
||||
// get all the fields
|
||||
var sort = 1;
|
||||
$("li.EditableFormField").each(function() {
|
||||
$(this).find(".sortHidden").val(sort++);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user