related to #1609 fixing highlight issues when dragging a node in the tree

This commit is contained in:
Matthieu Leproux
2022-04-13 10:33:21 +02:00
parent e2c061d6a5
commit 24a11768f6
2 changed files with 28 additions and 0 deletions
+8
View File
@@ -206,6 +206,14 @@ $(document).ready(() => {
$('.cat-move-order-popin input[name=id]').val(-1);
});
$('.tree').on('mousedown mouseup', function mouseState(e) {
if (e.type == "mousedown") {
$(".tree").addClass("dragging")
} else if (e.type == "mouseup") {
$(".dragging").removeClass("dragging")
}
});
if (openCat != -1) {
var node = $('.tree').tree('getNodeById', openCat);
$('.tree').tree('openNode', node);
+20
View File
@@ -522,4 +522,24 @@ input[name="position"] {
color: #ffd7ad;
background-color: #f98100;
}
.jqtree-moving .move-cat-container {
background-color: #ffd7ad;
}
.jqtree-moving .move-cat-container .badge-container i,
.jqtree-moving .move-cat-container .node-icon{
color: #ffd7ad;
background-color: #f98100;
}
.dragging .move-cat-container {
pointer-events: none;
}
.dragging .move-cat-container .move-cat-toogler,
.dragging .move-cat-container .move-cat-action-cont a,
.dragging .move-cat-container .move-cat-title-container{
pointer-events: all;
}
</style>