mirror of https://github.com/xwiki-labs/cryptpad
Fix editing response with ordered list in forms
This commit is contained in:
parent
9c34e9e779
commit
614d3834a3
|
@ -2334,6 +2334,12 @@ define([
|
|||
}
|
||||
}
|
||||
});
|
||||
var sortNode = function (order) {
|
||||
order.forEach(function (uid) {
|
||||
$tag.append($tag.find('[data-id="'+uid+'"]'));
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
tag: tag,
|
||||
isEmpty: function () { return !this.getValue(); },
|
||||
|
@ -2348,7 +2354,7 @@ define([
|
|||
var toSort = extractValues(opts.values).map(function (val) {
|
||||
return invMap[val];
|
||||
});
|
||||
sortable.sort(toSort);
|
||||
sortNode(toSort);
|
||||
reorder(true);
|
||||
},
|
||||
setEditable: function (state) {
|
||||
|
@ -2365,7 +2371,7 @@ define([
|
|||
var toSort = val.map(function (val) {
|
||||
return invMap[val];
|
||||
});
|
||||
sortable.sort(toSort);
|
||||
sortNode(toSort);
|
||||
reorder();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue