Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hierarchy_manager
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
hierarchy_manager
Commits
3573b101
Commit
3573b101
authored
4 years ago
by
Marco Gandi
Committed by
Mingsong Hu
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3191599
by elgandoz: Modal not opening after search/drag-and-drop
parent
0869891a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
Issue #3191599: Modal not opening after search/drag-and-drop
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/Plugin/jstree/hm.jstree.js
+6
-10
6 additions, 10 deletions
js/Plugin/jstree/hm.jstree.js
with
6 additions
and
10 deletions
js/Plugin/jstree/hm.jstree.js
+
6
−
10
View file @
3573b101
...
...
@@ -27,7 +27,7 @@
};
let
options
;
var
offset
=
0
;
if
(
optionsJson
)
{
options
=
JSON
.
parse
(
optionsJson
);
if
(
options
.
theme
)
{
...
...
@@ -58,12 +58,12 @@
},
plugins
:
[
"
search
"
,
"
dnd
"
]
});
// Node move event.
treeContainer
.
on
(
"
move_node.jstree
"
,
function
(
event
,
data
)
{
const
thisTree
=
data
.
instance
;
const
movedNode
=
data
.
node
;
if
(
!
rollback
)
{
let
list
=
thisTree
.
get_node
(
data
.
parent
).
children
;
let
before
=
''
;
...
...
@@ -71,7 +71,7 @@
if
(
data
.
position
>
0
)
{
before
=
list
[
data
.
position
-
1
];
}
if
(
data
.
position
<
list
.
length
-
1
)
{
after
=
list
[
data
.
position
+
1
];
}
...
...
@@ -96,18 +96,14 @@
alert
(
"
Error: Can't connect to the server.
"
);
rollback
=
true
;
thisTree
.
move_node
(
movedNode
,
data
.
old_parent
,
data
.
old_position
);
});
});
}
else
{
rollback
=
false
;
}
});
treeContainer
.
on
(
'
ready.jstree
'
,
function
(
event
,
data
)
{
Drupal
.
attachBehaviors
(
event
.
target
);
});
treeContainer
.
on
(
'
open_node
.jstree
'
,
function
(
event
,
data
)
{
treeContainer
.
on
(
'
ready.jstree open_node.jstree move_node.jstree search.jstree clear_search
.jstree
'
,
function
(
event
,
data
)
{
Drupal
.
attachBehaviors
(
event
.
target
);
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment