mekya

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:

    Editable jquery tree with PHP Codes
    Editable jquery tree now saves its state in cookies
    Expand/Collapse All feature in editable jquery tree with php codes
    traceper web interface demo
Comments (124) Trackbacks (1)
  1. remove the & in front of $index on line 93
    then test that if deleting an element works…

  2. Thanks that did the trick.

  3. Hi,

    I,m using your tool but the changes after editing are not reflected …. It comes to the same state after refreshing….any idea???

  4. it may be in demo mode
    //define(“DEMO_MODE”, true);
    should be commented out…

  5. 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

  6. 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

  7. I,m using your tool and I want to active the function drag & drop (Change the position of an item (Drag & Drop)

  8. Drag and drop is already implemented, do u have a problem in using drag & drop?
    meanwhile, sorry for late reply…

  9. 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

  10. 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

  11. 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

  12. 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

  13. Hi Mekya,

    I was wondering whether you’d had a chance to look at my query above yet?

    Thanks,

    Owen

  14. single and double click function occur twice if the node has children. how to solve this problem? thanks.

  15. 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(){

  16. Thank you Akmal…

  17. 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…

  18. sorry, Could u be more specific?
    I dont remember the query and as I see I didnt give the line and function link…

  19. 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

  20. 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…

  21. 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

  22. when an folder is expanded, its children get loaded via Ajax.

    dont try to load all items in initialization.

  23. 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

  24. Ashish,
    Thank u for sharing ur experience…

  25. Thank you for this great tree, I was looking for a tree with full functionality and found one :D

    I only need to add multiselect, query optimalisations, and implementing and it is ready to do what it is designed for ;)

  26. 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

  27. 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.

  28. what is the address of your site ?

  29. can I email you the address?

  30. 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

  31. u need to use another plugin, script or something, then u need to integrate that script and this tree

  32. 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 :(

  33. it is interesting, i am using chrome in ubuntu and there is no problem like that or I am missing something…

  34. Strange thing, but we are able to recreate ut on a different machine :| Sorry for not giving more details…

  35. 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

  36. Hello BennY,
    sorting can be done in this function when software is in filesystem mode…

  37. 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.

  38. 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…

  39. 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?

  40. 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?

  41. 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.

  42. $out = $treeManager->deleteElement($elementId, &$index, $ownerEl);
    i removed ‘&’ in this parameters,
    it will affect any where

  43. The tree does not work with an Apache alias. It works when Apache’s document root is set to the tree folder.

  44. 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

  45. 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

  46. no i dont think it will affect anywhere,
    sorry for late reply…

  47. propably removing the & before a parameter on line 93 in manageStructure.php will fix the problem.
    Sorry for late reply…

  48. Can this code be available in asp.net ?

  49. sorry it is not available in asp.net


Leave a comment

(required)