├── doc ├── sample-empty.json ├── howto.js ├── nav_bg.png ├── icons-xp.psp ├── icons-vista.psp ├── icons_layout.ods ├── iconInfo_32x32.png ├── iconWarning_32x32.png ├── jq.context │ ├── images │ │ ├── cut.png │ │ ├── door.png │ │ ├── page_white_copy.png │ │ ├── page_white_edit.png │ │ ├── page_white_delete.png │ │ └── page_white_paste.png │ └── jquery.contextMenu.css ├── contextmenu │ ├── images │ │ ├── cut.png │ │ ├── door.png │ │ ├── page_white_copy.png │ │ ├── page_white_delete.png │ │ ├── page_white_edit.png │ │ └── page_white_paste.png │ └── jquery.contextMenu.css ├── skin-custom │ ├── customDoc1.gif │ ├── customDoc2.gif │ ├── folder_docs.gif │ ├── folder_page.gif │ ├── customFolder1.gif │ ├── folder_images.gif │ ├── doc_with_children.gif │ └── custom.css ├── sample-data2.json ├── sample-data1.json ├── samples-top.html ├── samples.html ├── samples-welcome.html ├── sample.css ├── sample-data3.json ├── prettify.css ├── test-css.html ├── sample-iframe-1.html ├── howto.css ├── sample-init-lazy.html ├── _test-issue-NNN.html ├── sample-ul.html ├── sample-quick.html ├── sample-minexpand.html ├── sample.js ├── test-xhtml.xhtml ├── sample-theming.html ├── sample-dnd.html ├── sample-default.html ├── test-table.html ├── test-release.html ├── sample-persist.html ├── sample-inline-edit.html ├── test-preload.html ├── sample-form.html ├── sample-effects.html ├── test-persist.html ├── sample-dnd2.html ├── sample-rtl.html ├── sample-iframe.html ├── test-bench.html ├── sample-lazy.html ├── jquery.planize.js ├── sample-events.html ├── samples-nav.html ├── test-dtd-none.html ├── test-dtd-html4-transitional.html ├── test-dtd-html5.html ├── test-dtd-html4-strict.html ├── test-dtd-xml-strict.html ├── test-dtd-xml-transitional.html └── sample-pyserver.html ├── .gitignore ├── dist ├── skin │ ├── icons.gif │ ├── vline.gif │ ├── loading.gif │ ├── icons-rtl.gif │ └── vline-rtl.gif ├── skin-vista │ ├── icons.gif │ └── loading.gif ├── MIT-License.txt └── README.md ├── dynatree_sample.png ├── src ├── skin │ ├── icons.gif │ ├── vline.gif │ ├── loading.gif │ ├── icons-rtl.gif │ └── vline-rtl.gif ├── skin-vista │ ├── icons.gif │ └── loading.gif └── MIT-License.txt ├── tests ├── sample-data2.json ├── sample-data1.json ├── test.html ├── test-adhoc.html ├── qunit.css └── test-dynatree.js ├── index.html ├── bower.json ├── jquery ├── README.txt └── jquery.cookie.js ├── package.json └── README.md /doc/sample-empty.json: -------------------------------------------------------------------------------- 1 | [ ] 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /archive 3 | -------------------------------------------------------------------------------- /doc/howto.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/howto.js -------------------------------------------------------------------------------- /doc/nav_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/nav_bg.png -------------------------------------------------------------------------------- /doc/icons-xp.psp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/icons-xp.psp -------------------------------------------------------------------------------- /dist/skin/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin/icons.gif -------------------------------------------------------------------------------- /dist/skin/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin/vline.gif -------------------------------------------------------------------------------- /doc/icons-vista.psp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/icons-vista.psp -------------------------------------------------------------------------------- /dynatree_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dynatree_sample.png -------------------------------------------------------------------------------- /src/skin/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin/icons.gif -------------------------------------------------------------------------------- /src/skin/vline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin/vline.gif -------------------------------------------------------------------------------- /dist/skin/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin/loading.gif -------------------------------------------------------------------------------- /doc/icons_layout.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/icons_layout.ods -------------------------------------------------------------------------------- /src/skin/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin/loading.gif -------------------------------------------------------------------------------- /dist/skin/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin/icons-rtl.gif -------------------------------------------------------------------------------- /dist/skin/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin/vline-rtl.gif -------------------------------------------------------------------------------- /doc/iconInfo_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/iconInfo_32x32.png -------------------------------------------------------------------------------- /src/skin-vista/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin-vista/icons.gif -------------------------------------------------------------------------------- /src/skin/icons-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin/icons-rtl.gif -------------------------------------------------------------------------------- /src/skin/vline-rtl.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin/vline-rtl.gif -------------------------------------------------------------------------------- /dist/skin-vista/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin-vista/icons.gif -------------------------------------------------------------------------------- /doc/iconWarning_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/iconWarning_32x32.png -------------------------------------------------------------------------------- /src/skin-vista/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/src/skin-vista/loading.gif -------------------------------------------------------------------------------- /dist/skin-vista/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/dist/skin-vista/loading.gif -------------------------------------------------------------------------------- /doc/jq.context/images/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/cut.png -------------------------------------------------------------------------------- /doc/contextmenu/images/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/cut.png -------------------------------------------------------------------------------- /doc/contextmenu/images/door.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/door.png -------------------------------------------------------------------------------- /doc/jq.context/images/door.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/door.png -------------------------------------------------------------------------------- /doc/skin-custom/customDoc1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/customDoc1.gif -------------------------------------------------------------------------------- /doc/skin-custom/customDoc2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/customDoc2.gif -------------------------------------------------------------------------------- /doc/skin-custom/folder_docs.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/folder_docs.gif -------------------------------------------------------------------------------- /doc/skin-custom/folder_page.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/folder_page.gif -------------------------------------------------------------------------------- /doc/skin-custom/customFolder1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/customFolder1.gif -------------------------------------------------------------------------------- /doc/skin-custom/folder_images.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/folder_images.gif -------------------------------------------------------------------------------- /doc/skin-custom/doc_with_children.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/skin-custom/doc_with_children.gif -------------------------------------------------------------------------------- /tests/sample-data2.json: -------------------------------------------------------------------------------- 1 | [ {"title": "SubItem 1", "isLazy": true }, {"title": "SubFolder 2", "isFolder": true, "isLazy": true } ] -------------------------------------------------------------------------------- /doc/jq.context/images/page_white_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/page_white_copy.png -------------------------------------------------------------------------------- /doc/jq.context/images/page_white_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/page_white_edit.png -------------------------------------------------------------------------------- /doc/sample-data2.json: -------------------------------------------------------------------------------- 1 | [ {"title": "SubItem 1", "isLazy": true }, {"title": "SubFolder 2", "isFolder": true, "isLazy": true } ] 2 | -------------------------------------------------------------------------------- /doc/contextmenu/images/page_white_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/page_white_copy.png -------------------------------------------------------------------------------- /doc/contextmenu/images/page_white_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/page_white_delete.png -------------------------------------------------------------------------------- /doc/contextmenu/images/page_white_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/page_white_edit.png -------------------------------------------------------------------------------- /doc/contextmenu/images/page_white_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/contextmenu/images/page_white_paste.png -------------------------------------------------------------------------------- /doc/jq.context/images/page_white_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/page_white_delete.png -------------------------------------------------------------------------------- /doc/jq.context/images/page_white_paste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mar10/dynatree/HEAD/doc/jq.context/images/page_white_paste.png -------------------------------------------------------------------------------- /doc/sample-data1.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"title": "Item 1"}, 3 | {"title": "Folder 2", "isFolder": true, "key": "folder2", 4 | "children": [ 5 | {"title": "Sub-item 2.1"}, 6 | {"title": "Sub-item 2.2"} 7 | ] 8 | }, 9 | {"title": "Folder 3", "isFolder": true, "key": "folder3", 10 | "children": [ 11 | {"title": "Sub-item 3.1"}, 12 | {"title": "Sub-item 3.2"} 13 | ] 14 | }, 15 | {"title": "Item 5"} 16 | ] 17 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree 6 | 7 | 8 | 9 |

dynatree.js

10 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/sample-data1.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"title": "Item 1"}, 3 | {"title": "Folder 2", "isFolder": true, "key": "folder2", 4 | "children": [ 5 | {"title": "Sub-item 2.1"}, 6 | {"title": "Sub-item 2.2"} 7 | ] 8 | }, 9 | {"title": "Folder 3", "isFolder": true, "key": "folder3", 10 | "children": [ 11 | {"title": "Sub-item 3.1"}, 12 | {"title": "Sub-item 3.2"} 13 | ] 14 | }, 15 | {"title": "Lazy Folder 4", "isFolder": true, "isLazy": true, "key": "folder4"}, 16 | {"title": "Item 5"} 17 | ] -------------------------------------------------------------------------------- /doc/samples-top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dynatree - Example Browser 7 | 8 | 24 | 25 | 26 | 27 |

Dynatree - Example Browser

28 | 29 | 30 | -------------------------------------------------------------------------------- /doc/samples.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Dynatree - Example Browser 9 | 10 | 11 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | <body> 22 | <p>This page requires frames.</p> 23 | </body> 24 | 25 | 26 | -------------------------------------------------------------------------------- /doc/samples-welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |

dynatree - Examples

15 |

16 | This site presents some live examples for Dynatree.
17 |
18 | Select a topic on the navigator to the left and click 'View source code' 19 | at the bottom of the samples for details.
20 |
21 | More documentation and infos can be found at the 22 | project home.
23 |
24 | Have fun :-) 25 |

