Unfortunately this feature wasn't properly reviewed and tested, and it
had many bugs, some of them critical and hard to fix, like validations
being skipped in concurrent requests.
So we're removing it before releasing version 1.1. We might add it back
in the future if we manage to solve the critical issues.
This commit reverts commit 836f9ba7.
23 lines
495 B
JavaScript
23 lines
495 B
JavaScript
(function() {
|
|
"use strict";
|
|
App.Sortable = {
|
|
initialize: function() {
|
|
$(".sortable").sortable({
|
|
update: function() {
|
|
var new_order;
|
|
new_order = $(this).sortable("toArray", {
|
|
attribute: "data-answer-id"
|
|
});
|
|
$.ajax({
|
|
url: $(".sortable").data("js-url"),
|
|
data: {
|
|
ordered_list: new_order
|
|
},
|
|
type: "POST"
|
|
});
|
|
}
|
|
});
|
|
}
|
|
};
|
|
}).call(this);
|