manager: add handles to drag/drop multisort (forms) elements (#10933)

This commit is contained in:
Frédéric Péters 2016-05-15 11:38:50 +02:00
parent f98582c5a4
commit 156f9fc0e7
1 changed files with 2 additions and 1 deletions

View File

@ -31,10 +31,11 @@ function multisort(element)
if (category_value && $(x).val().indexOf(category_value + ':') != 0) {
return;
}
$('<li data-value="' + $(x).val() + '">' + $(x).text() + '</li>').appendTo($ul);
$('<li data-value="' + $(x).val() + '"><span class="handle">⠿</span>' + $(x).text() + '</li>').appendTo($ul);
});
$ul.appendTo(element);
$ul.sortable({
handle: '.handle',
update: function(event, ui) {
var options = Array();
var select = $(element).find('select');