Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
e357ebeb
Commit
e357ebeb
authored
Aug 08, 2019
by
Benjamin Baer
Committed by
Carsten Rose
Aug 08, 2019
Browse files
Updated drag and drop
parent
01ba775f
Changes
2
Hide whitespace changes
Inline
Side-by-side
javascript/src/DragAndDrop.js
View file @
e357ebeb
...
...
@@ -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
;
...
...
less/qfq-bs.css.less
View file @
e357ebeb
...
...
@@ -709,7 +709,7 @@ select.qfq-locked:invalid {
.qfqDropTarget {
height: 50px;
margin:
1px
;
margin:
0
;
border: 1px dashed #ccc;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment