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
|
* 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++);
|
});
|
||||||
});
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user