Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
978c1fad
Commit
978c1fad
authored
Aug 08, 2019
by
Carsten Rose
Browse files
Merge branch 'B6656-DragnDrop' into 'master'
Updated drag and drop See merge request
!170
parents
01ba775f
e357ebeb
Pipeline
#2140
passed with stages
in 4 minutes and 58 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
javascript/src/DragAndDrop.js
View file @
978c1fad
...
...
@@ -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 @
978c1fad
...
...
@@ -709,7 +709,7 @@ select.qfq-locked:invalid {
.qfqDropTarget {
height: 50px;
margin:
1px
;
margin:
0
;
border: 1px dashed #ccc;
}
...
...
Write
Preview
Supports
Markdown
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