diff --git a/src/main/webapp/js/directives.js b/src/main/webapp/js/directives.js index 3553349b..d23d818b 100644 --- a/src/main/webapp/js/directives.js +++ b/src/main/webapp/js/directives.js @@ -364,6 +364,8 @@ module.directive('draggable', function() { restrict : 'A', link : function(scope, element, attrs) { element.draggable({ + revert: 'invalid', + helper: 'clone', axis: 'y' }).data('source', scope.$eval(attrs.draggable)); } @@ -385,6 +387,10 @@ module.directive('droppable', [ 'CategoryService', 'FeedService', function(Categ var source = draggable.data('source'); var target = scope.$eval(attrs.droppable); + if (angular.equals(source, target)) { + return; + } + var data = { id: source.id, name: source.name