26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

Dynatree unit tests

18 |

19 |

20 |
    21 |
    22 |
    23 | 24 | 25 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.dynatree", 3 | "description": "A JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop and lazy loading.", 4 | "main": [ 5 | "dist/jquery.dynatree.js" 6 | ], 7 | "license": ["MIT", "GPL-2.0"], 8 | "ignore": [ 9 | "**/.*", 10 | "/archive", 11 | "/bin", 12 | "/build", 13 | "/demo", 14 | "/doc", 15 | "/jquery", 16 | "/lib", 17 | "/src", 18 | "/tests", 19 | "dynatree_sample.png", 20 | "Gruntfile.js", 21 | "index.html", 22 | "README.md" 23 | ], 24 | "keywords": [ 25 | "ajax", 26 | "jquery-plugin", 27 | "lazy", 28 | "tree" 29 | ], 30 | "authors": [ 31 | { 32 | "name": "Martin Wendt", 33 | "homepage": "http://careers.stackoverflow.com/martin-wendt" 34 | } 35 | ], 36 | "repository": { 37 | "type": "git", 38 | "url": "git://github.com/mar10/dynatree.git" 39 | }, 40 | "dependencies": { 41 | "jquery": ">=1.5" 42 | }, 43 | "devDependencies": {} 44 | } 45 | -------------------------------------------------------------------------------- /dist/MIT-License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006-2015 Martin Wendt (http://wwWendt.de) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /src/MIT-License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006-2015 Martin Wendt (http://wwWendt.de) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /doc/sample.css: -------------------------------------------------------------------------------- 1 | body.example 2 | { 3 | margin: 15px; 4 | font-family: sans-serif; 5 | } 6 | 7 | body.example h1 8 | { 9 | font-size: 1.2em; 10 | } 11 | body.example h2 12 | { 13 | font-size: 1em; 14 | } 15 | 16 | a, 17 | a:visited 18 | { 19 | color: navy; 20 | text-decoration: none; 21 | font-size: small; 22 | } 23 | a:hover 24 | { 25 | text-decoration: underline; 26 | } 27 | 28 | body.example p.description, 29 | body.example p.sample-links 30 | { 31 | /* border: thin solid gray; */ 32 | background-color: #d0d0f0; 33 | padding: 5px; 34 | font-size: small; 35 | } 36 | 37 | p.version-info 38 | { 39 | color: gray; 40 | font-size: 0.6em; 41 | } 42 | p.sample-links a, 43 | p.sample-links a:visited 44 | { 45 | color: navy; 46 | text-decoration: none; 47 | margin-left: 15px; 48 | padding: 1px 3px; 49 | /* border: 1pt solid white;*/ 50 | } 51 | 52 | p.sample-links a:hover 53 | { 54 | text-decoration: underline; 55 | } 56 | 57 | pre{ 58 | background:#eee; 59 | border:1px solid #999; 60 | padding:.5em; 61 | margin:.5em; 62 | font-size:.9em; 63 | } 64 | -------------------------------------------------------------------------------- /jquery/README.txt: -------------------------------------------------------------------------------- 1 | This folder contains copies of the required jQuery libraries for use with 2 | Dynatree 1.x 3 | 4 | Currently using 5 | 6 | - jquery.js: 7 | jQuery 1.10.2 8 | 9 | - jquery-ui.custom.js: 10 | jQuery UI 1.9.2 with all modules selected. 11 | 12 | - jquery.min.js and jquery-ui.custom.min.js: 13 | Minified versions of the above 14 | 15 | Current versions are always available at 16 | http://jqueryui.com/download 17 | 18 | Include the required libs like this: 19 | 20 | 21 | 22 | 23 | 24 | Alternatively the current libs may be we included from CDNs, for example 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /doc/sample-data3.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"title": "Item 1"}, 3 | {"title": "Folder 2", "isFolder": true, "key": "folder2", "expand": true, 4 | "children": [ 5 | {"title": "Sub-item 2.1", 6 | "children": [ 7 | {"title": "Sub-item 2.1.1", 8 | "children": [ 9 | {"title": "Sub-item 2.1.1.1"}, 10 | {"title": "Sub-item 2.1.2.2"}, 11 | {"title": "Sub-item 2.1.1.3"}, 12 | {"title": "Sub-item 2.1.2.4"} 13 | ] 14 | }, 15 | {"title": "Sub-item 2.1.2"}, 16 | {"title": "Sub-item 2.1.3"}, 17 | {"title": "Sub-item 2.1.4"} 18 | ] 19 | }, 20 | {"title": "Sub-item 2.2"}, 21 | {"title": "Sub-item 2.3 (lazy)", "isLazy": true } 22 | ] 23 | }, 24 | {"title": "Folder 3", "isFolder": true, "key": "folder3", 25 | "children": [ 26 | {"title": "Sub-item 3.1", 27 | "children": [ 28 | {"title": "Sub-item 3.1.1"}, 29 | {"title": "Sub-item 3.1.2"}, 30 | {"title": "Sub-item 3.1.3"}, 31 | {"title": "Sub-item 3.1.4"} 32 | ] 33 | }, 34 | {"title": "Sub-item 3.2"}, 35 | {"title": "Sub-item 3.3"}, 36 | {"title": "Sub-item 3.4"} 37 | ] 38 | }, 39 | {"title": "Lazy Folder 4", "isFolder": true, "isLazy": true, "key": "folder4"}, 40 | {"title": "Item 5"} 41 | ] 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery.dynatree", 3 | "title": "jQuery Dynatree Plugin", 4 | "description": "A JavaScript dynamic tree view plugin for jQuery with support for persistence, keyboard, checkboxes, drag'n'drop and lazy loading.", 5 | "version": "1.2.9-0", 6 | "homepage": "https://github.com/mar10/dynatree/", 7 | "author": { 8 | "name": "Martin Wendt", 9 | "url": "http://wwwendt.de/" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/mar10/dynatree" 14 | }, 15 | "bugs": { 16 | "url": "https://github.com/mar10/dynatree/issues" 17 | }, 18 | "licenses": [ 19 | { 20 | "type": "MIT", 21 | "url": "https://code.google.com/p/dynatree/wiki/LicenseInfo" 22 | }, 23 | { 24 | "type": "GPL", 25 | "url": "https://code.google.com/p/dynatree/wiki/LicenseInfo" 26 | } 27 | ], 28 | "keywords": [], 29 | "dependencies": {}, 30 | "devDependencies": { 31 | "grunt": "~0.4.1", 32 | "grunt-contrib-jshint": "~0.4.0", 33 | "grunt-contrib-concat": "~0.1.3", 34 | "grunt-contrib-uglify": "~0.2.0", 35 | "grunt-exec": "~0.4.0", 36 | "grunt-contrib-connect": "~0.3.0", 37 | "grunt-contrib-clean": "^0.5.0", 38 | "grunt-contrib-copy": "~0.4.1", 39 | "grunt-text-replace": "~0.3.8", 40 | "grunt-contrib-compress": "~0.5.2" 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /doc/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | .str { color: #080; } 4 | .kwd { color: #008; } 5 | .com { color: #800; } 6 | .typ { color: #606; } 7 | .lit { color: #066; } 8 | .pun { color: #660; } 9 | .pln { color: #000; } 10 | .tag { color: #008; } 11 | .atn { color: #606; } 12 | .atv { color: #080; } 13 | .dec { color: #606; } 14 | /*pre.prettyprint { padding: 2px; border: 1px solid #888 }*/ 15 | pre.prettyprint { 16 | padding: 2px; 17 | border: 1px dashed #888; 18 | /* margin-left: 30px; 19 | margin-right: 10px; 20 | background-color: #f0f0f0;*/ 21 | overflow: auto; 22 | } 23 | 24 | /* Specify class=linenums on a pre to get line numbering */ 25 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 26 | li.L0, 27 | li.L1, 28 | li.L2, 29 | li.L3, 30 | li.L5, 31 | li.L6, 32 | li.L7, 33 | li.L8 { list-style-type: none } 34 | /* Alternate shading for lines */ 35 | li.L1, 36 | li.L3, 37 | li.L5, 38 | li.L7, 39 | li.L9 { background: #eee } 40 | 41 | @media print { 42 | .str { color: #060; } 43 | .kwd { color: #006; font-weight: bold; } 44 | .com { color: #600; font-style: italic; } 45 | .typ { color: #404; font-weight: bold; } 46 | .lit { color: #044; } 47 | .pun { color: #440; } 48 | .pln { color: #000; } 49 | .tag { color: #006; font-weight: bold; } 50 | .atn { color: #404; } 51 | .atv { color: #060; } 52 | } 53 | -------------------------------------------------------------------------------- /doc/test-css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dynatree - temporary tests 7 | 8 | 9 | 29 | 30 | 31 | 32 |

    This file is only temporarily used to reproduce issues.

    33 |

    Using doctype HTML 4.01 Strict.

    34 |
    35 | 36 |
    37 |
    text
    38 |
    tag
    39 |
    tag
    40 |
    41 | 42 |

    jquery.dynatree.js

    43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/test-adhoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - AdHoc tests 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 32 | 33 | 34 | 35 |

    Dynatree Test

    36 |

    37 | Testbed. 38 |

    39 | 40 |

    41 | Test 01 - 42 |

    43 |
    44 | 45 |
    Active node: -
    46 |
    Focused node: -
    47 |

    48 | 49 |

    50 | 51 | 52 | -------------------------------------------------------------------------------- /doc/contextmenu/jquery.contextMenu.css: -------------------------------------------------------------------------------- 1 | /* Generic context menu styles */ 2 | .contextMenu { 3 | position: absolute; 4 | width: 120px; 5 | z-index: 99999; 6 | border: solid 1px #CCC; 7 | background: #EEE; 8 | padding: 0px; 9 | margin: 0px; 10 | display: none; 11 | } 12 | 13 | .contextMenu LI { 14 | list-style: none; 15 | padding: 0px; 16 | margin: 0px; 17 | } 18 | 19 | .contextMenu A { 20 | color: #333; 21 | text-decoration: none; 22 | display: block; 23 | line-height: 20px; 24 | height: 20px; 25 | background-position: 6px center; 26 | background-repeat: no-repeat; 27 | outline: none; 28 | padding: 1px 5px; 29 | padding-left: 28px; 30 | } 31 | 32 | .contextMenu LI.hover A { 33 | color: #FFF; 34 | background-color: #3399FF; 35 | } 36 | 37 | .contextMenu LI.disabled A { 38 | color: #AAA; 39 | cursor: default; 40 | } 41 | 42 | .contextMenu LI.hover.disabled A { 43 | background-color: transparent; 44 | } 45 | 46 | .contextMenu LI.separator { 47 | border-top: solid 1px #CCC; 48 | } 49 | 50 | /* 51 | Adding Icons 52 | 53 | You can add icons to the context menu by adding 54 | classes to the respective LI element(s) 55 | */ 56 | 57 | .contextMenu LI.edit A { background-image: url(images/page_white_edit.png); } 58 | .contextMenu LI.cut A { background-image: url(images/cut.png); } 59 | .contextMenu LI.copy A { background-image: url(images/page_white_copy.png); } 60 | .contextMenu LI.paste A { background-image: url(images/page_white_paste.png); } 61 | .contextMenu LI.delete A { background-image: url(images/page_white_delete.png); } 62 | .contextMenu LI.quit A { background-image: url(images/door.png); } 63 | -------------------------------------------------------------------------------- /doc/sample-iframe-1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Dynatree - Example 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 29 | 30 | 31 | 32 |

    33 | This page lives inside an iframe
    34 | Click a link in the tree to load some content here. 35 |
    36 | This button demonstrates, ho to access a tree in another frame: 37 | 38 |
    39 | View the source of this iframe content, 40 | to see how it can be done. 41 |

    42 | 43 | 44 | -------------------------------------------------------------------------------- /doc/skin-custom/custom.css: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Sample for a Dynatree custom stylesheet. 3 | * This is expected to be included after the standard ui.dynatree.css, thus 4 | * overridung the defaults. 5 | */ 6 | .dynatree-has-children span.dynatree-icon 7 | { 8 | background-position: 0 0; 9 | background-image: url("doc_with_children.gif"); 10 | } 11 | 12 | .dynatree-ico-cf span.dynatree-icon /* Collapsed Folder */ 13 | { 14 | background-image: url("folder_docs.gif"); 15 | } 16 | 17 | .dynatree-ico-ef span.dynatree-icon /* Expanded Folder */ 18 | { 19 | background-image: url("folder_images.gif"); 20 | } 21 | 22 | 23 | /******************************************************************************* 24 | * Node titles 25 | */ 26 | 27 | span.dynatree-has-children a 28 | { 29 | font-style: oblique; 30 | } 31 | 32 | span.dynatree-selected a 33 | { 34 | color: green; 35 | font-style: italic; 36 | } 37 | 38 | span.dynatree-active a, 39 | span.dynatree-active a:hover 40 | { 41 | border: 1px solid maroon; 42 | background-color: #FAD8F0 !important; /* reddish */ 43 | } 44 | 45 | 46 | /******************************************************************************* 47 | * Custom node classes (sample) 48 | */ 49 | 50 | span.custom1 a 51 | { 52 | background-color: #ffffbb; 53 | color: maroon; 54 | } 55 | span.custom1 span.dynatree-icon 56 | { 57 | background-position: 0 0; 58 | background-image: url("customDoc2.gif"); 59 | } 60 | 61 | span.custom2 a 62 | { 63 | font-weight: bold; 64 | background-color: silver; 65 | color: navy; 66 | } 67 | span.custom2 span.dynatree-icon 68 | { 69 | background-position: 0 0; 70 | background-image: url("folder_page.gif"); 71 | } 72 | -------------------------------------------------------------------------------- /doc/howto.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: sans-serif; 3 | 4 | } 5 | 6 | ul { 7 | list-style-type: square; 8 | } 9 | 10 | div.hint { 11 | font-size: smaller; 12 | } 13 | 14 | p.info, 15 | div.info { 16 | background-color: #ffffa0; 17 | background-image: url(iconInfo_32x32.png); 18 | background-repeat: no-repeat; 19 | padding: 5px; 20 | padding-left: 40px; 21 | } 22 | 23 | div.codesample { 24 | border: thin solid gray; 25 | } 26 | 27 | div.codesample a { 28 | text-align: right; 29 | } 30 | 31 | code 32 | { 33 | font-family: monospace; 34 | font-size: 1.2em; 35 | } 36 | 37 | div.codesample pre, 38 | pre.codesample 39 | { 40 | font-family: monospace; /* courier doesn't contain '...'*/ 41 | background-color: #f0f0f0; 42 | padding: 5px; 43 | } 44 | 45 | pre.codesample { 46 | border: thin solid gray; 47 | } 48 | 49 | dl.optionList { 50 | margin-left: 20px; 51 | } 52 | dl.optionList dt { 53 | font-family: monospace; 54 | background-color: #f0f0f0; 55 | } 56 | dl.optionList dd { 57 | /* font-style: italic; */ 58 | margin-bottom: 10px; 59 | } 60 | 61 | /***************************************************************************** 62 | * jquery.planize 63 | */ 64 | 65 | #toc { 66 | border: thin solid gray; 67 | /* background-color: f0f0f0; */ 68 | padding: 5px; 69 | } 70 | #toc >h4 { 71 | /* background-color: f0f0f0; */ 72 | margin-top: 5px; 73 | margin-bottom: 5px; 74 | } 75 | #toc ul { 76 | list-style-type: none; 77 | } 78 | 79 | #toc a, 80 | #toc a:visited 81 | { 82 | color: blue; 83 | text-decoration: none; 84 | } 85 | #toc a:hover 86 | { 87 | text-decoration: underline; 88 | } 89 | 90 | /***************************************************************************** 91 | * Examples 92 | */ 93 | 94 | body.example 95 | { 96 | margin: 15px; 97 | } 98 | 99 | body.example h1 100 | { 101 | font-size: 1.2em; 102 | } 103 | 104 | body.example p.description, 105 | body.example p.sample-links 106 | { 107 | /* border: thin solid gray; */ 108 | background-color: #d0d0f0; 109 | padding: 5px; 110 | font-size: small; 111 | } 112 | 113 | p.sample-links a, 114 | p.sample-links a:visited 115 | { 116 | color: navy; 117 | text-decoration: none; 118 | } 119 | p.sample-links a:hover 120 | { 121 | text-decoration: underline; 122 | } 123 | -------------------------------------------------------------------------------- /doc/sample-init-lazy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 42 | 43 | 44 | 45 |

    Example: Init from Ajax request

    46 |

    47 | This sample initializes the tree from a JSON request. 48 |

    49 | 50 | 51 |
    52 | 53 |
    Active node: -
    54 | 55 | 56 |
    57 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /doc/_test-issue-NNN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Dynatree issue ISSUE_NUMBER 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | 71 | 72 | 73 |

    Dynatree issue ISSUE_NUMBER

    74 |

    LINK

    75 |

    Steps to reproduce:

    76 |
      77 |
    1. foo 78 |
    2. bar 79 |
    80 |
    81 |
    82 |
    Active node: -
    83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /doc/sample-ul.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 33 | 34 | 35 | 36 |

    Example: Init from <ul> element

    37 |

    38 | This sample initializes the tree from a <ul> element. 39 |

    40 | 41 |
    42 | 57 |
    58 |
    Active node: -
    59 | 60 | 61 |
    62 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /doc/sample-quick.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 45 | 46 | 47 |

    Example: Quick start

    48 |

    49 | This sample initializes the tree from a JavaScript object.
    50 | An onActivate handler brings up an alert box when a node is selected. 51 |

    52 | 53 | 54 |
    55 | 56 | 57 |
    58 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /doc/sample-minexpand.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 53 | 54 | 55 | 56 |

    Example: Expand level

    57 | 58 | 59 |

    minExpandLevel=1
    60 | This is the default option.

    61 |
    62 | 63 |
    64 |

    minExpandLevel=2
    65 | Top-level nodes are always expanded, so the expander icon is hidden.

    66 |
    67 | 68 |
    69 |

    minExpandLevel=3.

    70 |
    71 | 72 | 73 |
    74 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jquery.dynatree.js [![GitHub version](https://badge.fury.io/gh/mar10%2Fdynatree.svg)](https://github.com/mar10/dynatree/releases/latest) 2 | 3 | > Dynatree is a JavaScript dynamic tree view plugin for jQuery with support for 4 | > persistence, keyboard, checkboxes, drag'n'drop, and lazy loading. 5 | 6 | **Note:** This repository was migrated from [Google Code](https://code.google.com/p/dynatree) at 2015-03-15. 7 | 8 | ## Status 9 | 10 | [![GitHub version](https://badge.fury.io/gh/mar10%2Fdynatree.svg)](https://github.com/mar10/dynatree/releases/latest) 11 | See the [change log](https://github.com/mar10/dynatree/blob/master/CHANGELOG.md) 12 | for details. 13 | 14 | ##### Note: Fancytree 2.x is released 15 | Dynatree 1.x will eventually be replaced by [Fancytree](https://github.com/mar10/fancytree/).
    16 | I will support Dynatree for a while, but no new features will be added. 17 | 18 | It is recommended to migrate to [Fancytree](https://github.com/mar10/fancytree/). 19 | It's easy: see also the [migration hints](https://github.com/mar10/fancytree/wiki/WhatsNew). 20 | 21 | 22 | ## Overview 23 | 24 | Dynatree is a [jQuery](http://jquery.com) plugin that allows to dynamically create 25 | html tree view controls using JavaScript. 26 | 27 | [ ![sample](dynatree_sample.png?raw=true) ](http://wwwendt.de/tech/dynatree/doc/samples.html "Live demo") 28 | 29 | 30 | **Main features** 31 | 32 | * Optimized for large dynamic trees (DOM elements are only created when really needed). 33 | * Programmable through a rich object oriented interface. 34 | * Support for lazy loading and Ajax. 35 | * Checkboxes and hierarchical selection. 36 | * Supports drag and drop. 37 | * Support for persistence. 38 | * Keyboard aware. 39 | * Initializes from HTML code, JSON, or JavaScript objects. 40 | 41 | 42 | ## Documentation 43 | 44 | Quick start 45 | 1. Include jQuery and dynatree libraries. 46 | 2. Add a `
    ` element where the tree should appear. 47 | 3. Initialize the dynatree object when the page is loaded. 48 | 49 | To learn more 50 | 1. Check the [example page](http://wwwendt.de/tech/dynatree/doc/samples.html) and click on the `[View source code]` links. 51 | 2. Read the [documentation](http://wwWendt.de/tech/dynatree/doc/dynatree-doc.html). 52 | 3. [Fiddle with the samples](http://jsfiddle.net/user/mar10/fiddles/). 53 | 54 | 55 | ## Feedback and Support 56 | 57 | - A [discussion forum](http://groups.google.com/group/dynatree) is in place to ask questions or discuss features. 58 | - Check [Stack Overflow](http://stackoverflow.com/questions/tagged/dynatree) for existing questions and answers. 59 | - Use the [Issue Tracker](https://github.com/mar10/dynatree/issues) to get a list of known bugs, or vote for a feature.
    Please make sure you searched the group and issue tracker, before adding a new request. 60 | - If you like: [Make a donation](http://wwwendt.de/freeware/donate.html). 61 | - Using this library in a commercial product and need some help to meet you deadline? Cont(r)act me! 62 | -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | # jquery.dynatree.js [![GitHub version](https://badge.fury.io/gh/mar10%2Fdynatree.svg)](https://github.com/mar10/dynatree/releases/latest) [![Powered by You](http://sapegin.github.io/powered-by-you/badge.svg)](http://sapegin.github.io/powered-by-you/) 2 | 3 | > Dynatree is a JavaScript dynamic tree view plugin for jQuery with support for 4 | > persistence, keyboard, checkboxes, drag'n'drop, and lazy loading. 5 | 6 | **Note:** This repository was migrated from [Google Code](https://code.google.com/p/dynatree) at 2015-03-15. 7 | 8 | ## Status 9 | 10 | [![GitHub version](https://badge.fury.io/gh/mar10%2Fdynatree.svg)](https://github.com/mar10/dynatree/releases/latest) 11 | See the [change log](https://github.com/mar10/dynatree/blob/master/CHANGELOG.md) 12 | for details. 13 | 14 | ##### Note: Fancytree 2.x is released 15 | Dynatree 1.x will eventually be replaced by [Fancytree](https://github.com/mar10/fancytree/).
    16 | I will support Dynatree for a while, but no new features will be added. 17 | 18 | You are encouraged to migrate to [Fancytree](https://github.com/mar10/fancytree/). 19 | It's easy: see also the [migration hints](https://github.com/mar10/fancytree/wiki/WhatsNew). 20 | 21 | 22 | ## Overview 23 | 24 | Dynatree is a [jQuery](http://jquery.com) plugin that allows to dynamically create 25 | html tree view controls using JavaScript. 26 | 27 | [ ![sample](dynatree_sample.png?raw=true) ](http://wwwendt.de/tech/dynatree/doc/samples.html "Live demo") 28 | 29 | 30 | **Main features** 31 | 32 | * Optimized for large dynamic trees (DOM elements are only created when really needed). 33 | * Programmable through a rich object oriented interface. 34 | * Support for lazy loading and Ajax. 35 | * Checkboxes and hierarchical selection. 36 | * Supports drag and drop. 37 | * Support for persistence. 38 | * Keyboard aware. 39 | * Initializes from HTML code, JSON, or JavaScript objects. 40 | 41 | 42 | ## Documentation 43 | 44 | Quick start 45 | 1. Include jQuery and dynatree libraries. 46 | 2. Add a `
    ` element where the tree should appear. 47 | 3. Initialize the dynatree object when the page is loaded. 48 | 49 | To learn more 50 | 1. Check the [example page](http://wwwendt.de/tech/dynatree/doc/samples.html) and click on the `[View source code]` links. 51 | 2. Read the [documentation](http://wwWendt.de/tech/dynatree/doc/dynatree-doc.html). 52 | 3. [Fiddle with the samples](http://jsfiddle.net/user/mar10/fiddles/). 53 | 54 | 55 | ## Feedback and Support 56 | 57 | - A [discussion forum](http://groups.google.com/group/dynatree) is in place to ask questions or discuss features. 58 | - Check [Stack Overflow](http://stackoverflow.com/questions/tagged/dynatree) for existing questions and answers. 59 | - Use the [Issue Tracker](https://github.com/mar10/dynatree/issues) to get a list of known bugs, or vote for a feature.
    Please make sure you searched the group and issue tracker, before adding a new request. 60 | - If you like: [Make a donation](http://wwwendt.de/freeware/donate.html). 61 | - Using this library in a commercial product and need some help to meet you deadline? Cont(r)act me! 62 | -------------------------------------------------------------------------------- /doc/sample.js: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | (c) 2008-2012 Martin Wendt 3 | *************************************************************************/ 4 | 5 | /** 6 | * Replacement for $().toggle(func1, func2), which was deprecated with jQuery 1.8 7 | * and removed in 1.9.; 8 | * Taken from http://stackoverflow.com/a/4911660/19166 9 | * By Felix Kling 10 | */ 11 | (function($) { 12 | $.fn.clickToggle = function(func1, func2) { 13 | var funcs = [func1, func2]; 14 | this.data('toggleclicked', 0); 15 | this.click(function() { 16 | var data = $(this).data(); 17 | var tc = data.toggleclicked; 18 | $.proxy(funcs[tc], this)(); 19 | data.toggleclicked = (tc + 1) % 2; 20 | }); 21 | return this; 22 | }; 23 | }(jQuery)); 24 | 25 | 26 | function viewSourceCode() 27 | { 28 | window.location = "view-source:" + window.location.href; 29 | } 30 | 31 | 32 | function initCodeSamples() 33 | { 34 | var $source = $("#sourceCode"); 35 | $("#codeExample").clickToggle( 36 | function(){ 37 | $source.show("fast"); 38 | if( !this.old ){ 39 | this.old = $(this).html(); 40 | $.get(this.href, function(code){ 41 | // Remove blocks: 42 | code = code.replace(//gi, ""); 43 | // Reduce tabs from 8 to 2 characters 44 | code = code.replace(/\t/g, " "); 45 | $source.text(code); 46 | // Format code samples 47 | try { 48 | prettyPrint(); 49 | } catch (e) { 50 | alert(e); 51 | } 52 | }, "html"); 53 | } 54 | $(this).html("Hide source code"); 55 | }, 56 | function(){ 57 | $(this).html(this.old); 58 | $source.hide("fast"); 59 | } 60 | ); 61 | if(jQuery.ui){ 62 | var info = "Dynatree " + jQuery.ui.dynatree.version 63 | + ", jQuery UI " + jQuery.ui.version 64 | + ", jQuery " + jQuery.fn.jquery; 65 | /* 66 | info += "\n
    "; 67 | info += "document.compatMode: " + document.compatMode + "\n"; 68 | for(e in jQuery.support){ 69 | info += "
    \n" + e + ": " + jQuery.support[e]; 70 | } 71 | */ 72 | $("p.sample-links").after("

    " + info + "

    "); 73 | } 74 | } 75 | 76 | 77 | var _gaq = _gaq || []; 78 | 79 | $(function(){ 80 | // Log to Google Analytics, when not running locally 81 | if ( document.URL.toLowerCase().indexOf("wwwendt.de/") >= 0 ) { 82 | _gaq.push(["_setAccount", "UA-316028-1"]); 83 | _gaq.push(["_trackPageview"]); 84 | 85 | (function() { 86 | var ga = document.createElement("script"); ga.type = "text/javascript"; ga.async = true; 87 | ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js"; 88 | var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(ga, s); 89 | })(); 90 | } 91 | 92 | // Show some elements only, if (not) inside the Example Browser 93 | // if (top.location == self.location){ 94 | if (window.top == window.self){ 95 | $(".hideOutsideFS").hide(); 96 | }else{ 97 | $(".hideInsideFS").hide(); 98 | } 99 | initCodeSamples(); 100 | }); 101 | -------------------------------------------------------------------------------- /doc/test-xhtml.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dynatree - temporary tests 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 75 | 76 | 77 |

    This file is only temporarily used to reproduce issues.

    78 |

    Using doctype XHTML 1.0 Strict.

    79 |
    80 | 81 |
    Selected node: -
    82 |
    Focused node: -
    83 |

    84 | 85 | 86 | 87 |

    88 |
    89 |
      90 |
    • node1
    • 91 |
    • node2
    • 92 |
    93 |
    94 | 95 | 96 |

    jquery.dynatree.js

    97 | 98 | 99 | -------------------------------------------------------------------------------- /doc/sample-theming.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 35 | 36 | 37 | 38 |

    Example: Theming

    39 |

    40 | Includes a custom CSS after the standard CSS to overrride theming.
    41 | Some nodes have their data.addClass attribute set.
    42 | Finally, the last two nodes use the data.icon attribute. 43 |

    44 | 45 |
    46 |
      47 |
    • Document with some children 48 |
        49 |
      • Sub-item 4.1 50 |
          51 |
        • Sub-item 4.1.1 52 |
        • Sub-item 4.1.2 53 |
        54 |
      • Sub-item 4.2 55 |
      56 | 57 |
    • A folder (different icon when expanded) 58 |
        59 |
      • Node 2.1 60 |
      • Node 2.2 61 |
      62 | 63 |
    • Node with custom class 1 64 | 65 |
    • Folder with custom class 2 66 |
        67 |
      • Node 4.1 (using custom class 1) 68 |
      • Node 4.2 69 |
      70 | 71 |
    • Node with standard CSS, but custom icon 72 |
    • Folder with standard CSS but custom icon 73 |
        74 |
      • Node 4.1 75 |
      • Node 4.2 76 |
      77 | 78 | 79 |
    80 |
    81 | 82 | 83 |
    84 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /doc/sample-dnd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 69 | 70 | 71 | 72 |

    Example: Sort nodes using drag-and-drop

    73 |

    74 | This sample uses Dynatree's built-in drag-and-drop feature to move nodes.
    75 | - A node may only be dragged under it's original parent.
    76 | - When dropped, the node is moved to the target. 77 |

    78 | 79 |
    80 | 81 | 82 |
    83 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /doc/sample-default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 39 | 40 | 41 | 42 |

    Example: Default

    43 |

    44 | This tree uses default options.
    45 | It is initalized from a hidden <ul> element on this page. 46 |

    47 |
    48 | Skin: 49 | 53 |
    54 | 55 |
    56 | 86 |
    87 | 88 | 89 |
    90 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /doc/test-table.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 42 | 43 | 83 | 84 | 85 |

    Example: column simulation

    86 |

    87 | This sample shows, how titles could displayed as aligned columns. 88 |

    89 | 90 | 91 |
    92 | 93 | 94 |
    95 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /doc/test-release.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | dynatree - Q'n'd test for release 7 | 8 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 75 | 76 | 77 | 78 |

    This tree uses the minified JS library. (Check this with IE!)

    79 |
    ERROR: Tree could not be loaded!
    80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /doc/jq.context/jquery.contextMenu.css: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery contextMenu - Plugin for simple contextMenu handling 3 | * 4 | * Version: 1.5.2 5 | * 6 | * Authors: Rodney Rehm, Addy Osmani (patches for FF) 7 | * Web: http://medialize.github.com/jQuery-contextMenu/ 8 | * 9 | * Licensed under 10 | * MIT License http://www.opensource.org/licenses/mit-license 11 | * GPL v3 http://opensource.org/licenses/GPL-3.0 12 | * 13 | */ 14 | 15 | .context-menu-list { 16 | margin:0; 17 | padding:0; 18 | 19 | min-width: 120px; 20 | max-width: 250px; 21 | display: inline-block; 22 | position: absolute; 23 | list-style-type: none; 24 | 25 | border: 1px solid #DDD; 26 | background: #EEE; 27 | 28 | -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); 29 | -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); 30 | -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); 31 | -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); 32 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); 33 | 34 | font-family: Verdana, Arial, Helvetica, sans-serif; 35 | font-size: 11px; 36 | } 37 | 38 | .context-menu-item { 39 | padding: 2px 2px 2px 24px; 40 | background-color: #EEE; 41 | position: relative; 42 | -moz-user-select: -moz-none; 43 | } 44 | 45 | .context-menu-separator { 46 | padding-bottom:0; 47 | border-bottom: 1px solid #DDD; 48 | } 49 | 50 | .context-menu-item > label { 51 | -moz-user-select: text; 52 | } 53 | 54 | .context-menu-item.hover { 55 | cursor: pointer; 56 | background-color: #39F; 57 | } 58 | 59 | .context-menu-item.disabled { 60 | color: #666; 61 | } 62 | 63 | .context-menu-input.hover, 64 | .context-menu-item.disabled.hover { 65 | cursor: default; 66 | background-color: #EEE; 67 | } 68 | 69 | .context-menu-submenu:after { 70 | content: ">"; 71 | color: #666; 72 | position: absolute; 73 | top: 0; 74 | right: 3px; 75 | z-index: 1; 76 | } 77 | 78 | /* icons 79 | #protip: 80 | In case you want to use sprites for icons (which I would suggest you do) have a look at 81 | http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement 82 | .context-menu-item.icon:before {} 83 | */ 84 | .context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; } 85 | .context-menu-item.icon-edit { background-image: url(images/page_white_edit.png); } 86 | .context-menu-item.icon-cut { background-image: url(images/cut.png); } 87 | .context-menu-item.icon-copy { background-image: url(images/page_white_copy.png); } 88 | .context-menu-item.icon-paste { background-image: url(images/page_white_paste.png); } 89 | .context-menu-item.icon-delete { background-image: url(images/page_white_delete.png); } 90 | .context-menu-item.icon-quit { background-image: url(images/door.png); } 91 | 92 | /* vertically align inside labels */ 93 | .context-menu-input > label > * { vertical-align: top; } 94 | 95 | /* position checkboxes and radios as icons */ 96 | .context-menu-input > label > input[type="checkbox"], 97 | .context-menu-input > label > input[type="radio"] { 98 | margin-left: -17px; 99 | } 100 | .context-menu-input > label > span { 101 | margin-left: 5px; 102 | } 103 | 104 | .context-menu-input > label, 105 | .context-menu-input > label > input[type="text"], 106 | .context-menu-input > label > textarea, 107 | .context-menu-input > label > select { 108 | display: block; 109 | width: 100%; 110 | 111 | -webkit-box-sizing: border-box; 112 | -moz-box-sizing: border-box; 113 | -ms-box-sizing: border-box; 114 | -o-box-sizing: border-box; 115 | box-sizing: border-box; 116 | } 117 | 118 | .context-menu-input > label > textarea { 119 | height: 100px; 120 | } 121 | .context-menu-item > .context-menu-list { 122 | display: none; 123 | /* re-positioned by js */ 124 | right: -5px; 125 | top: 5px; 126 | } 127 | 128 | .context-menu-item.hover > .context-menu-list { 129 | display: block; 130 | } 131 | 132 | .context-menu-accesskey { 133 | text-decoration: underline; 134 | } 135 | -------------------------------------------------------------------------------- /doc/sample-persist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 45 | 46 | 47 | 48 |

    Example: Persist

    49 |

    50 | Cookie persistence is enabled here.
    51 | Also, double-click handler expands document nodes.
    52 | Select a node and hit [F5] to refresh, to see how the active node and 53 | expansion and selection states are restored.
    54 |
    55 | NOTE: if this doesn't seem to work, it's probably because the frame 56 | content is cached by the browser.
    57 | Try this example as an 58 | unframed page. 59 |

    60 | 61 | 62 |
    63 |
      64 |
    • item1 with key and tooltip 65 |
    • item2 66 |
    • Folder with some children 67 |
        68 |
      • Sub-item 3.1 69 |
          70 |
        • Sub-item 3.1.1 71 |
        • Sub-item 3.1.2 72 |
        73 |
      • Sub-item 3.2 74 |
          75 |
        • Sub-item 3.2.1 76 |
        • Sub-item 3.2.2 77 |
        78 |
      79 |
    • Document with some children (expanded on init) 80 |
        81 |
      • Sub-item 4.1 (active and focus on init) 82 |
          83 |
        • Sub-item 4.1.1 84 |
        • Sub-item 4.1.2 85 |
        86 |
      • Sub-item 4.2 87 |
          88 |
        • Sub-item 4.2.1 89 |
        • Sub-item 4.2.2 90 |
        91 |
      92 |
    93 |
    94 |
    Active node: -
    95 | 96 | 97 |
    98 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /doc/sample-inline-edit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Editable nodes 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 88 | 89 | 90 | 91 |

    Example: edit nodes

    92 |

    93 | Demos how to edit node titles with
    94 | - dblclick
    95 | - Shift + click
    96 | - [F2]
    97 | - [Enter] (on Mac)
    98 |

    99 | 100 |
    101 |
      102 |
    • Folder 1 103 |
        104 |
      • Node 1 105 |
      • Node 2 106 |
      • Node 3 107 |
      108 | 109 |
    • Folder 2 110 |
        111 |
      • Node 1 112 |
      • Node 2 113 |
      • Node 3 114 |
      115 |
    116 |
    117 | 118 | 119 |
    120 | 126 | 127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /jquery/jquery.cookie.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery Cookie Plugin v1.4.1 3 | * https://github.com/carhartl/jquery-cookie 4 | * 5 | * Copyright 2013 Klaus Hartl 6 | * Released under the MIT license 7 | */ 8 | (function (factory) { 9 | if (typeof define === 'function' && define.amd) { 10 | // AMD 11 | define(['jquery'], factory); 12 | } else if (typeof exports === 'object') { 13 | // CommonJS 14 | factory(require('jquery')); 15 | } else { 16 | // Browser globals 17 | factory(jQuery); 18 | } 19 | }(function ($) { 20 | 21 | var pluses = /\+/g; 22 | 23 | function encode(s) { 24 | return config.raw ? s : encodeURIComponent(s); 25 | } 26 | 27 | function decode(s) { 28 | return config.raw ? s : decodeURIComponent(s); 29 | } 30 | 31 | function stringifyCookieValue(value) { 32 | return encode(config.json ? JSON.stringify(value) : String(value)); 33 | } 34 | 35 | function parseCookieValue(s) { 36 | if (s.indexOf('"') === 0) { 37 | // This is a quoted cookie as according to RFC2068, unescape... 38 | s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 39 | } 40 | 41 | try { 42 | // Replace server-side written pluses with spaces. 43 | // If we can't decode the cookie, ignore it, it's unusable. 44 | // If we can't parse the cookie, ignore it, it's unusable. 45 | s = decodeURIComponent(s.replace(pluses, ' ')); 46 | return config.json ? JSON.parse(s) : s; 47 | } catch(e) {} 48 | } 49 | 50 | function read(s, converter) { 51 | var value = config.raw ? s : parseCookieValue(s); 52 | return $.isFunction(converter) ? converter(value) : value; 53 | } 54 | 55 | var config = $.cookie = function (key, value, options) { 56 | 57 | // Write 58 | 59 | if (value !== undefined && !$.isFunction(value)) { 60 | options = $.extend({}, config.defaults, options); 61 | 62 | if (typeof options.expires === 'number') { 63 | var days = options.expires, t = options.expires = new Date(); 64 | t.setTime(+t + days * 864e+5); 65 | } 66 | 67 | return (document.cookie = [ 68 | encode(key), '=', stringifyCookieValue(value), 69 | options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 70 | options.path ? '; path=' + options.path : '', 71 | options.domain ? '; domain=' + options.domain : '', 72 | options.secure ? '; secure' : '' 73 | ].join('')); 74 | } 75 | 76 | // Read 77 | 78 | var result = key ? undefined : {}; 79 | 80 | // To prevent the for loop in the first place assign an empty array 81 | // in case there are no cookies at all. Also prevents odd result when 82 | // calling $.cookie(). 83 | var cookies = document.cookie ? document.cookie.split('; ') : []; 84 | 85 | for (var i = 0, l = cookies.length; i < l; i++) { 86 | var parts = cookies[i].split('='); 87 | var name = decode(parts.shift()); 88 | var cookie = parts.join('='); 89 | 90 | if (key && key === name) { 91 | // If second argument (value) is a function it's a converter... 92 | result = read(cookie, value); 93 | break; 94 | } 95 | 96 | // Prevent storing a cookie that we couldn't decode. 97 | if (!key && (cookie = read(cookie)) !== undefined) { 98 | result[name] = cookie; 99 | } 100 | } 101 | 102 | return result; 103 | }; 104 | 105 | config.defaults = {}; 106 | 107 | $.removeCookie = function (key, options) { 108 | if ($.cookie(key) === undefined) { 109 | return false; 110 | } 111 | 112 | // Must not alter options, thus extending a fresh object... 113 | $.cookie(key, '', $.extend({}, options, { expires: -1 })); 114 | return !$.cookie(key); 115 | }; 116 | 117 | })); -------------------------------------------------------------------------------- /doc/test-preload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 91 | 92 | 93 | 94 |

    Example: Init from Ajax request

    95 |

    96 | This sample initializes the tree from a JSON request. 97 |

    98 | 99 | 100 |
    101 | 102 |
    Active node: -
    103 | 104 | 105 |
    106 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /doc/sample-form.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 66 | 67 | 68 | 69 |

    Example: Form

    70 |

    71 | This checkbox tree is embedded in a form. 72 | The [Submit] handler serializes the selected tree nodes as if they were 73 | standard checkboxes.
    74 | The values are then POSTed to the server (together with the other form 75 | elements). 76 |

    77 | 80 |
    81 | Username: 82 |
    83 | 84 |
    85 | Foo 86 | Bar 87 | Baz 88 |
    89 | John 90 | Paul 91 | George 92 | Ringo 93 |
    94 | 95 | 96 |
    97 |
    98 | 99 | 100 |
    101 | 102 | 103 |
    104 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /doc/sample-effects.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 60 | 61 | 62 | 63 |

    Example: effects

    64 |

    65 | This sample enables effects to expand/Collapse and sets the 66 | autoCollapse option. 67 |

    68 |
    69 | 70 | - 71 | 72 | - 73 | Skin: 74 | 78 |
    79 |
    80 |
      81 |
    • item1 with key and tooltip 82 |
    • item2 83 |
    • Folder with some children 84 |
        85 |
      • Sub-item 3.1 86 |
          87 |
        • Sub-item 3.1.1 88 |
        • Sub-item 3.1.2 89 |
        90 |
      • Sub-item 3.2 91 |
          92 |
        • Sub-item 3.2.1 93 |
        • Sub-item 3.2.2 94 |
        95 |
      96 |
    • Document with some children (expanded on init) 97 |
        98 |
      • Sub-item 4.1 (active and focus on init) 99 |
          100 |
        • Sub-item 4.1.1 101 |
        • Sub-item 4.1.2 102 |
        103 |
      • Sub-item 4.2 104 |
          105 |
        • Sub-item 4.2.1 106 |
        • Sub-item 4.2.2 107 |
        108 |
      109 |
    110 |
    111 |
    Active node: -
    112 | 113 | 114 |
    115 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /doc/test-persist.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 90 | 91 | 92 | 93 |

    TEST: Persist

    94 |

    95 | Cookie persistence and is enabled here.
    96 | (Also, double-click handler expands document nodes.)
    97 | Select a node and hit [F5] to refresh, to see how the active node and 98 | expansion and selection states are restored.
    99 |
    100 | NOTE: if this doesn't seem to work, it's probably because the frame 101 | content is cached by the browser.
    102 | Try this example as an 103 | unframed page. 104 |

    105 | 106 | 107 |
    108 |
    Active node: -
    109 | 110 | 111 |
    112 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /doc/sample-dnd2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 29 | 30 | 101 | 102 | 103 | 104 |

    Example: Move nodes using drag-and-drop

    105 |

    106 | This sample uses Dynatree's built-in drag-and-drop feature to move nodes.
    107 | - autoExpandMS option is used to expand nodes on mouse hover.
    108 | - The container style uses `overflow: scroll` to demonstrate auto-scrolling.
    109 | - When dropped, the node is moved to the target. 110 |

    111 | 112 |
    113 | 114 | 115 |
    116 | 122 | 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /doc/sample-rtl.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 39 | 71 | 72 | 73 | 74 |

    Example: RTL

    75 |

    76 | This tree uses some extra styles to provide RTL support (experimental). 77 |

    78 |
    79 | Skin: 80 | 84 |
    85 | 86 |
    87 | 117 |
    118 | 119 | 120 |
    121 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /doc/sample-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 31 | 54 | 55 | 56 |

    Example: URL navigation and iframes

    57 |

    58 | This sample shows, how to use dynatree as a navigation menu.
    59 | The tree initialisation uses <a href='URL', target='TARGET'>title</a> 60 | tags.
    61 | The onActivate handler then uses node.data.href 62 | to open the the pages in the embedded iframe.
    63 | Note that the navigation will fallback to standard HTML links, 64 | when JavaScript is disabled.
    65 |
    66 | The [Toggle tree] button in the embedded welcome page also gives an example on 67 | how to access a tree that exists outside the own frame. 68 |

    69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 102 | 103 | 109 | 110 |
    77 | 78 |
    79 | 100 |
    101 |
    104 | 108 |
    111 | 112 | 113 | 114 |
    115 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /doc/test-bench.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 104 | 105 | 106 | 107 |

    Example: Benchmark

    108 |

    109 | Expand a node to start a benchmark, then check the firebug console. 110 |

    111 |

    112 | Some users reported slow loading with Firefox. If you experience 113 | response times longer than 3-4 for seconds for Add 1.000 nodes (flat) 114 | please let us know. 115 |

    116 | 117 |
    118 |

    119 | enableUpdate(false) is used for speedup. 120 |

    121 |

    122 | 123 | 124 |

    125 | 126 |
    127 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /doc/sample-lazy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 99 | 100 | 101 | 102 |

    Example: Lazy loading

    103 |

    Using 'lazy' option to load the tree and to load the 104 | branches.
    105 |
    106 | You may want to try this live example of 107 | a lazy tree that uses a simple test server. 108 |

    109 |
    110 | Skin: 111 | 115 |
    116 |
    117 |
    118 | 119 |
    Active node: -
    120 |

    121 | 122 | 123 |

    124 | 125 | 126 |
    127 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /doc/jquery.planize.js: -------------------------------------------------------------------------------- 1 | /** 2 | * The planize jQuery plugin adds some features for dealing with hierarchical headings in a given DOM element. 3 | * 4 | * - adds enumerations and anchors in all headings, 5 | * - can generates an HTML table of content and append it to an existing DOM element, 6 | * - in an unobstrusive way. 7 | * 8 | * Example of use: 9 | * 10 | * $('html *').planize(); 11 | * 12 | * Configuration object parameters documentation: 13 | * - add_anchors : generates anchors for each header (automatically set to true if `generate_toc` is set to true) 14 | * - callback : a function called when processing is finished 15 | * - debug : prints pretty debug messages into the firebug or opera console, if available 16 | * - generate_toc : generates an html unordered list containing the table of content of the document 17 | * - min_level : min heading level needed to be included in toc and be renumbered (0 = all headings) 18 | * - max_level : max heading level needed to be included in toc and be renumbered (0 = all headings) 19 | * - number_suffix : heading identifier suffix, eg. ')' in "1.2.3)" 20 | * - number_separator : separator for numbers, eg. '.' in "1.2.3)" 21 | * - toc_elem : the dom element where the toc will be append 22 | * - toc_none : the message to display if no headings have been found in the current document 23 | * - toc_title : the title of the table of content 24 | * 25 | * @requires jQuery v1.2 or higher 26 | * @author Nicolas Perriault 27 | * @license MIT (http://www.opensource.org/licenses/mit-license.php) 28 | * @param Object config Plugin configuration 29 | * @return jQuery(this) 30 | * 31 | */ 32 | (function(jQuery){ 33 | 34 | jQuery.fn.planize = function(config) { 35 | 36 | var self = jQuery(this); 37 | var processed = false; 38 | var toc = ''; 39 | var defaultConfig = { 40 | add_anchors : false, 41 | callback : null, 42 | debug : false, 43 | generate_toc : false, 44 | min_level : 1, 45 | max_level : 6, 46 | number_suffix : '', 47 | number_separator : '.', 48 | toc_elem : null, 49 | toc_none : 'No heading found for this document', 50 | toc_title : 'Table of contents' 51 | }; 52 | config = jQuery.extend(defaultConfig, config); 53 | 54 | /** 55 | * Prepends all headers text with the current tree number reference 56 | 57 | * @return void 58 | */ 59 | var process = function() { 60 | var level = 0; 61 | var levels = [0,0,0,0,0,0,0]; 62 | var hLevelText = ''; 63 | var prependText = ''; 64 | var prevLevel = 0; 65 | var n = 0; 66 | self.children('*:header:visible').each(function(index, heading) { 67 | log('Processing heading %o', heading); 68 | level = parseInt(heading.tagName.substring(1)); 69 | if (config.min_level <= level && level <= config.max_level) { 70 | n++; 71 | levels[level]++; 72 | for (var l = 1; l <= level; l++) { 73 | hLevelText += levels[l] > 0 ? levels[l] + config.number_separator : ''; 74 | } 75 | levels[level + 1] = 0; 76 | hLevelText = hLevelText.substring(0, hLevelText.length - 1); 77 | prependText = hLevelText; 78 | if (config.generate_toc || config.add_anchors) { 79 | if (config.generate_toc) { 80 | var link = '' +jQuery('').text(jQuery(this).text()).html() + ''; 81 | var elem = "\n"+'
  1. ' + hLevelText + (config.number_suffix ? config.number_suffix : '') + ' ' + link; 82 | if (level < prevLevel) { 83 | log(hLevelText + ', unnesting because:' + level + '<' + prevLevel); 84 | var unnest = ''; 85 | while (level < prevLevel) { 86 | unnest += ''; 87 | prevLevel--; 88 | } 89 | toc += unnest + elem + '
  2. '; 90 | } else if (level > prevLevel) { 91 | log(hLevelText + ', nesting because:' + level + '>' + prevLevel); 92 | toc += '
      ' + elem; 93 | } else { 94 | log(hLevelText + ', same level (' + level + ')'); 95 | toc += elem; 96 | } 97 | } 98 | prependText = '' + hLevelText; 99 | } 100 | if (config.number_suffix) { 101 | prependText += config.number_suffix; 102 | } 103 | jQuery(this).prepend(prependText + ' '); 104 | prependText = hLevelText = ''; 105 | prevLevel = level; 106 | } 107 | }); 108 | 109 | if (config.generate_toc) { 110 | if (config.toc_title) { 111 | toc = '

      ' + config.toc_title + '

      ' + toc; 112 | } 113 | if (n == 0) { 114 | toc += config.toc_none ? '

      ' + config.toc_none + '

      ' : ''; 115 | } 116 | jQuery(config.toc_elem ? config.toc_elem : 'body').append(toc); 117 | } 118 | 119 | processed = true; 120 | }; 121 | 122 | /** 123 | * Logs a message into the firebug or opera console if available 124 | * 125 | */ 126 | var log = function() { 127 | if (!config.debug) { 128 | return; 129 | } 130 | try { 131 | console.log.apply(console, arguments); 132 | } catch(e) { 133 | try { 134 | opera.postError.apply(opera, arguments); 135 | } catch(e){} 136 | } 137 | } 138 | 139 | process(); 140 | 141 | if (config.callback) { 142 | config.callback(config.toc_elem); 143 | } 144 | 145 | return jQuery(this); 146 | }; 147 | 148 | })(jQuery); 149 | -------------------------------------------------------------------------------- /doc/sample-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Example 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 101 | 102 | 103 | 104 |

      Example: Events

      105 |

      106 | Implements all callbacks.
      107 | Use the Firebug plugin in Firefox to see the event log.
      108 | The 'links' folders contain nodes with an custom data.url option. 109 | This is used to open the URL in the onActivate event.
      110 | Note: the lazy reading is not implemented in this example.
      111 | A focused node will automatically be activated after 2 seconds (use the 112 | keyboard to try this out). 113 |

      114 | 115 |
      116 |
        117 |
      • jQuery links 118 |
          119 |
        • jQuery home 120 |
        • jQuery docs 121 |
        122 | 123 |
      • Other links 124 |
          125 |
        • Google Code 126 |
        127 | 128 |
      • Lazy loading 129 |
          130 |
        • This is a lazy loading document with key k123. 131 |
        • This is a lazy loading folder with key k234. 132 |
        133 |
      134 |
      135 | 136 |
      Active node: -
      137 |
      Selected node list: -
      138 |
      Focused node: -
      139 | 140 | 141 |
      142 | 148 | 149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /doc/samples-nav.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Dynatree - Example Browser 14 | 15 | 55 | 56 | 80 | 81 | 82 | 83 | 84 |
      85 | 135 |
      136 | 137 | 138 | -------------------------------------------------------------------------------- /tests/qunit.css: -------------------------------------------------------------------------------- 1 | /** 2 | * QUnit v1.11.0 - A JavaScript Unit Testing Framework 3 | * 4 | * http://qunitjs.com 5 | * 6 | * Copyright 2012 jQuery Foundation and other contributors 7 | * Released under the MIT license. 8 | * http://jquery.org/license 9 | */ 10 | 11 | /** Font Family and Sizes */ 12 | 13 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult { 14 | font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; 15 | } 16 | 17 | #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } 18 | #qunit-tests { font-size: smaller; } 19 | 20 | 21 | /** Resets */ 22 | 23 | #qunit-tests, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { 24 | margin: 0; 25 | padding: 0; 26 | } 27 | 28 | 29 | /** Header */ 30 | 31 | #qunit-header { 32 | padding: 0.5em 0 0.5em 1em; 33 | 34 | color: #8699a4; 35 | background-color: #0d3349; 36 | 37 | font-size: 1.5em; 38 | line-height: 1em; 39 | font-weight: normal; 40 | 41 | border-radius: 5px 5px 0 0; 42 | -moz-border-radius: 5px 5px 0 0; 43 | -webkit-border-top-right-radius: 5px; 44 | -webkit-border-top-left-radius: 5px; 45 | } 46 | 47 | #qunit-header a { 48 | text-decoration: none; 49 | color: #c2ccd1; 50 | } 51 | 52 | #qunit-header a:hover, 53 | #qunit-header a:focus { 54 | color: #fff; 55 | } 56 | 57 | #qunit-testrunner-toolbar label { 58 | display: inline-block; 59 | padding: 0 .5em 0 .1em; 60 | } 61 | 62 | #qunit-banner { 63 | height: 5px; 64 | } 65 | 66 | #qunit-testrunner-toolbar { 67 | padding: 0.5em 0 0.5em 2em; 68 | color: #5E740B; 69 | background-color: #eee; 70 | overflow: hidden; 71 | } 72 | 73 | #qunit-userAgent { 74 | padding: 0.5em 0 0.5em 2.5em; 75 | background-color: #2b81af; 76 | color: #fff; 77 | text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; 78 | } 79 | 80 | #qunit-modulefilter-container { 81 | float: right; 82 | } 83 | 84 | /** Tests: Pass/Fail */ 85 | 86 | #qunit-tests { 87 | list-style-position: inside; 88 | } 89 | 90 | #qunit-tests li { 91 | padding: 0.4em 0.5em 0.4em 2.5em; 92 | border-bottom: 1px solid #fff; 93 | list-style-position: inside; 94 | } 95 | 96 | #qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running { 97 | display: none; 98 | } 99 | 100 | #qunit-tests li strong { 101 | cursor: pointer; 102 | } 103 | 104 | #qunit-tests li a { 105 | padding: 0.5em; 106 | color: #c2ccd1; 107 | text-decoration: none; 108 | } 109 | #qunit-tests li a:hover, 110 | #qunit-tests li a:focus { 111 | color: #000; 112 | } 113 | 114 | #qunit-tests li .runtime { 115 | float: right; 116 | font-size: smaller; 117 | } 118 | 119 | .qunit-assert-list { 120 | margin-top: 0.5em; 121 | padding: 0.5em; 122 | 123 | background-color: #fff; 124 | 125 | border-radius: 5px; 126 | -moz-border-radius: 5px; 127 | -webkit-border-radius: 5px; 128 | } 129 | 130 | .qunit-collapsed { 131 | display: none; 132 | } 133 | 134 | #qunit-tests table { 135 | border-collapse: collapse; 136 | margin-top: .2em; 137 | } 138 | 139 | #qunit-tests th { 140 | text-align: right; 141 | vertical-align: top; 142 | padding: 0 .5em 0 0; 143 | } 144 | 145 | #qunit-tests td { 146 | vertical-align: top; 147 | } 148 | 149 | #qunit-tests pre { 150 | margin: 0; 151 | white-space: pre-wrap; 152 | word-wrap: break-word; 153 | } 154 | 155 | #qunit-tests del { 156 | background-color: #e0f2be; 157 | color: #374e0c; 158 | text-decoration: none; 159 | } 160 | 161 | #qunit-tests ins { 162 | background-color: #ffcaca; 163 | color: #500; 164 | text-decoration: none; 165 | } 166 | 167 | /*** Test Counts */ 168 | 169 | #qunit-tests b.counts { color: black; } 170 | #qunit-tests b.passed { color: #5E740B; } 171 | #qunit-tests b.failed { color: #710909; } 172 | 173 | #qunit-tests li li { 174 | padding: 5px; 175 | background-color: #fff; 176 | border-bottom: none; 177 | list-style-position: inside; 178 | } 179 | 180 | /*** Passing Styles */ 181 | 182 | #qunit-tests li li.pass { 183 | color: #3c510c; 184 | background-color: #fff; 185 | border-left: 10px solid #C6E746; 186 | } 187 | 188 | #qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } 189 | #qunit-tests .pass .test-name { color: #366097; } 190 | 191 | #qunit-tests .pass .test-actual, 192 | #qunit-tests .pass .test-expected { color: #999999; } 193 | 194 | #qunit-banner.qunit-pass { background-color: #C6E746; } 195 | 196 | /*** Failing Styles */ 197 | 198 | #qunit-tests li li.fail { 199 | color: #710909; 200 | background-color: #fff; 201 | border-left: 10px solid #EE5757; 202 | white-space: pre; 203 | } 204 | 205 | #qunit-tests > li:last-child { 206 | border-radius: 0 0 5px 5px; 207 | -moz-border-radius: 0 0 5px 5px; 208 | -webkit-border-bottom-right-radius: 5px; 209 | -webkit-border-bottom-left-radius: 5px; 210 | } 211 | 212 | #qunit-tests .fail { color: #000000; background-color: #EE5757; } 213 | #qunit-tests .fail .test-name, 214 | #qunit-tests .fail .module-name { color: #000000; } 215 | 216 | #qunit-tests .fail .test-actual { color: #EE5757; } 217 | #qunit-tests .fail .test-expected { color: green; } 218 | 219 | #qunit-banner.qunit-fail { background-color: #EE5757; } 220 | 221 | 222 | /** Result */ 223 | 224 | #qunit-testresult { 225 | padding: 0.5em 0.5em 0.5em 2.5em; 226 | 227 | color: #2b81af; 228 | background-color: #D2E0E6; 229 | 230 | border-bottom: 1px solid white; 231 | } 232 | #qunit-testresult .module-name { 233 | font-weight: bold; 234 | } 235 | 236 | /** Fixture */ 237 | 238 | #qunit-fixture { 239 | position: absolute; 240 | top: -10000px; 241 | left: -10000px; 242 | width: 1000px; 243 | height: 1000px; 244 | } 245 | -------------------------------------------------------------------------------- /doc/test-dtd-none.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dynatree - no DTD (i.e. 'Quirks') 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 165 | 166 | 167 | 168 |

      DTD test: no DTD ('quirks')

      169 |

      170 | This sample uses the standard jQuery draggable and droppable. 171 |

      172 |
      173 | Skin: 174 | 178 |
      179 | 180 |
      1
      181 |
      Active node 1: -
      182 |
      183 |
      2
      184 |
      Active node 2: -
      185 | 186 | 187 |
      188 | 194 | 195 | 196 | 197 | 198 | -------------------------------------------------------------------------------- /doc/test-dtd-html4-transitional.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - HTML4 transitional 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 166 | 167 | 168 | 169 |

      DTD test: HTML4 transitional

      170 |

      171 | This sample uses the standard jQuery draggable and droppable. 172 |

      173 |
      174 | Skin: 175 | 179 |
      180 | 181 |
      1
      182 |
      Active node 1: -
      183 |
      184 |
      2
      185 |
      Active node 2: -
      186 | 187 | 188 |
      189 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /doc/test-dtd-html5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - HTML5 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 166 | 167 | 168 | 169 |

      DTD test: HTML5

      170 |

      171 | This sample uses the standard jQuery draggable and droppable. 172 |

      173 |
      174 | Skin: 175 | 179 |
      180 | 181 |
      1
      182 |
      Active node 1: -
      183 |
      184 |
      2
      185 |
      Active node 2: -
      186 | 187 | 188 |
      189 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /doc/test-dtd-html4-strict.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - HTML4 strict 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 166 | 167 | 168 | 169 |

      DTD test: HTML4 strict

      170 |

      171 | This sample uses the standard jQuery draggable and droppable. 172 |

      173 |
      174 | Skin: 175 | 179 |
      180 | 181 |
      1
      182 |
      Active node 1: -
      183 |
      184 |
      2
      185 |
      Active node 2: -
      186 | 187 | 188 |
      189 | 195 | 196 | 197 | 198 | 199 | -------------------------------------------------------------------------------- /doc/test-dtd-xml-strict.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Dynatree - DTD XML strict 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 167 | 168 | 169 | 170 |

      DTD test: XML strict

      171 |

      172 | This sample uses the standard jQuery draggable and droppable. 173 |

      174 |
      175 | Skin: 176 | 180 |
      181 | 182 |
      1
      183 |
      Active node 1: -
      184 |
      185 |
      2
      186 |
      Active node 2: -
      187 | 188 | 189 |
      190 | 196 | 197 | 198 | 199 | 200 | -------------------------------------------------------------------------------- /doc/test-dtd-xml-transitional.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Dynatree - XML transitionale 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 168 | 169 | 170 | 171 |

      DTD test: XML transitional

      172 |

      173 | This sample uses the standard jQuery draggable and droppable. 174 |

      175 |
      176 | Skin: 177 | 181 |
      182 | 183 |
      1
      184 |
      Active node 1: -
      185 |
      186 |
      2
      187 |
      Active node 2: -
      188 | 189 | 190 |
      191 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /doc/sample-pyserver.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Dynatree - Local Server 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 136 | 137 | 138 | 139 |

      Example: Lazy loading with a (local) HTTP test server

      140 |

      141 | Using initAjax option to initialize the tree using Ajax.
      142 | The folders have the isLazy option set, so that they are also 143 | loaded 'on demand', when expanded.
      144 |
      145 | Using persist: true and initAjax: { addExpandedKeyList: true } 146 | we also support 'lazy persistence' (which has to be supported by the 147 | web service, of course).
      148 |
      149 | Note:
      150 | This sample assumes that a Dynatree Web Service is running at http://127.0.0.1:8001.
      151 | See dynatree_server.py for a sample 152 | server implementation.
      153 |
      154 | Note also:
      155 | We have to enable JSONP using the option initAjax: { dataType: 'jsonp' }, 156 | because Ajax calls will fail, if the originating HTML page and the web 157 | service do not reside on the same host.
      158 | In our case may have this sample page on the local file system and the 159 | web service runs on 127.0.0.1. 160 |

      161 | 162 |
      163 | 164 | Loading... 165 |
      166 | 167 |
      Active node: -
      168 | 169 |

      170 | 171 | 172 |

      173 | 174 |
      175 | 181 | 182 | 183 | 184 | 185 | -------------------------------------------------------------------------------- /tests/test-dynatree.js: -------------------------------------------------------------------------------- 1 | /*globals $:false, expect:false, module:false, ok:false, test:false, QUnit:false */ 2 | /*globals logMsg, alert */ 3 | 4 | $(function(){ 5 | /******************************************************************************* 6 | * QUnit setup 7 | */ 8 | QUnit.log = function(result, message) { 9 | if (window.console && window.console.log) { 10 | window.console.log(result +' :: '+ message); 11 | } 12 | }; 13 | 14 | /******************************************************************************* 15 | * Tool functions 16 | */ 17 | function makeBenchWrapper(testName, callback) { 18 | return function() { 19 | var start = +new Date(); 20 | // callback.apply(this, arguments); 21 | callback.call(); 22 | var elap = +new Date() - start; 23 | ok(true, testName + " took " + elap + " milliseconds"); 24 | }; 25 | } 26 | 27 | 28 | function benchmark(testName, callback) { 29 | // Execute callback immediately and log timing as test result. 30 | // This function should be called inside a test() function. 31 | makeBenchWrapper(testName, callback).call(); 32 | } 33 | 34 | 35 | function timedTest(testName, callback) { 36 | // Same as test(testName, callback), but adds a timing assertion. 37 | test(testName, makeBenchWrapper(testName, callback)); 38 | } 39 | 40 | 41 | function simulateClick(selector) { 42 | var e = document.createEvent("MouseEvents"); 43 | e.initEvent("click", true, true); 44 | $(selector).each(function(){ 45 | this.dispatchEvent(e); 46 | }); 47 | } 48 | 49 | 50 | function addNodes(dtnode, level1, level2, level3, forceUpdate) { 51 | if( forceUpdate !== true ){ 52 | dtnode.tree.enableUpdate(false); 53 | } 54 | var key; 55 | for (var i=0; i