30Mar/10124
Demo of editable jquery tree with php codes
Right click the nodes to see available operations.
Press "Enter" to complete or press "Esc" to cancel an operation in adding or editing a node...
Because it is in demo mode, all changes will be reset if page refreshes...
http://code.google.com/p/editable-jquery-tree-with-php-codes/
Related posts:



January 15th, 2011 - 13:04
remove the & in front of $index on line 93
then test that if deleting an element works…
January 18th, 2011 - 23:47
Thanks that did the trick.
January 27th, 2011 - 20:29
Hi,
I,m using your tool but the changes after editing are not reflected …. It comes to the same state after refreshing….any idea???
January 28th, 2011 - 00:53
it may be in demo mode
//define(“DEMO_MODE”, true);
should be commented out…
January 28th, 2011 - 22:51
Hi Mekya,
thanks for a quick reply, but i’m not working in DEMO MODE.
Actually my project is an extension on a website which uses your code for creating hierarchies. I think they are using older version of code. Was there any bug in the older version related to unsuccessful edit/delete??Any new files added to the updated code related to this???
The changes after editing are not reflected.
thanks in advance,
VJ
January 30th, 2011 - 08:50
it may be a problem in connecting to mysql,
u should look at what server returns when an operaiton is done.
u also know but let me remind , u can use firebug plugin in firefox to see the server response…
bests,
Ahmet Oguz
February 2nd, 2011 - 12:41
I,m using your tool and I want to active the function drag & drop (Change the position of an item (Drag & Drop)
February 3rd, 2011 - 07:14
Drag and drop is already implemented, do u have a problem in using drag & drop?
meanwhile, sorry for late reply…
February 10th, 2011 - 22:07
Hi Mekya,
First of all I just wanted to say thanks, and that this is amazing!
I’m going through and modifying your script to work with my database, but I was wondering whether there was a simple way of making each element a clickable link?
I want to use your menu for my CMS to navigate between pages.
Thanks,
Owen
February 12th, 2011 - 13:58
Hi Owne,
Sorry for late reply…
i think u should add link somewhere at this line
then in this function
u should parse the link…
Bests,
A. Oguz
February 21st, 2011 - 10:58
Hi,
Thanks for this.
I have been playing around with this trying to change it for what i need, but i have noticed the doubleclick even occurs twice
February 21st, 2011 - 18:25
Hi Mekya,
Sorry for sounding dumb, but how do I parse the link in the init.js function?
I’m fairly new to JS. I’ve put the link into the DBTreeManager.php page, but I can’t work out how to do the second part.
Please help! lol
Thanks,
Owen
March 14th, 2011 - 10:45
Hi Mekya,
I was wondering whether you’d had a chance to look at my query above yet?
Thanks,
Owen
March 16th, 2011 - 01:33
single and double click function occur twice if the node has children. how to solve this problem? thanks.
March 16th, 2011 - 02:10
i just solve single/double click function occur twice problem by unbind click before bind like:
$(‘span’, obj).addClass(‘text’)
.bind(‘selectstart’, function() {
return false;
}).unbind(“click”).click(function(){
March 23rd, 2011 - 03:07
Thank you Akmal…
April 27th, 2011 - 14:35
Hi,
I was hoping you could help me with the query below:
Thanks,
Owen
Hi Owne,
Sorry for late reply…
i think u should add link somewhere at this line
then in this function
u should parse the link…
April 28th, 2011 - 06:12
sorry, Could u be more specific?
I dont remember the query and as I see I didnt give the line and function link…
April 28th, 2011 - 12:57
Sorry, it was the query I posted on
12 February 2011 at 13:58 and on
21 February 2011 at 18:25.
I’m trying to use your tree menu as a navigation system for a CMS and i wanted to know how to parse links to make them go to the individual “pages” URL.
Hope that makes sense!!
Owen
May 1st, 2011 - 10:27
yeap I remember,
I saw my comment and as I saw gave the line and function link.
anyway, take a look at this line
http://code.google.com/p/editable-jquery-tree-with-php-codes/source/browse/trunk/js/init.js#53
uncomment that line,
after that when u click an item, an alert appears to show the id of that element.if u store url in the id field, then u can make visitor go to that url with location.href javascript code…
using id for storing url may cause some problems I am not sure about that but it will be better if u can use some other attribute rather than id…
May 2nd, 2011 - 11:15
when i expand then it doesn’t expand the items. just + is converted to – and nothing else happens.
that’s the html which my code generates. if you plz find some issue. plz let me know
Al A Carte Menu
ANTIPASTI
Antipasto Napoletano
Venison carpaccio
Prosciutto di Parma
Vitello tonnato
Octopus carpaccio
Grilled "calamari"
Deep fried courgette flower filled with Taleggio
PRIMI PIATTI – PASTA
Seasonal soup of the day
Risotto with wood pidgeon
Spaghetti Napoletani -
Cavatelli pasta
Fettuccine
Caserecce pasta
SECONDI PIATTI – CARNE / PESCE
Seared scallops in crispy Parmesan basket,
Pan fried sword fish steak with seared cherry tomato and grapes
Fillet of seabream, acquapazza sauce, Swiss chard stalks
Calves Liver with fennel and potatoes gratin, wild mushrooms, Taggiasca olives conserve
Veal scaloppina "al limone" with artichokes and Burrata
Pan fried breast of duck fresh cherry & Vinsanto duck gravy with spinach, baked shallots
Grilled ribeye steak "Blue di capra" cheese sauce,with (cucumber garlic oil "spaghettata")
Campania buffalo mozzarella with mixed Italian tomatoes and basil salad
Dessert (Dolci)
Dolci
MANGO PANNA COTTA
PEACH PIEMONTESE
ZUCCOTTO FIORENTINO
CHOCOLATE TARTE
FRESH MIXED BERRIES
TIRAMISU' DELLA CASA
BAKED CHEESE CAKE
GELATI E SORBETTI
VINSANTO
FORMAGGI
CAFFETTERIA
ESPRESSO, MAROCCHINO, TEAS, TISANES, AMERICANO
CAPPUCCINO, DOUBLE ESPRESSO, DECAFFINATED
ITALIAN HOT CHOCOLATE
CAFFE' CORRETTO
AFFOGATO
IRISH COFFEE
SetMenu
2 Courses
3 Courses
thank you
May 2nd, 2011 - 13:08
when an folder is expanded, its children get loaded via Ajax.
dont try to load all items in initialization.
May 10th, 2011 - 07:32
Hi Mekya,
First of all thanks for such a gud work!!!
Now when I try to delete a node at my end which have child nodes below then it displays error in ajax and doesn’t delete the node, just after that when I try to delete the child node first then it shows “Only one operation can be active at any time.” message.
I also tried to delete a node (Folder-3) with children at link :-
http://www.mekya.com/blog/lang/eng/2010/03/demo-of-editable-jquery-tree-with-php-codes-duzenlenebilir-jquery-agac-yapisinin-demosu/
and it also showed the message “An error occured in the operation” and didn’t delete the node.
I looked into your code and changed the code in file DBTreeManager.php line 132 to :-
$result = $this->db->query($sql);
if (mysql_num_rows ($result))
from
if ($result = $this->db->query($sql))
and it worked at my end, now the nodes are deleting which have child nodes below them.
Hope this works out for somebody else also
Thanks
May 12th, 2011 - 07:39
Ashish,
Thank u for sharing ur experience…
May 15th, 2011 - 13:08
Thank you for this great tree, I was looking for a tree with full functionality and found one
I only need to add multiselect, query optimalisations, and implementing and it is ready to do what it is designed for
June 5th, 2011 - 23:13
I must be doing something wrong. I want to run this in file system mode (not mySQL). I’ve loaded all the files to my server and chage:
define (“TARGET_PLATFORM”, DATABASE_PLATFORM);
to
define (“TARGET_PLATFORM”, FILE_SYSTEM_PLATFORM);
When I run the index.php file, I get a blank page. What am I missing?
Thanks
June 6th, 2011 - 18:42
hi,
have u set FILE_ROOT
http://code.google.com/p/editable-jquery-tree-with-php-codes/source/browse/trunk/includes/config.php#42
June 17th, 2011 - 02:34
yes, i’ve tried various different setting from:
define(“FILE_ROOT”, “/public_html/mp3/songs/”);
which is the root folder on the server I want to show
to a full url:
(“FILE_ROOT”, “http://www.mysite.com/mp3/songs/”);
to the location of the index.php file on the server.
I still get a blank page.
June 17th, 2011 - 18:47
what is the address of your site ?
June 17th, 2011 - 22:08
can I email you the address?
June 23rd, 2011 - 14:22
hello all,
i just want to ask about uploading files using this tree , so how can i upload files when i add files to this tree, so the clients can download this files ,
thank you very much
June 25th, 2011 - 08:12
u need to use another plugin, script or something, then u need to integrate that script and this tree
June 28th, 2011 - 14:00
Hello!
I implemented you great script, but finally when testing it with CHROME or IE there is a massssive problem, even in this demo over here:
When i click on for example FOLDER-1 (the textual part!) than it imidiatly Jumps at the end of FOLDER-2 … So it gets dropped there :/
This just happens in IE and CHROME over here… Can anybody help me out?
it is quite impossible to work with it, cause the whole sorting gets mad with this
June 28th, 2011 - 19:21
it is interesting, i am using chrome in ubuntu and there is no problem like that or I am missing something…
July 1st, 2011 - 09:33
Strange thing, but we are able to recreate ut on a different machine
Sorry for not giving more details…
July 7th, 2011 - 09:38
Hello again
I have one more Question: I am sure there is a way to make just files sortable… So, Folders can’t be dragged and dropped, just files…
but i can’t find a way to implement that :/
Can anyone help me out shortly?
Best regards from Germany,
BennY
July 9th, 2011 - 11:57
Hello BennY,
sorting can be done in this function when software is in filesystem mode…
July 19th, 2011 - 02:23
Hi,
What is the best way to have the editable tree store a hyperlink? Seems that the add function should be updated to allow for a link and a field should be added in the database to store that data. I want to know where the code must be updated to do this. I tried specifying the hyperlink as HTML in the text field, but the <a href… tag is modified into text by the jquery and isn't hyperlinked. There must be many people who have implemented this hyperlink function. Thanks.
July 19th, 2011 - 06:58
I think hyperlink should be written somewhere in the item, it may be invisible after that when an item is clicked it can fetch and open the url with location.href…
July 19th, 2011 - 15:44
This is not doable now because the item name adds other characters to the HTML.
This
msn.com
becomes
msn.com
Is there a way around this?
July 19th, 2011 - 15:48
This is not doable now because the item name adds other characters to the HTML.
This
http://www.msn.com_
becomes
msn.com_
Is there a way around this?
July 19th, 2011 - 15:55
In my previous two comments, I tried to say that the HTML markup for the link was being changed to have the codes for apostrophe. But it seems that the problem is that in the treeview the nodes are shown as HTML markup instead of as hyperlink. Nothing is wrong about changing the apostrophe. The problem is that the treeview doesn’t know how that the HTML markup should be displayed as hyperlinks. There must be a place in the code where the treeview could be told to accept and display HTML for the node names.
July 27th, 2011 - 07:44
$out = $treeManager->deleteElement($elementId, &$index, $ownerEl);
i removed ‘&’ in this parameters,
it will affect any where
August 23rd, 2011 - 04:56
The tree does not work with an Apache alias. It works when Apache’s document root is set to the tree folder.
August 23rd, 2011 - 05:04
When installed inside a subfolder in Apache’s document root, or with an alias, the right click on the root’s child folders does not work.
Also, on the expansion of the root’s child folder, the following error message is displayed:
Deprecated: Call-time pass-by-reference has been deprecated in C:\workspace\editable-jquery-tree-with-php-codes_4Jun2010\editable-jquery-tree-with-php-codes\temp\manageStructure.php on line 93
August 23rd, 2011 - 12:10
Also, when a tree node is edited inline or when a new node is added, hitting enter or clicking outside the node after typing the name, does not complete the operation.
The cursor continues to blink in the inline edit box
August 23rd, 2011 - 22:54
no i dont think it will affect anywhere,
sorry for late reply…
August 23rd, 2011 - 22:55
propably removing the & before a parameter on line 93 in manageStructure.php will fix the problem.
Sorry for late reply…
September 6th, 2011 - 08:51
Can this code be available in asp.net ?
September 6th, 2011 - 10:33
sorry it is not available in asp.net