Skip to content
Snippets Groups Projects
Commit 978c1fad authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B6656-DragnDrop' into 'master'

Updated drag and drop

See merge request !170
parents 01ba775f e357ebeb
No related branches found
No related tags found
1 merge request!170Updated drag and drop
Pipeline #2140 passed
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment