Commit e357ebeb authored by Benjamin Baer's avatar Benjamin Baer Committed by Carsten Rose
Browse files

Updated drag and drop

parent 01ba775f
......@@ -162,26 +162,39 @@ var QfqNS = QfqNS || {};
n.DragAndDrop.prototype._buildOrderDropZones = function($object, e) {
this.removeDropAreas();
if ($object[0].id !== this.draggedId) {
if ($object.data("dnd-position") !== $("#" + this.draggedId).data("dnd-position") + 1) {
//if ($object[0].id !== this.draggedId) {
//if ($object.data("dnd-position") !== $("#" + this.draggedId).data("dnd-position") + 1) {
var $dropArea = this.buildDropArea("before", $object.data("dnd-id"), $object.data("dnd-position"));
//$dropArea.hide();
$object.before($dropArea);
}
//$dropArea.slideDown(500, 'swing');
var $lastDrop = this.buildDropArea("after", $object.data("dnd-id"), $object.data("dnd-position"));
//$lastDrop.hide();
$object.after($lastDrop);
//$lastDrop.slideDown(500, 'swing');
//$lastDrop.appendTo(this.$container);
//}
if ($object[0].id === this.lastChild) {
/*if ($object[0].id === this.lastChild) {
var $lastDrop = this.buildDropArea("after", $object.data("dnd-id"), $object.data("dnd-position"));
$lastDrop.appendTo(this.$container);
}
}
}*/
//}
};
n.DragAndDrop.prototype.removeDropAreas = function() {
if (this.$container.data("column")) {
this.$container.children(".qfqTempTable").remove();
}
this.$container.children(".qfqDropTarget").remove();
};
n.DragAndDrop.prototype.removeDropTarget = function(e) {
console.log(e);
};
n.DragAndDrop.prototype.makeSortable = function() {
var that = this;
var numberOfChildren = this.$container.children().length;
......
......@@ -709,7 +709,7 @@ select.qfq-locked:invalid {
.qfqDropTarget {
height: 50px;
margin: 1px;
margin: 0;
border: 1px dashed #ccc;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment