JS changes to load drag and drop

This commit is contained in:
Christophe Vilayphiou committed 2012-05-22 17:37:15 +08:00
1 parent 1c35e38097
commit 541aa5831e
2 files changed
+8 -1

No files matched your search

+5 -1
View File
@@ -34,6 +34,10 @@ $('.part_kind').live('click', function() {
});
$(document).ready(function(){
bindTreeDragHandle();
});
var bindTreeDragHandle = function(){
$('ol.sortable').nestedSortable({
disableNesting: 'no-nest',
forcePlaceholderSize: true,
@@ -52,4 +56,4 @@ $(document).ready(function(){
$.post("<%= Rails.application.routes.url_helpers.admin_update_position_path %>", { id: ui.item.attr('id'), parent_id: ui.item.parent().closest('li').attr('id'), position: ui.item.index() } );
}
});
});
}