2013-03-14 02:47:16 +00:00
|
|
|
$(function() {
|
2013-03-14 18:50:44 +00:00
|
|
|
var setup = function() {
|
|
|
|
$("#costsortable").sortable({
|
2013-03-15 04:34:42 +00:00
|
|
|
items: ".repoline",
|
2013-03-14 18:50:44 +00:00
|
|
|
handle: ".handle",
|
|
|
|
cursor: "move",
|
|
|
|
forceHelperSize: true,
|
|
|
|
start: function(event, ui) {
|
|
|
|
ui.item.children(".draghide").hide();
|
|
|
|
},
|
|
|
|
stop: function(event, ui) {
|
|
|
|
ui.item.children(".draghide").show();
|
|
|
|
var list = $("#costsortable").sortable("toArray");
|
|
|
|
var moved = ui.item.attr("id");
|
|
|
|
$.ajax({
|
|
|
|
'url': "@{RepositoriesReorderR}",
|
|
|
|
'data': {
|
|
|
|
'moved': moved,
|
|
|
|
'list': list
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
longpollcallbacks.add(setup);
|
|
|
|
setup();
|
|
|
|
|
2013-03-14 02:47:16 +00:00
|
|
|
});
|