Questions tagged [jstree-dnd]

A plugin for the popular jQuery plugin jsTree. jsTree-dnd (drag and drop) makes it possible to drag and drop tree nodes and rearrange the tree.

45 questions
4
votes
2 answers

Create Functionality in Context Menu of jsTree not working

New nodes won't be created when 'types' plugin is defined. Please look at this fiddle. I'm unable to create new Nodes in the tree. http://jsfiddle.net/z8L5r9w3/1/ $('#jstree').jstree({ "core" : { "check_callback" : true, "data" : [ {…
G.Brown
  • 369
  • 3
  • 16
4
votes
1 answer

JStree - Only copy children of folder on dnd

Is there an option on the jstree check callback or dnd plug-ins that will only copy the children of a folder over, when a folder is dragged to another tree? I want to copy just the children inside the folder when copying it and not the folder as…
NiallMitch14
  • 1,198
  • 1
  • 12
  • 28
4
votes
2 answers

Disable drag'n'drop from a level to another one

I've a treeview formed from jstree and I'd like to disable drag'n'drop node from a level to another. Let's take an example: Branch 1 leaf 1 leaf 2 leaf 3 Branch 2 leaf 4 leaf 5 Branch 3 leaf 6 leaf 7 Branch 4 leaf 8 I want the user to…
Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
3
votes
1 answer

Adding HTML elements in the JSON data

Following is my JSON Data validated using JSONLint: [{ "text": "Products", "data": {}, "children": [{ "text": "Fruit", "data": { "price": "", "quantity": "", "AddItem": "+", "RemoveItem": "×" }, …
Yash Saraiya
  • 1,035
  • 1
  • 20
  • 40
3
votes
1 answer

jsTree addClass isn't remembered in some instances

Using jsTree and the drag and drop plugin, I'm trying to illustrate when a node's position has been changed. Using the move_node.jstree event, I add a class of isChanged to the node that is moved and this works fine. However, if I move a node that…
Chris Spittles
  • 15,023
  • 10
  • 61
  • 85
2
votes
1 answer

DND icon not changing on-screen, but is changing in DOM

I need to be able to drag a tree node to a div. I'm having problems getting the mouseicon to render correctly. It always displays as a X (jstree-er), even when the class in the DOM is changed to jstree-ok. I have debugged and am certain that the DOM…
Janine Rawnsley
  • 1,240
  • 2
  • 10
  • 20
2
votes
2 answers

jsTree move child to root from one tree to other

I am facing problem in jsTree. I want to move child node to root node and viseversa. Also i can move from first tree child to root of second tree. Please help me . Please find my below jsfiddle link.…
Mohammed Farooq
  • 227
  • 1
  • 5
  • 23
2
votes
2 answers

JsTree drag drop - Icon not showing while moving

I have a JsTree with drag and drop plugin enabled. I'm also using an angular directive, https://github.com/ezraroi/ngJsTree. All is working fine, however, the node being moved does not show while moving. Drag dropping is working though, you just…
Charbel
  • 658
  • 5
  • 13
2
votes
1 answer

How to use jstree v3 plugin with reorder only

I am using jsTree V3.0.8 (http://www.jstree.com/) how to reorder only when use dnd plugin like at V1(http://johntang.github.io/JsTree/_docs/dnd.html#demo2)
thinhnk
  • 351
  • 3
  • 12
1
vote
1 answer

jsTree ajax parameter not even sending requests

I am copying everything from the docs of jsTree section about mySQL and php. I've got no clue what could be wrong, I delibratly have changed nothing from the example given, to make sure it is not my fault and still, nothing. I know that it should…
1
vote
0 answers

JsTree row style

I'm trying to style specific rows in my jsTree. Is there a way how can I change color which depends on JSON value (if I send "isVisible")? For example, I have X records, some of them are visible to the end-user and in my dashboard, I would like to…
1
vote
1 answer

js tree is not working in ie when handle check/uncheck event and set all check box true together

I am using jstree to bind data. I have checked (select) all checkbox and also call check/uncheck event of checkbox. it is working fine in Chrome but in IE i can handle check/uncheck event but it is not checked (select) all checkbox by…
Hitesh
  • 1,188
  • 5
  • 30
  • 52
1
vote
1 answer

jsTree get siblings of a node

I'm using drag and drop with jsTree, and when I drag a node to a new position, I have to update not only its position, but the positions of its siblings too in the database. Here's an example: If I drag New node into node Gamme 1, now it's…
Jolan
  • 681
  • 12
  • 39
1
vote
1 answer

jstree dnd plugin - prevent move after drop?

I need to execute an ajax call after the user moves a node in a jsTree using the dnd plugin. If that ajax call returns an error, I need to either prevent the move from happening, or reverse the action altogether. From the move_node event listener,…
Redtopia
  • 4,947
  • 7
  • 45
  • 68
1
vote
0 answers

Why doesn't jsTree plugin drag and drop always work?

I'm using the great JSTree jQuery plugin and have configured it to use the 'dnd' (drag and drop plugin), and it is working properly. However, half of the time I try to drag a file into a folder, it does not work. It shows the green check mark as if…
1
2 3