Commits

victorlin  committed 079c9b8

Improve move event callback

  • Participants
  • Parent commits 8dd6813

Comments (0)

Files changed (1)

 				});
 			}
 
-			self.settings.move(draggable, target);
+			if (!$(target).hasClass('last')) {
+				self.settings.move('insert_before', source_li, dest_li);
+			} else {
+				self.settings.move('insert_after', source_li, dest_li);
+			}
 		},
 
 		on_dropzone_drop: function(event, ui) {
 						drop: function(event, ui) { self.on_dropzone_drop(event, ui); }
 					});
 				}
-				self.settings.move(draggable, target);
+				self.settings.move('append', $(draggable).parent(), $(target).parent());
 				return;
 			}
 			var target_dropzone = ul.children('li').children('.last').last();