wheels 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +20 -0
- data/VERSION +1 -1
- data/app/controllers/app_configs_controller.rb +12 -0
- data/app/controllers/application_controller.rb +39 -0
- data/app/helpers/application_helper.rb +24 -2
- data/app/models/sitemap.rb +7 -0
- data/app/views/app_configs/css.css.haml +2 -0
- data/app/views/layouts/application.html.haml +21 -15
- data/app/views/pages/_form_fields.html.haml +2 -0
- data/app/views/sitemaps/index.html.haml +68 -76
- data/db/migrate/0000_devise_create_users.rb +26 -0
- data/db/migrate/0180_acts_as_taggable_on_migration.rb +28 -0
- data/lib/generators/app_layout/app_layout_generator.rb +1 -1
- data/lib/generators/{wheels/core_extensions.rb → core_extensions.rb} +42 -1
- data/lib/generators/recipes/wheels.rb +46 -0
- data/lib/generators/recipes/wheels_update.rb +18 -0
- data/lib/generators/wheels/wheels_generator.rb +3 -1
- data/lib/generators/wheels_checkout_assets/USAGE +8 -0
- data/lib/generators/wheels_checkout_assets/wheels_checkout_assets_generator.rb +9 -0
- data/lib/generators/wheels_checkout_assets_readonly/USAGE +8 -0
- data/lib/generators/wheels_checkout_assets_readonly/wheels_checkout_assets_readonly_generator.rb +10 -0
- data/lib/generators/wheels_controller/USAGE +8 -0
- data/lib/generators/wheels_controller/wheels_controller_generator.rb +14 -0
- data/lib/generators/{wheels_views → wheels_model}/USAGE +1 -1
- data/lib/generators/wheels_model/wheels_model_generator.rb +14 -0
- data/lib/generators/{update_wheels/update_wheels_generator.rb → wheels_update/wheels_update_generator.rb} +7 -13
- data/lib/generators/wheels_view/USAGE +8 -0
- data/lib/generators/wheels_view/wheels_view_generator.rb +14 -0
- data/lib/wheels/routes.rb +7 -1
- data/wheels.gemspec +44 -218
- metadata +44 -218
- data/lib/generators/app_layout/core_extensions.rb +0 -51
- data/lib/generators/update_wheels/core_extensions.rb +0 -51
- data/lib/generators/update_wheels/recipes/wheels.rb +0 -11
- data/lib/generators/update_wheels/templates/haml/app/views/layouts/application.html.haml +0 -9
- data/lib/generators/wheels/install_generator.rb +0 -25
- data/lib/generators/wheels/recipes/wheels.rb +0 -66
- data/lib/generators/wheels/templates/cancan/ability.rb +0 -13
- data/lib/generators/wheels/templates/database/postgresql.yml +0 -19
- data/lib/generators/wheels/templates/git/gitignore +0 -8
- data/lib/generators/wheels/templates/mongoid/features/step_definitions/mongoid_steps.rb +0 -4
- data/lib/generators/wheels/templates/mongoid/features/support/hooks.rb +0 -3
- data/lib/generators/wheels/views_generator.rb +0 -15
- data/lib/generators/wheels_views/LICENCE +0 -20
- data/lib/generators/wheels_views/wheels_views_generator.rb +0 -15
- data/lib/wheels/base.rb +0 -7
- data/public/404.html +0 -26
- data/public/422.html +0 -26
- data/public/500.html +0 -26
- data/public/favicon.ico +0 -0
- data/public/images/dreamy/Thumbs.db +0 -0
- data/public/images/dreamy/bg-ad-top.png +0 -0
- data/public/images/dreamy/bg-body.png +0 -0
- data/public/images/dreamy/bg-feed.gif +0 -0
- data/public/images/dreamy/bg-footer.jpg +0 -0
- data/public/images/dreamy/bg-header.jpg +0 -0
- data/public/images/dreamy/bg-menu-hover.png +0 -0
- data/public/images/dreamy/bg-menu.png +0 -0
- data/public/images/dreamy/bg-sidebar-bottom.gif +0 -0
- data/public/images/dreamy/button-feed.png +0 -0
- data/public/images/dreamy/icon-comment.png +0 -0
- data/public/images/growl/error.png +0 -0
- data/public/images/growl/growl_bottom.png +0 -0
- data/public/images/growl/growl_repeat.png +0 -0
- data/public/images/growl/growl_top.png +0 -0
- data/public/images/growl/info.png +0 -0
- data/public/images/menu/item-pointer-mover.gif +0 -0
- data/public/images/menu/item-pointer.gif +0 -0
- data/public/images/menu/lava.gif +0 -0
- data/public/images/menu/lava.png +0 -0
- data/public/images/menu/main-bg.png +0 -0
- data/public/images/menu/main-delimiter.png +0 -0
- data/public/javascripts/galleries/configure_ckeditor.js +0 -8
- data/public/javascripts/jqUrl.js +0 -28
- data/public/javascripts/jquery-validate/additional-methods.js +0 -259
- data/public/javascripts/jquery-validate/changelog.txt +0 -239
- data/public/javascripts/jquery-validate/jquery.validate.js +0 -1146
- data/public/javascripts/jquery-validate/jquery.validate.min.js +0 -16
- data/public/javascripts/jquery-validate/jquery.validate.pack.js +0 -15
- data/public/javascripts/jquery-validate/lib/jquery-1.4.2.js +0 -6240
- data/public/javascripts/jquery-validate/lib/jquery.form.js +0 -660
- data/public/javascripts/jquery-validate/lib/jquery.js +0 -4376
- data/public/javascripts/jquery-validate/lib/jquery.metadata.js +0 -122
- data/public/javascripts/jquery-validate/localization/messages_ar.js +0 -24
- data/public/javascripts/jquery-validate/localization/messages_bg.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_cn.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_cs.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_da.js +0 -20
- data/public/javascripts/jquery-validate/localization/messages_de.js +0 -20
- data/public/javascripts/jquery-validate/localization/messages_el.js +0 -24
- data/public/javascripts/jquery-validate/localization/messages_es.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_fa.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_fi.js +0 -21
- data/public/javascripts/jquery-validate/localization/messages_fr.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_he.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_hu.js +0 -20
- data/public/javascripts/jquery-validate/localization/messages_it.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_kk.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_lt.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_lv.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_nl.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_no.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_pl.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_ptbr.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_ptpt.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_ro.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_ru.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_se.js +0 -21
- data/public/javascripts/jquery-validate/localization/messages_sk.js +0 -20
- data/public/javascripts/jquery-validate/localization/messages_tr.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_tw.js +0 -23
- data/public/javascripts/jquery-validate/localization/messages_ua.js +0 -23
- data/public/javascripts/jquery-validate/localization/methods_de.js +0 -12
- data/public/javascripts/jquery-validate/localization/methods_nl.js +0 -9
- data/public/javascripts/jquery-validate/localization/methods_pt.js +0 -9
- data/public/javascripts/jquery-validate/todo +0 -172
- data/public/javascripts/jquery.cookie.js +0 -96
- data/public/javascripts/jquery.filedrop.js +0 -253
- data/public/javascripts/jquery.growl.js +0 -143
- data/public/javascripts/jquery.hotkeys.js +0 -99
- data/public/javascripts/jquery.js +0 -6240
- data/public/javascripts/jquery.jstree.js +0 -3510
- data/public/javascripts/jquery.uploadify.js +0 -26
- data/public/javascripts/jquery.validate.js +0 -1147
- data/public/javascripts/loadbehind.js +0 -0
- data/public/javascripts/menu.js +0 -247
- data/public/javascripts/sitemap_jstree.js +0 -329
- data/public/javascripts/swfobject.js +0 -4
- data/public/jstree/_demo/_dump.sql +0 -20
- data/public/jstree/_demo/_inc/__mysql_errors.log +0 -0
- data/public/jstree/_demo/_inc/class._database.php +0 -146
- data/public/jstree/_demo/_inc/class._database_i.php +0 -152
- data/public/jstree/_demo/_inc/class.tree.php +0 -602
- data/public/jstree/_demo/_install.txt +0 -6
- data/public/jstree/_demo/config.php +0 -14
- data/public/jstree/_demo/index.html +0 -262
- data/public/jstree/_demo/server.php +0 -69
- data/public/jstree/_docs/!style.css +0 -37
- data/public/jstree/_docs/_drive.png +0 -0
- data/public/jstree/_docs/_html_data.html +0 -2
- data/public/jstree/_docs/_json_data.json +0 -4
- data/public/jstree/_docs/_search_data.json +0 -6
- data/public/jstree/_docs/_search_result.json +0 -1
- data/public/jstree/_docs/_xml_flat.xml +0 -12
- data/public/jstree/_docs/_xml_nest.xml +0 -18
- data/public/jstree/_docs/checkbox.html +0 -148
- data/public/jstree/_docs/contextmenu.html +0 -120
- data/public/jstree/_docs/cookies.html +0 -96
- data/public/jstree/_docs/core.html +0 -622
- data/public/jstree/_docs/crrm.html +0 -315
- data/public/jstree/_docs/dnd.html +0 -197
- data/public/jstree/_docs/hotkeys.html +0 -81
- data/public/jstree/_docs/html_data.html +0 -174
- data/public/jstree/_docs/index.html +0 -75
- data/public/jstree/_docs/json_data.html +0 -240
- data/public/jstree/_docs/languages.html +0 -138
- data/public/jstree/_docs/search.html +0 -114
- data/public/jstree/_docs/sort.html +0 -84
- data/public/jstree/_docs/syntax/!script.js +0 -2232
- data/public/jstree/_docs/syntax/!style.css +0 -511
- data/public/jstree/_docs/syntax/clipboard.swf +0 -0
- data/public/jstree/_docs/syntax/help.png +0 -0
- data/public/jstree/_docs/syntax/magnifier.png +0 -0
- data/public/jstree/_docs/syntax/page_white_code.png +0 -0
- data/public/jstree/_docs/syntax/page_white_copy.png +0 -0
- data/public/jstree/_docs/syntax/printer.png +0 -0
- data/public/jstree/_docs/syntax/wrapping.png +0 -0
- data/public/jstree/_docs/themeroller.html +0 -98
- data/public/jstree/_docs/themes.html +0 -126
- data/public/jstree/_docs/types.html +0 -173
- data/public/jstree/_docs/ui.html +0 -188
- data/public/jstree/_docs/unique.html +0 -70
- data/public/jstree/_docs/xml_data.html +0 -214
- data/public/jstree/_lib/jquery.cookie.js +0 -96
- data/public/jstree/_lib/jquery.hotkeys.js +0 -99
- data/public/jstree/_lib/jquery.js +0 -6240
- data/public/jstree/jquery.jstree.js +0 -3510
- data/public/jstree/jstree.html +0 -237
- data/public/jstree/themes/apple/bg.jpg +0 -0
- data/public/jstree/themes/apple/d.png +0 -0
- data/public/jstree/themes/apple/dot_for_ie.gif +0 -0
- data/public/jstree/themes/apple/style.css +0 -60
- data/public/jstree/themes/apple/throbber.gif +0 -0
- data/public/jstree/themes/classic/d.png +0 -0
- data/public/jstree/themes/classic/dot_for_ie.gif +0 -0
- data/public/jstree/themes/classic/style.css +0 -59
- data/public/jstree/themes/classic/throbber.gif +0 -0
- data/public/jstree/themes/default/d.gif +0 -0
- data/public/jstree/themes/default/d.png +0 -0
- data/public/jstree/themes/default/style.css +0 -73
- data/public/jstree/themes/default/throbber.gif +0 -0
- data/public/jstree/themes/default-rtl/d.gif +0 -0
- data/public/jstree/themes/default-rtl/d.png +0 -0
- data/public/jstree/themes/default-rtl/dots.gif +0 -0
- data/public/jstree/themes/default-rtl/style.css +0 -83
- data/public/jstree/themes/default-rtl/throbber.gif +0 -0
- data/public/stylesheets/dreamy.css +0 -183
- data/public/stylesheets/menu.css +0 -101
- data/public/stylesheets/sass/dreamy.sass +0 -165
- data/public/stylesheets/sass/menu.sass +0 -139
- data/public/stylesheets/sass/uploadify.sass +0 -52
- data/public/stylesheets/sass/wheels.sass +0 -25
- data/public/stylesheets/scaffold.css +0 -56
- data/public/stylesheets/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/public/stylesheets/ui-lightness/jquery-ui-1.8.2.custom.css +0 -359
- data/public/stylesheets/ui-lightness/jquery-ui-1.8.4.custom.css +0 -549
- data/public/test.html +0 -18
- /data/lib/generators/{wheels/recipes → recipes}/cancan.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/cucumber.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/default.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/design.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/devise.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/factory_girl.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/haml.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/jquery.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/mongoid.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/postgresql.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/recipes.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/remarkable.rb +0 -0
- /data/lib/generators/{wheels/recipes → recipes}/rspec.rb +0 -0
- /data/lib/generators/{wheels/snippets → snippets}/cucumber/database_config +0 -0
- /data/lib/generators/{update_wheels/templates → templates}/cancan/ability.rb +0 -0
- /data/lib/generators/{update_wheels/templates → templates}/database/postgresql.yml +0 -0
- /data/lib/generators/{update_wheels/templates → templates}/git/gitignore +0 -0
- /data/lib/generators/{wheels/templates → templates}/haml/app/views/layouts/application.html.haml +0 -0
- /data/lib/generators/{update_wheels/templates → templates}/mongoid/features/step_definitions/mongoid_steps.rb +0 -0
- /data/lib/generators/{update_wheels/templates → templates}/mongoid/features/support/hooks.rb +0 -0
- /data/lib/generators/{update_wheels → wheels_update}/LICENCE +0 -0
- /data/lib/generators/{update_wheels → wheels_update}/USAGE +0 -0
@@ -1,315 +0,0 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<title>jsTree v.1.0 - CRRM documentation</title>
|
8
|
-
<script type="text/javascript" src="../_lib/jquery.js"></script>
|
9
|
-
<script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
|
10
|
-
<script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
|
11
|
-
<script type="text/javascript" src="../jquery.jstree.js"></script>
|
12
|
-
|
13
|
-
<link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
|
14
|
-
<link type="text/css" rel="stylesheet" href="!style.css"/>
|
15
|
-
<script type="text/javascript" src="syntax/!script.js"></script>
|
16
|
-
</head>
|
17
|
-
<body>
|
18
|
-
<div id="container">
|
19
|
-
|
20
|
-
<h1>jsTree v.1.0 - CRRM plugin</h1>
|
21
|
-
<h2>Description</h2>
|
22
|
-
<div id="description">
|
23
|
-
<p>The <code>CRRM</code> plugin handles creating, renaming, removing and moving nodes by the user.</p>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<h2 id="configuration">Configuration</h2>
|
27
|
-
<div class="panel configuration">
|
28
|
-
<h3>input_width_limit</h3>
|
29
|
-
<p class="meta">A number. Default is <code>200</code>.</p>
|
30
|
-
<p>When renaming (or creating) nodes the input for the text will autosize - this number sets the maximum size for the input.</p>
|
31
|
-
|
32
|
-
<h3>move</h3>
|
33
|
-
<p class="meta">An object, containing various settings - see below for more.</p>
|
34
|
-
|
35
|
-
<h3>move.always_copy</h3>
|
36
|
-
<p class="meta"><code>true</code>, <code>false</code> or <code>"multitree"</code>. Default is <code>false</code>.</p>
|
37
|
-
<p>Defines how moves are handled - if set to <code>true</code> every move will be forced to a copy (leaving the original node in place). If set to <code>"multitree"</code> only moves between trees will be forced to a copy.</p>
|
38
|
-
|
39
|
-
<h3>move.open_onmove</h3>
|
40
|
-
<p class="meta">A Boolean. Default is <code>true</code>.</p>
|
41
|
-
<p>If set to true, when moving a node to a new, closed parent, the parent node will be opened when the move completes.</p>
|
42
|
-
|
43
|
-
<h3>move.default_position</h3>
|
44
|
-
<p class="meta">A string or a number. Default is <code>"last"</code>.</p>
|
45
|
-
<p>The default position to move to if no position is specified. This can be a zero based index to position the element at a specific point among the new parent's current children. You can also use one of these strings: <code>"before"</code>, <code>"after"</code>, <code>"inside"</code>, <code>"first"</code>, <code>"last"</code>.</p>
|
46
|
-
|
47
|
-
<h3>move.check_move</h3>
|
48
|
-
<p class="meta">A function. Default is <code>function (m) { return true; }</code>.</p>
|
49
|
-
<p>The callback function enabling you to prevent some moves - just return <code>false</code>. The <code>m</code> parameter is the move object generated by jstree. The object follows the structure described in <a href="core.html#_get_move">._get_move</a>.</p>
|
50
|
-
|
51
|
-
</div>
|
52
|
-
|
53
|
-
<h2 id="demos">Demos</h2>
|
54
|
-
<div class="panel">
|
55
|
-
|
56
|
-
<h3>Creating nodes</h3>
|
57
|
-
<input type="button" class="button" value="create_1" id="create_1" style="float:left;" />
|
58
|
-
<input type="button" class="button" value="create_2" id="create_2" style="float:left;" />
|
59
|
-
<input type="button" class="button" value="create_3" id="create_3" style="" />
|
60
|
-
<div id="demo1" class="demo">
|
61
|
-
<ul>
|
62
|
-
<li id="phtml_1">
|
63
|
-
<a href="#">Root node 1</a>
|
64
|
-
<ul>
|
65
|
-
<li id="phtml_2">
|
66
|
-
<a href="#">Child node 1</a>
|
67
|
-
</li>
|
68
|
-
<li id="phtml_3">
|
69
|
-
<a href="#">Child node 2</a>
|
70
|
-
</li>
|
71
|
-
</ul>
|
72
|
-
</li>
|
73
|
-
<li id="phtml_4">
|
74
|
-
<a href="#">Root node 2</a>
|
75
|
-
</li>
|
76
|
-
</ul>
|
77
|
-
</div>
|
78
|
-
<script type="text/javascript" class="source">
|
79
|
-
$(function () {
|
80
|
-
$("#create_1").click(function () {
|
81
|
-
$("#demo1").jstree("create");
|
82
|
-
});
|
83
|
-
$("#create_2").click(function () {
|
84
|
-
$("#demo1").jstree("create","#phtml_1","first","Enter a new name");
|
85
|
-
});
|
86
|
-
$("#create_3").click(function () {
|
87
|
-
$("#demo1").jstree("create",-1,false,"No rename",false,true);
|
88
|
-
});
|
89
|
-
$("#demo1").jstree({
|
90
|
-
"ui" : {
|
91
|
-
"initially_select" : [ "phtml_2" ]
|
92
|
-
},
|
93
|
-
"core" : { "initially_open" : [ "phtml_1" ] },
|
94
|
-
"plugins" : [ "themes", "html_data", "ui", "crrm" ]
|
95
|
-
});
|
96
|
-
});
|
97
|
-
</script>
|
98
|
-
|
99
|
-
<h3>Removing nodes</h3>
|
100
|
-
<input type="button" class="button" value="remove_1" id="remove_1" style="float:left;" />
|
101
|
-
<input type="button" class="button" value="remove_2" id="remove_2" style="" />
|
102
|
-
<div id="demo2" class="demo">
|
103
|
-
<ul>
|
104
|
-
<li id="rhtml_1">
|
105
|
-
<a href="#">Root node 1</a>
|
106
|
-
<ul>
|
107
|
-
<li id="rhtml_2">
|
108
|
-
<a href="#">Child node 1</a>
|
109
|
-
</li>
|
110
|
-
<li id="rhtml_3">
|
111
|
-
<a href="#">Child node 2</a>
|
112
|
-
</li>
|
113
|
-
</ul>
|
114
|
-
</li>
|
115
|
-
<li id="rhtml_4">
|
116
|
-
<a href="#">Root node 2</a>
|
117
|
-
</li>
|
118
|
-
</ul>
|
119
|
-
</div>
|
120
|
-
<script type="text/javascript" class="source">
|
121
|
-
$(function () {
|
122
|
-
$("#remove_1").click(function () {
|
123
|
-
$("#demo2").jstree("remove");
|
124
|
-
});
|
125
|
-
$("#remove_2").click(function () {
|
126
|
-
$("#demo2").jstree("remove","#rhtml_1");
|
127
|
-
});
|
128
|
-
$("#demo2").jstree({
|
129
|
-
"ui" : {
|
130
|
-
"initially_select" : [ "rhtml_2" ]
|
131
|
-
},
|
132
|
-
"core" : { "initially_open" : [ "rhtml_1" ] },
|
133
|
-
"plugins" : [ "themes", "html_data", "ui", "crrm" ]
|
134
|
-
});
|
135
|
-
});
|
136
|
-
</script>
|
137
|
-
|
138
|
-
<h3>Renaming nodes</h3>
|
139
|
-
<input type="button" class="button" value="rename_1" id="rename_1" style="float:left;" />
|
140
|
-
<input type="button" class="button" value="rename_2" id="rename_2" style="" />
|
141
|
-
<div id="demo3" class="demo">
|
142
|
-
<ul>
|
143
|
-
<li id="shtml_1">
|
144
|
-
<a href="#">Root node 1</a>
|
145
|
-
<ul>
|
146
|
-
<li id="shtml_2">
|
147
|
-
<a href="#">Child node 1</a>
|
148
|
-
</li>
|
149
|
-
<li id="shtml_3">
|
150
|
-
<a href="#">Child node 2</a>
|
151
|
-
</li>
|
152
|
-
</ul>
|
153
|
-
</li>
|
154
|
-
<li id="shtml_4">
|
155
|
-
<a href="#">Root node 2</a>
|
156
|
-
</li>
|
157
|
-
</ul>
|
158
|
-
</div>
|
159
|
-
<script type="text/javascript" class="source">
|
160
|
-
$(function () {
|
161
|
-
$("#rename_1").click(function () {
|
162
|
-
$("#demo3").jstree("rename");
|
163
|
-
});
|
164
|
-
$("#rename_2").click(function () {
|
165
|
-
$("#demo3").jstree("rename","#shtml_1");
|
166
|
-
});
|
167
|
-
$("#demo3").jstree({
|
168
|
-
"ui" : {
|
169
|
-
"initially_select" : [ "shtml_2" ]
|
170
|
-
},
|
171
|
-
"core" : { "initially_open" : [ "shtml_1" ] },
|
172
|
-
"plugins" : [ "themes", "html_data", "ui", "crrm" ]
|
173
|
-
});
|
174
|
-
});
|
175
|
-
</script>
|
176
|
-
|
177
|
-
<h3>Moving nodes</h3>
|
178
|
-
<p><strong>move_1</strong> uses the default position - <code>"first"</code></p>
|
179
|
-
<p><strong>move_2</strong> specifies a position - <code>"before"</code> - meaning that the node specified as a first argument will come above the node specified as the second argument</p>
|
180
|
-
<p><strong>move_3</strong> will never work, because of the specified <code>check_move</code> function which prevents the first root node from being moved</p>
|
181
|
-
<input type="button" class="button" value="move_1" id="move_1" style="float:left;" />
|
182
|
-
<input type="button" class="button" value="move_2" id="move_2" style="float:left;" />
|
183
|
-
<input type="button" class="button" value="move_3" id="move_3" style="" />
|
184
|
-
<div id="demo4" class="demo">
|
185
|
-
<ul>
|
186
|
-
<li id="thtml_1">
|
187
|
-
<a href="#">Root node 1</a>
|
188
|
-
<ul>
|
189
|
-
<li id="thtml_2">
|
190
|
-
<a href="#">Child node 1</a>
|
191
|
-
</li>
|
192
|
-
<li id="thtml_3">
|
193
|
-
<a href="#">Child node 2</a>
|
194
|
-
</li>
|
195
|
-
</ul>
|
196
|
-
</li>
|
197
|
-
<li id="thtml_4">
|
198
|
-
<a href="#">Root node 2</a>
|
199
|
-
</li>
|
200
|
-
</ul>
|
201
|
-
</div>
|
202
|
-
<script type="text/javascript" class="source">
|
203
|
-
$(function () {
|
204
|
-
$("#move_1").click(function () {
|
205
|
-
$("#demo4").jstree("move_node","#thtml_4","#thtml_1");
|
206
|
-
});
|
207
|
-
$("#move_2").click(function () {
|
208
|
-
$("#demo4").jstree("move_node","#thtml_4","#thtml_1", "before");
|
209
|
-
});
|
210
|
-
$("#move_3").click(function () {
|
211
|
-
$("#demo4").jstree("move_node","#thtml_1","#thtml_4");
|
212
|
-
});
|
213
|
-
$("#demo4").jstree({
|
214
|
-
"crrm" : {
|
215
|
-
"move" : {
|
216
|
-
"default_position" : "first",
|
217
|
-
"check_move" : function (m) { return (m.o[0].id === "thtml_1") ? false : true; }
|
218
|
-
}
|
219
|
-
},
|
220
|
-
"ui" : {
|
221
|
-
"initially_select" : [ "thtml_2" ]
|
222
|
-
},
|
223
|
-
"core" : { "initially_open" : [ "thtml_1" ] },
|
224
|
-
"plugins" : [ "themes", "html_data", "ui", "crrm" ]
|
225
|
-
});
|
226
|
-
});
|
227
|
-
</script>
|
228
|
-
|
229
|
-
</div>
|
230
|
-
|
231
|
-
<h2 id="api">API</h2>
|
232
|
-
<div class="panel api">
|
233
|
-
|
234
|
-
<h3 id="_show_input">._show_input ( node , callback )</h3>
|
235
|
-
<p>Renders an input field in a node. Used only internally.</p>
|
236
|
-
|
237
|
-
<h3 id="rename">.rename ( node )</h3>
|
238
|
-
<p>Sets a node in rename mode and when the user has entered changes, an event is triggered.</p>
|
239
|
-
<ul class="arguments">
|
240
|
-
<li>
|
241
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
242
|
-
<p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass <code>null</code> to use the currently selected item.</p>
|
243
|
-
</li>
|
244
|
-
</ul>
|
245
|
-
|
246
|
-
<h3 id="create">.create ( node , position , js , callback , skip_rename )</h3>
|
247
|
-
<p>Creates a new node. Triggers an event.</p>
|
248
|
-
<ul class="arguments">
|
249
|
-
<li>
|
250
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
251
|
-
<p>This can be a DOM node, jQuery node or selector pointing to the element you want to create in (or next to). If you use the UI plugin - pass <code>null</code> to use the currently selected item.</p>
|
252
|
-
</li>
|
253
|
-
<li>
|
254
|
-
<code class="tp">mixed</code> <strong>position</strong>
|
255
|
-
<p>The position of the newly created node. This can be a zero based index to position the element at a specific point among the current children. You can also pass in one of those strings: <code>"before"</code>, <code>"after"</code>, <code>"inside"</code>, <code>"first"</code>, <code>"last"</code>.</p>
|
256
|
-
</li>
|
257
|
-
<li>
|
258
|
-
<code class="tp">object</code> <strong>js</strong>
|
259
|
-
<p>The data for the newly created node. Consists of three keys:</p><p style="margin-left:25px;"><code class="tp">attr</code> - an object of attributes (same used for <code>jQuery.attr()</code>. You can omit this key;<br /><code class="tp">state</code> - a string - either <code>"open"</code> or <code>"closed"</code>, for a leaf node - omit this key;<br /><code class="tp">data</code> - a string or an object - if a string is passed it is used for the title of the node, if an object is passed there are two keys you can specify: <code>attr</code> and <code>title</code>;</p>
|
260
|
-
</li>
|
261
|
-
<li>
|
262
|
-
<code class="tp">function</code> <strong>callback</strong>
|
263
|
-
<p>A function to be executed once the node is created. You'd be better off waiting for the event.</p>
|
264
|
-
</li>
|
265
|
-
<li>
|
266
|
-
<code class="tp">bool</code> <strong>skip_rename</strong>
|
267
|
-
<p>Skips the user input step. The node is created with the data you have supplied.</p>
|
268
|
-
</li>
|
269
|
-
</ul>
|
270
|
-
|
271
|
-
<h3 id="remove">.remove ( node )</h3>
|
272
|
-
<p>Removes a node. Triggers an event.</p>
|
273
|
-
<ul class="arguments">
|
274
|
-
<li>
|
275
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
276
|
-
<p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass <code>null</code> to use the currently selected items.</p>
|
277
|
-
</li>
|
278
|
-
</ul>
|
279
|
-
|
280
|
-
<div style="height:1px; visibility:hidden; overflow:hidden;"><span id="check_move"> </span></div>
|
281
|
-
<h3 id="move_node">.check_move ( ), .move_node ( )</h3>
|
282
|
-
<p>Both functions are overwritten from the <a href="core.html#check_move">core</a> in order to implement the new functionality.</p>
|
283
|
-
|
284
|
-
<h3 id="cut">.cut ( node )</h3>
|
285
|
-
<p>Cuts a node (prepares it for pasting).</p>
|
286
|
-
<ul class="arguments">
|
287
|
-
<li>
|
288
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
289
|
-
<p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass <code>null</code> to use the currently selected item.</p>
|
290
|
-
</li>
|
291
|
-
</ul>
|
292
|
-
|
293
|
-
<h3 id="copy">.copy ( node )</h3>
|
294
|
-
<p>Copies a node (prepares it for pasting).</p>
|
295
|
-
<ul class="arguments">
|
296
|
-
<li>
|
297
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
298
|
-
<p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass <code>null</code> to use the currently selected item.</p>
|
299
|
-
</li>
|
300
|
-
</ul>
|
301
|
-
|
302
|
-
<h3 id="paste">.paste ( node )</h3>
|
303
|
-
<p>Pastes copied or cut nodes inside a node.</p>
|
304
|
-
<ul class="arguments">
|
305
|
-
<li>
|
306
|
-
<code class="tp">mixed</code> <strong>node</strong>
|
307
|
-
<p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If you use the UI plugin - pass <code>null</code> to use the currently selected item.</p>
|
308
|
-
</li>
|
309
|
-
</ul>
|
310
|
-
|
311
|
-
</div>
|
312
|
-
|
313
|
-
</div>
|
314
|
-
</body>
|
315
|
-
</html>
|
@@ -1,197 +0,0 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<title>jsTree v.1.0 - dnd documentation</title>
|
8
|
-
<script type="text/javascript" src="../_lib/jquery.js"></script>
|
9
|
-
<script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
|
10
|
-
<script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
|
11
|
-
<script type="text/javascript" src="../jquery.jstree.js"></script>
|
12
|
-
|
13
|
-
<link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
|
14
|
-
<link type="text/css" rel="stylesheet" href="!style.css"/>
|
15
|
-
<script type="text/javascript" src="syntax/!script.js"></script>
|
16
|
-
</head>
|
17
|
-
<body>
|
18
|
-
<div id="container">
|
19
|
-
|
20
|
-
<h1>jsTree v.1.0 - drag'n'drop plugin</h1>
|
21
|
-
<h2>Description</h2>
|
22
|
-
<div id="description">
|
23
|
-
<p>The <code>dnd</code> plugin enables drag'n'drop support for jstree, also using foreign nodes and drop targets.</p>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<h2 id="configuration">Configuration</h2>
|
27
|
-
<div class="panel configuration">
|
28
|
-
|
29
|
-
<h3>copy_modifier</h3>
|
30
|
-
<p class="meta">A string. Default is <code>"ctrl"</code>.</p>
|
31
|
-
<p>The special key used to make a drag copy instead of move (<code>"ctrl"</code>, <code>"shift"</code>, <code>"alt"</code>, <code>"meta"</code>).</p>
|
32
|
-
|
33
|
-
<h3>check_timeout</h3>
|
34
|
-
<p class="meta">A number. Default is <code>200</code>.</p>
|
35
|
-
<p>The number of milliseconds to wait before checking if a move is valid upon hovering a node (while dragging). <code>200</code> is a reasonable value - a higher number means better performance but slow feedback to the user, a lower number means lower performance (possibly) but the user will get feedback faster.</p>
|
36
|
-
|
37
|
-
<h3>open_timeout</h3>
|
38
|
-
<p class="meta">A number. Default is <code>500</code>.</p>
|
39
|
-
<p>The number of milliseconds to wait before opening a hovered if it has children (while dragging). This means that the user has to stop over the node for half a second in order to trigger the open operation. Keep in mind that a low value in combination with async data could mean a lot of unneeded traffic, so <code>500</code> is quite reasonable.</p>
|
40
|
-
|
41
|
-
<h3>drop_target</h3>
|
42
|
-
<p class="meta">A string (jQuery selector) (or <code>false</code>). Default is <code>".jstree-drop"</code>.</p>
|
43
|
-
<p>A jquery selector matching all drop targets (you can also use the comma <code>,</code> in the string to specify multiple valid targets). If set to <code>false</code> drop targets are disabled.</p>
|
44
|
-
|
45
|
-
<h3>drop_check</h3>
|
46
|
-
<p class="meta">A function. Default is <code>function (data) { return true; }</code>.</p>
|
47
|
-
<p>Return <code>false</code> to mark the move as invalid, otherwise return <code>true</code>. The <code>data</code> parameter is as follows:</p>
|
48
|
-
<p style="margin-left:2em;"><code>data.o</code> - the object being dragged</p>
|
49
|
-
<p style="margin-left:2em;"><code>data.r</code> - the drop target</p>
|
50
|
-
|
51
|
-
<h3>drop_finish</h3>
|
52
|
-
<p class="meta">A function. Default is <code>$.noop</code>.</p>
|
53
|
-
<p>Gets executed after a valid drop, you get one parameter, which is as follows:</p>
|
54
|
-
<p style="margin-left:2em;"><code>data.o</code> - the object being dragged</p>
|
55
|
-
<p style="margin-left:2em;"><code>data.r</code> - the drop target</p>
|
56
|
-
|
57
|
-
<h3>drag_target</h3>
|
58
|
-
<p class="meta">A string (jQuery selector) (or <code>false</code>). Default is <code>".jstree-draggable"</code>.</p>
|
59
|
-
<p>A jquery selector matching all foreign nodes that can be dropped on the tree (you can also use the comma <code>,</code> in the string to specify multiple valid foreign nodes). If set to <code>false</code> dragging foreign nodes is disabled.</p>
|
60
|
-
|
61
|
-
<h3>drag_check</h3>
|
62
|
-
<p class="meta">A function. Default is <code>function (data) { return { after : false, before : false, inside : true }; }</code>.</p>
|
63
|
-
<p>Return a boolean for each position. The <code>data</code> parameter is as follows:</p>
|
64
|
-
<p style="margin-left:2em;"><code>data.o</code> - the foreign object being dragged</p>
|
65
|
-
<p style="margin-left:2em;"><code>data.r</code> - the hovered node</p>
|
66
|
-
|
67
|
-
<h3>drag_finish</h3>
|
68
|
-
<p class="meta">A function. Default is <code>$.noop</code>.</p>
|
69
|
-
<p>Gets executed after a dropping a foreign element on a tree item, you get one parameter, which is as follows:</p>
|
70
|
-
<p style="margin-left:2em;"><code>data.o</code> - the foreign object being dragged</p>
|
71
|
-
<p style="margin-left:2em;"><code>data.r</code> - the target node</p>
|
72
|
-
|
73
|
-
|
74
|
-
</div>
|
75
|
-
|
76
|
-
<h2 id="demos">Demos</h2>
|
77
|
-
<div class="panel">
|
78
|
-
<h3>Using the dnd plugin</h3>
|
79
|
-
<p>Drag stuff around!</p>
|
80
|
-
<div class="jstree-drop" style="clear:both; border:5px solid green; background:lime; color:green; height:40px; line-height:40px; text-align:center; font-size:20px;">I have the jstree-drop class</div>
|
81
|
-
<div class="jstree-draggable" style="margin:10px 0; clear:both; border:5px solid navy; background:aqua; color:navy; height:40px; line-height:40px; text-align:center; font-size:20px;">I have the jstree-draggable class</div>
|
82
|
-
<div id="demo1" class="demo">
|
83
|
-
<ul>
|
84
|
-
<li id="phtml_1">
|
85
|
-
<a href="#">Root node 1</a>
|
86
|
-
<ul>
|
87
|
-
<li id="phtml_2">
|
88
|
-
<a href="#">Child node 1</a>
|
89
|
-
</li>
|
90
|
-
<li id="phtml_3">
|
91
|
-
<a href="#">Child node 2</a>
|
92
|
-
</li>
|
93
|
-
</ul>
|
94
|
-
</li>
|
95
|
-
<li id="phtml_4">
|
96
|
-
<a href="#">Root node 2</a>
|
97
|
-
</li>
|
98
|
-
</ul>
|
99
|
-
</div>
|
100
|
-
<script type="text/javascript" class="source">
|
101
|
-
$(function () {
|
102
|
-
$("#demo1").jstree({
|
103
|
-
"dnd" : {
|
104
|
-
"drop_finish" : function () {
|
105
|
-
alert("DROP");
|
106
|
-
},
|
107
|
-
"drag_check" : function (data) {
|
108
|
-
if(data.r.attr("id") == "phtml_1") {
|
109
|
-
return false;
|
110
|
-
}
|
111
|
-
return {
|
112
|
-
after : false,
|
113
|
-
before : false,
|
114
|
-
inside : true
|
115
|
-
};
|
116
|
-
},
|
117
|
-
"drag_finish" : function () {
|
118
|
-
alert("DRAG OK");
|
119
|
-
}
|
120
|
-
},
|
121
|
-
"plugins" : [ "themes", "html_data", "dnd" ]
|
122
|
-
});
|
123
|
-
});
|
124
|
-
</script>
|
125
|
-
|
126
|
-
<h3>Reorder only demo</h3>
|
127
|
-
<div id="demo2" class="demo">
|
128
|
-
<ul>
|
129
|
-
<li id="rhtml_1">
|
130
|
-
<a href="#">Root node 1</a>
|
131
|
-
<ul>
|
132
|
-
<li id="rhtml_2">
|
133
|
-
<a href="#">Child node 1</a>
|
134
|
-
</li>
|
135
|
-
<li id="rhtml_3">
|
136
|
-
<a href="#">Child node 2</a>
|
137
|
-
</li>
|
138
|
-
<li id="rhtml_4">
|
139
|
-
<a href="#">Child node 3</a>
|
140
|
-
</li>
|
141
|
-
<li id="rhtml_5">
|
142
|
-
<a href="#">Child node 4</a>
|
143
|
-
</li>
|
144
|
-
</ul>
|
145
|
-
</li>
|
146
|
-
<li id="rhtml_6">
|
147
|
-
<a href="#">Root node 2</a>
|
148
|
-
</li>
|
149
|
-
<li id="rhtml_7">
|
150
|
-
<a href="#">Root node 3</a>
|
151
|
-
</li>
|
152
|
-
</ul>
|
153
|
-
</div>
|
154
|
-
<script type="text/javascript" class="source">
|
155
|
-
$(function () {
|
156
|
-
$("#demo2").jstree({
|
157
|
-
"crrm" : {
|
158
|
-
"move" : {
|
159
|
-
"check_move" : function (m) {
|
160
|
-
var p = this._get_parent(m.o);
|
161
|
-
if(!p) return false;
|
162
|
-
p = p == -1 ? this.get_container() : p;
|
163
|
-
if(p === m.np) return true;
|
164
|
-
if(p[0] && m.np[0] && p[0] === m.np[0]) return true;
|
165
|
-
return false;
|
166
|
-
}
|
167
|
-
}
|
168
|
-
},
|
169
|
-
"dnd" : {
|
170
|
-
"drop_target" : false,
|
171
|
-
"drag_target" : false
|
172
|
-
},
|
173
|
-
"plugins" : [ "themes", "html_data", "crrm", "dnd" ]
|
174
|
-
});
|
175
|
-
});
|
176
|
-
</script>
|
177
|
-
|
178
|
-
</div>
|
179
|
-
|
180
|
-
<h2 id="api">API</h2>
|
181
|
-
<div class="panel api">
|
182
|
-
|
183
|
-
<div style="height:1px; visibility:hidden;">
|
184
|
-
<span id="dnd_show"> </span>
|
185
|
-
<span id="dnd_open"> </span>
|
186
|
-
<span id="dnd_finish"> </span>
|
187
|
-
<span id="dnd_enter"> </span>
|
188
|
-
<span id="start_drag"> </span>
|
189
|
-
</div>
|
190
|
-
<h3 id="dnd_prepare">.dnd_prepare ( ), .dnd_show ( ), .dnd_open ( ), .dnd_finish ( ), .dnd_enter ( ), .start_drag ( )</h3>
|
191
|
-
<p>All those functions are used internally only. If you want more information - examine the source code.</p>
|
192
|
-
|
193
|
-
</div>
|
194
|
-
|
195
|
-
</div>
|
196
|
-
</body>
|
197
|
-
</html>
|
@@ -1,81 +0,0 @@
|
|
1
|
-
<!DOCTYPE html
|
2
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
-
<head>
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<title>jsTree v.1.0 - hotkeys documentation</title>
|
8
|
-
<script type="text/javascript" src="../_lib/jquery.js"></script>
|
9
|
-
<script type="text/javascript" src="../_lib/jquery.cookie.js"></script>
|
10
|
-
<script type="text/javascript" src="../_lib/jquery.hotkeys.js"></script>
|
11
|
-
<script type="text/javascript" src="../jquery.jstree.js"></script>
|
12
|
-
|
13
|
-
<link type="text/css" rel="stylesheet" href="syntax/!style.css"/>
|
14
|
-
<link type="text/css" rel="stylesheet" href="!style.css"/>
|
15
|
-
<script type="text/javascript" src="syntax/!script.js"></script>
|
16
|
-
</head>
|
17
|
-
<body>
|
18
|
-
<div id="container">
|
19
|
-
|
20
|
-
<h1>jsTree v.1.0 - hotkeys plugin</h1>
|
21
|
-
<h2>Description</h2>
|
22
|
-
<div id="description">
|
23
|
-
<p>The <code>hotkeys</code> plugin enables keyboard navigation and shortcuts. Depends on the <a href="http://github.com/jeresig/jquery.hotkeys/">jquery.hotkeys plugin</a></p>
|
24
|
-
</div>
|
25
|
-
|
26
|
-
<h2 id="configuration">Configuration</h2>
|
27
|
-
<div class="panel configuration">
|
28
|
-
<p>Expects an object:<br />each key is the keyboard shortcut (for possible values check <a href="http://github.com/jeresig/jquery.hotkeys/">the hotkeys plugin</a>)<br />each values is a function executed in the instance's context, the return value is used as a return value for the event.</p>
|
29
|
-
<p>Simple example:</p>
|
30
|
-
<p><code>"del" : function () { this.remove(); }</code></p>
|
31
|
-
|
32
|
-
</div>
|
33
|
-
|
34
|
-
<h2 id="demos">Demos</h2>
|
35
|
-
<div class="panel">
|
36
|
-
|
37
|
-
<h3>Using the hotkeys plugin</h3>
|
38
|
-
<p>Try pressing <code>up</code>/<code>down</code>/<code>left</code>/<code>right</code>/<code>space</code>/<code>f2</code>/<code>del</code>.</p>
|
39
|
-
<div id="demo1" class="demo">
|
40
|
-
<ul>
|
41
|
-
<li id="phtml_1">
|
42
|
-
<a href="#">Root node 1</a>
|
43
|
-
<ul>
|
44
|
-
<li id="phtml_2">
|
45
|
-
<a href="#">Child node 1</a>
|
46
|
-
</li>
|
47
|
-
<li id="phtml_3">
|
48
|
-
<a href="#">Child node 2</a>
|
49
|
-
</li>
|
50
|
-
</ul>
|
51
|
-
</li>
|
52
|
-
<li id="phtml_4">
|
53
|
-
<a href="#">Root node 2</a>
|
54
|
-
</li>
|
55
|
-
</ul>
|
56
|
-
</div>
|
57
|
-
<script type="text/javascript" class="source">
|
58
|
-
$(function () {
|
59
|
-
$("#demo1").jstree({
|
60
|
-
"core" : { "initially_open" : [ "phtml_1" ] },
|
61
|
-
"plugins" : ["themes","html_data","ui","crrm","hotkeys"]
|
62
|
-
});
|
63
|
-
});
|
64
|
-
</script>
|
65
|
-
|
66
|
-
</div>
|
67
|
-
|
68
|
-
<h2 id="api">API</h2>
|
69
|
-
<div class="panel api">
|
70
|
-
|
71
|
-
<h3 id="enable_hotkeys">.enable_hotkeys ( )</h3>
|
72
|
-
<p>Enable shortcuts on the instance (enabled by default).</p>
|
73
|
-
|
74
|
-
<h3 id="disable_hotkeys">.disable_hotkeys ( )</h3>
|
75
|
-
<p>Disable shortcuts on the instance.</p>
|
76
|
-
|
77
|
-
</div>
|
78
|
-
|
79
|
-
</div>
|
80
|
-
</body>
|
81
|
-
</html>
|