wheels 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. data/Gemfile +20 -0
  2. data/VERSION +1 -1
  3. data/app/controllers/app_configs_controller.rb +12 -0
  4. data/app/controllers/application_controller.rb +39 -0
  5. data/app/helpers/application_helper.rb +24 -2
  6. data/app/models/sitemap.rb +7 -0
  7. data/app/views/app_configs/css.css.haml +2 -0
  8. data/app/views/layouts/application.html.haml +21 -15
  9. data/app/views/pages/_form_fields.html.haml +2 -0
  10. data/app/views/sitemaps/index.html.haml +68 -76
  11. data/db/migrate/0000_devise_create_users.rb +26 -0
  12. data/db/migrate/0180_acts_as_taggable_on_migration.rb +28 -0
  13. data/lib/generators/app_layout/app_layout_generator.rb +1 -1
  14. data/lib/generators/{wheels/core_extensions.rb → core_extensions.rb} +42 -1
  15. data/lib/generators/recipes/wheels.rb +46 -0
  16. data/lib/generators/recipes/wheels_update.rb +18 -0
  17. data/lib/generators/wheels/wheels_generator.rb +3 -1
  18. data/lib/generators/wheels_checkout_assets/USAGE +8 -0
  19. data/lib/generators/wheels_checkout_assets/wheels_checkout_assets_generator.rb +9 -0
  20. data/lib/generators/wheels_checkout_assets_readonly/USAGE +8 -0
  21. data/lib/generators/wheels_checkout_assets_readonly/wheels_checkout_assets_readonly_generator.rb +10 -0
  22. data/lib/generators/wheels_controller/USAGE +8 -0
  23. data/lib/generators/wheels_controller/wheels_controller_generator.rb +14 -0
  24. data/lib/generators/{wheels_views → wheels_model}/USAGE +1 -1
  25. data/lib/generators/wheels_model/wheels_model_generator.rb +14 -0
  26. data/lib/generators/{update_wheels/update_wheels_generator.rb → wheels_update/wheels_update_generator.rb} +7 -13
  27. data/lib/generators/wheels_view/USAGE +8 -0
  28. data/lib/generators/wheels_view/wheels_view_generator.rb +14 -0
  29. data/lib/wheels/routes.rb +7 -1
  30. data/wheels.gemspec +44 -218
  31. metadata +44 -218
  32. data/lib/generators/app_layout/core_extensions.rb +0 -51
  33. data/lib/generators/update_wheels/core_extensions.rb +0 -51
  34. data/lib/generators/update_wheels/recipes/wheels.rb +0 -11
  35. data/lib/generators/update_wheels/templates/haml/app/views/layouts/application.html.haml +0 -9
  36. data/lib/generators/wheels/install_generator.rb +0 -25
  37. data/lib/generators/wheels/recipes/wheels.rb +0 -66
  38. data/lib/generators/wheels/templates/cancan/ability.rb +0 -13
  39. data/lib/generators/wheels/templates/database/postgresql.yml +0 -19
  40. data/lib/generators/wheels/templates/git/gitignore +0 -8
  41. data/lib/generators/wheels/templates/mongoid/features/step_definitions/mongoid_steps.rb +0 -4
  42. data/lib/generators/wheels/templates/mongoid/features/support/hooks.rb +0 -3
  43. data/lib/generators/wheels/views_generator.rb +0 -15
  44. data/lib/generators/wheels_views/LICENCE +0 -20
  45. data/lib/generators/wheels_views/wheels_views_generator.rb +0 -15
  46. data/lib/wheels/base.rb +0 -7
  47. data/public/404.html +0 -26
  48. data/public/422.html +0 -26
  49. data/public/500.html +0 -26
  50. data/public/favicon.ico +0 -0
  51. data/public/images/dreamy/Thumbs.db +0 -0
  52. data/public/images/dreamy/bg-ad-top.png +0 -0
  53. data/public/images/dreamy/bg-body.png +0 -0
  54. data/public/images/dreamy/bg-feed.gif +0 -0
  55. data/public/images/dreamy/bg-footer.jpg +0 -0
  56. data/public/images/dreamy/bg-header.jpg +0 -0
  57. data/public/images/dreamy/bg-menu-hover.png +0 -0
  58. data/public/images/dreamy/bg-menu.png +0 -0
  59. data/public/images/dreamy/bg-sidebar-bottom.gif +0 -0
  60. data/public/images/dreamy/button-feed.png +0 -0
  61. data/public/images/dreamy/icon-comment.png +0 -0
  62. data/public/images/growl/error.png +0 -0
  63. data/public/images/growl/growl_bottom.png +0 -0
  64. data/public/images/growl/growl_repeat.png +0 -0
  65. data/public/images/growl/growl_top.png +0 -0
  66. data/public/images/growl/info.png +0 -0
  67. data/public/images/menu/item-pointer-mover.gif +0 -0
  68. data/public/images/menu/item-pointer.gif +0 -0
  69. data/public/images/menu/lava.gif +0 -0
  70. data/public/images/menu/lava.png +0 -0
  71. data/public/images/menu/main-bg.png +0 -0
  72. data/public/images/menu/main-delimiter.png +0 -0
  73. data/public/javascripts/galleries/configure_ckeditor.js +0 -8
  74. data/public/javascripts/jqUrl.js +0 -28
  75. data/public/javascripts/jquery-validate/additional-methods.js +0 -259
  76. data/public/javascripts/jquery-validate/changelog.txt +0 -239
  77. data/public/javascripts/jquery-validate/jquery.validate.js +0 -1146
  78. data/public/javascripts/jquery-validate/jquery.validate.min.js +0 -16
  79. data/public/javascripts/jquery-validate/jquery.validate.pack.js +0 -15
  80. data/public/javascripts/jquery-validate/lib/jquery-1.4.2.js +0 -6240
  81. data/public/javascripts/jquery-validate/lib/jquery.form.js +0 -660
  82. data/public/javascripts/jquery-validate/lib/jquery.js +0 -4376
  83. data/public/javascripts/jquery-validate/lib/jquery.metadata.js +0 -122
  84. data/public/javascripts/jquery-validate/localization/messages_ar.js +0 -24
  85. data/public/javascripts/jquery-validate/localization/messages_bg.js +0 -23
  86. data/public/javascripts/jquery-validate/localization/messages_cn.js +0 -23
  87. data/public/javascripts/jquery-validate/localization/messages_cs.js +0 -23
  88. data/public/javascripts/jquery-validate/localization/messages_da.js +0 -20
  89. data/public/javascripts/jquery-validate/localization/messages_de.js +0 -20
  90. data/public/javascripts/jquery-validate/localization/messages_el.js +0 -24
  91. data/public/javascripts/jquery-validate/localization/messages_es.js +0 -23
  92. data/public/javascripts/jquery-validate/localization/messages_fa.js +0 -23
  93. data/public/javascripts/jquery-validate/localization/messages_fi.js +0 -21
  94. data/public/javascripts/jquery-validate/localization/messages_fr.js +0 -23
  95. data/public/javascripts/jquery-validate/localization/messages_he.js +0 -23
  96. data/public/javascripts/jquery-validate/localization/messages_hu.js +0 -20
  97. data/public/javascripts/jquery-validate/localization/messages_it.js +0 -23
  98. data/public/javascripts/jquery-validate/localization/messages_kk.js +0 -23
  99. data/public/javascripts/jquery-validate/localization/messages_lt.js +0 -23
  100. data/public/javascripts/jquery-validate/localization/messages_lv.js +0 -23
  101. data/public/javascripts/jquery-validate/localization/messages_nl.js +0 -23
  102. data/public/javascripts/jquery-validate/localization/messages_no.js +0 -23
  103. data/public/javascripts/jquery-validate/localization/messages_pl.js +0 -23
  104. data/public/javascripts/jquery-validate/localization/messages_ptbr.js +0 -23
  105. data/public/javascripts/jquery-validate/localization/messages_ptpt.js +0 -23
  106. data/public/javascripts/jquery-validate/localization/messages_ro.js +0 -23
  107. data/public/javascripts/jquery-validate/localization/messages_ru.js +0 -23
  108. data/public/javascripts/jquery-validate/localization/messages_se.js +0 -21
  109. data/public/javascripts/jquery-validate/localization/messages_sk.js +0 -20
  110. data/public/javascripts/jquery-validate/localization/messages_tr.js +0 -23
  111. data/public/javascripts/jquery-validate/localization/messages_tw.js +0 -23
  112. data/public/javascripts/jquery-validate/localization/messages_ua.js +0 -23
  113. data/public/javascripts/jquery-validate/localization/methods_de.js +0 -12
  114. data/public/javascripts/jquery-validate/localization/methods_nl.js +0 -9
  115. data/public/javascripts/jquery-validate/localization/methods_pt.js +0 -9
  116. data/public/javascripts/jquery-validate/todo +0 -172
  117. data/public/javascripts/jquery.cookie.js +0 -96
  118. data/public/javascripts/jquery.filedrop.js +0 -253
  119. data/public/javascripts/jquery.growl.js +0 -143
  120. data/public/javascripts/jquery.hotkeys.js +0 -99
  121. data/public/javascripts/jquery.js +0 -6240
  122. data/public/javascripts/jquery.jstree.js +0 -3510
  123. data/public/javascripts/jquery.uploadify.js +0 -26
  124. data/public/javascripts/jquery.validate.js +0 -1147
  125. data/public/javascripts/loadbehind.js +0 -0
  126. data/public/javascripts/menu.js +0 -247
  127. data/public/javascripts/sitemap_jstree.js +0 -329
  128. data/public/javascripts/swfobject.js +0 -4
  129. data/public/jstree/_demo/_dump.sql +0 -20
  130. data/public/jstree/_demo/_inc/__mysql_errors.log +0 -0
  131. data/public/jstree/_demo/_inc/class._database.php +0 -146
  132. data/public/jstree/_demo/_inc/class._database_i.php +0 -152
  133. data/public/jstree/_demo/_inc/class.tree.php +0 -602
  134. data/public/jstree/_demo/_install.txt +0 -6
  135. data/public/jstree/_demo/config.php +0 -14
  136. data/public/jstree/_demo/index.html +0 -262
  137. data/public/jstree/_demo/server.php +0 -69
  138. data/public/jstree/_docs/!style.css +0 -37
  139. data/public/jstree/_docs/_drive.png +0 -0
  140. data/public/jstree/_docs/_html_data.html +0 -2
  141. data/public/jstree/_docs/_json_data.json +0 -4
  142. data/public/jstree/_docs/_search_data.json +0 -6
  143. data/public/jstree/_docs/_search_result.json +0 -1
  144. data/public/jstree/_docs/_xml_flat.xml +0 -12
  145. data/public/jstree/_docs/_xml_nest.xml +0 -18
  146. data/public/jstree/_docs/checkbox.html +0 -148
  147. data/public/jstree/_docs/contextmenu.html +0 -120
  148. data/public/jstree/_docs/cookies.html +0 -96
  149. data/public/jstree/_docs/core.html +0 -622
  150. data/public/jstree/_docs/crrm.html +0 -315
  151. data/public/jstree/_docs/dnd.html +0 -197
  152. data/public/jstree/_docs/hotkeys.html +0 -81
  153. data/public/jstree/_docs/html_data.html +0 -174
  154. data/public/jstree/_docs/index.html +0 -75
  155. data/public/jstree/_docs/json_data.html +0 -240
  156. data/public/jstree/_docs/languages.html +0 -138
  157. data/public/jstree/_docs/search.html +0 -114
  158. data/public/jstree/_docs/sort.html +0 -84
  159. data/public/jstree/_docs/syntax/!script.js +0 -2232
  160. data/public/jstree/_docs/syntax/!style.css +0 -511
  161. data/public/jstree/_docs/syntax/clipboard.swf +0 -0
  162. data/public/jstree/_docs/syntax/help.png +0 -0
  163. data/public/jstree/_docs/syntax/magnifier.png +0 -0
  164. data/public/jstree/_docs/syntax/page_white_code.png +0 -0
  165. data/public/jstree/_docs/syntax/page_white_copy.png +0 -0
  166. data/public/jstree/_docs/syntax/printer.png +0 -0
  167. data/public/jstree/_docs/syntax/wrapping.png +0 -0
  168. data/public/jstree/_docs/themeroller.html +0 -98
  169. data/public/jstree/_docs/themes.html +0 -126
  170. data/public/jstree/_docs/types.html +0 -173
  171. data/public/jstree/_docs/ui.html +0 -188
  172. data/public/jstree/_docs/unique.html +0 -70
  173. data/public/jstree/_docs/xml_data.html +0 -214
  174. data/public/jstree/_lib/jquery.cookie.js +0 -96
  175. data/public/jstree/_lib/jquery.hotkeys.js +0 -99
  176. data/public/jstree/_lib/jquery.js +0 -6240
  177. data/public/jstree/jquery.jstree.js +0 -3510
  178. data/public/jstree/jstree.html +0 -237
  179. data/public/jstree/themes/apple/bg.jpg +0 -0
  180. data/public/jstree/themes/apple/d.png +0 -0
  181. data/public/jstree/themes/apple/dot_for_ie.gif +0 -0
  182. data/public/jstree/themes/apple/style.css +0 -60
  183. data/public/jstree/themes/apple/throbber.gif +0 -0
  184. data/public/jstree/themes/classic/d.png +0 -0
  185. data/public/jstree/themes/classic/dot_for_ie.gif +0 -0
  186. data/public/jstree/themes/classic/style.css +0 -59
  187. data/public/jstree/themes/classic/throbber.gif +0 -0
  188. data/public/jstree/themes/default/d.gif +0 -0
  189. data/public/jstree/themes/default/d.png +0 -0
  190. data/public/jstree/themes/default/style.css +0 -73
  191. data/public/jstree/themes/default/throbber.gif +0 -0
  192. data/public/jstree/themes/default-rtl/d.gif +0 -0
  193. data/public/jstree/themes/default-rtl/d.png +0 -0
  194. data/public/jstree/themes/default-rtl/dots.gif +0 -0
  195. data/public/jstree/themes/default-rtl/style.css +0 -83
  196. data/public/jstree/themes/default-rtl/throbber.gif +0 -0
  197. data/public/stylesheets/dreamy.css +0 -183
  198. data/public/stylesheets/menu.css +0 -101
  199. data/public/stylesheets/sass/dreamy.sass +0 -165
  200. data/public/stylesheets/sass/menu.sass +0 -139
  201. data/public/stylesheets/sass/uploadify.sass +0 -52
  202. data/public/stylesheets/sass/wheels.sass +0 -25
  203. data/public/stylesheets/scaffold.css +0 -56
  204. data/public/stylesheets/ui-lightness/images/ui-anim_basic_16x16.gif +0 -0
  205. data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  206. data/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  207. data/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
  208. data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  209. data/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  210. data/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  211. data/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  212. data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  213. data/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  214. data/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
  215. data/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
  216. data/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
  217. data/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
  218. data/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
  219. data/public/stylesheets/ui-lightness/jquery-ui-1.8.2.custom.css +0 -359
  220. data/public/stylesheets/ui-lightness/jquery-ui-1.8.4.custom.css +0 -549
  221. data/public/test.html +0 -18
  222. /data/lib/generators/{wheels/recipes → recipes}/cancan.rb +0 -0
  223. /data/lib/generators/{wheels/recipes → recipes}/cucumber.rb +0 -0
  224. /data/lib/generators/{wheels/recipes → recipes}/default.rb +0 -0
  225. /data/lib/generators/{wheels/recipes → recipes}/design.rb +0 -0
  226. /data/lib/generators/{wheels/recipes → recipes}/devise.rb +0 -0
  227. /data/lib/generators/{wheels/recipes → recipes}/factory_girl.rb +0 -0
  228. /data/lib/generators/{wheels/recipes → recipes}/haml.rb +0 -0
  229. /data/lib/generators/{wheels/recipes → recipes}/jquery.rb +0 -0
  230. /data/lib/generators/{wheels/recipes → recipes}/mongoid.rb +0 -0
  231. /data/lib/generators/{wheels/recipes → recipes}/postgresql.rb +0 -0
  232. /data/lib/generators/{wheels/recipes → recipes}/recipes.rb +0 -0
  233. /data/lib/generators/{wheels/recipes → recipes}/remarkable.rb +0 -0
  234. /data/lib/generators/{wheels/recipes → recipes}/rspec.rb +0 -0
  235. /data/lib/generators/{wheels/snippets → snippets}/cucumber/database_config +0 -0
  236. /data/lib/generators/{update_wheels/templates → templates}/cancan/ability.rb +0 -0
  237. /data/lib/generators/{update_wheels/templates → templates}/database/postgresql.yml +0 -0
  238. /data/lib/generators/{update_wheels/templates → templates}/git/gitignore +0 -0
  239. /data/lib/generators/{wheels/templates → templates}/haml/app/views/layouts/application.html.haml +0 -0
  240. /data/lib/generators/{update_wheels/templates → templates}/mongoid/features/step_definitions/mongoid_steps.rb +0 -0
  241. /data/lib/generators/{update_wheels/templates → templates}/mongoid/features/support/hooks.rb +0 -0
  242. /data/lib/generators/{update_wheels → wheels_update}/LICENCE +0 -0
  243. /data/lib/generators/{update_wheels → wheels_update}/USAGE +0 -0
@@ -1,174 +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 - html_data 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 - html_data plugin</h1>
21
- <h2>Description</h2>
22
- <div id="description">
23
- <p>The <code>html_data</code> plugin enables jsTree to convert nested unordered lists to interactive trees. jsTree can also get HTML from the server insert it into the DOM and convert that to a tree.</p>
24
- <p>The basic structure you need to follow when supplying data in the HTML format is:</p>
25
- <div class="code_f">
26
- <pre class="brush:xml;">
27
- &lt;li&gt;
28
- &lt;a href="some_value_here"&gt;Node title&lt;/a&gt;
29
- &lt;!-- UL node only needed for children - omit if there are no children --&gt;
30
- &lt;ul&gt;
31
- &lt;!-- Children LI nodes here --&gt;
32
- &lt;/ul&gt;
33
- &lt;/li&gt;
34
- </pre>
35
- </div>
36
- <p>If you inspect the resulting structure you will find it a bit different - that is because jstree will automatically do some corrections.</p>
37
- <div class="code_f">
38
- <pre class="brush:xml;">
39
- &lt;!-- one of the three classes will be applied depending on node structure --&gt;
40
- &lt;li class="[ jstree-open | jstree-closed | jstree-leaf ]"&gt;
41
- &lt;!-- an INS element is inserted --&gt;
42
- &lt;ins class="jstree-icon"&gt;&amp;#160;&lt;/ins&gt;
43
- &lt;a href="some_value_here"&gt;
44
- &lt;!-- another INS element is inserted --&gt;
45
- &lt;ins class="jstree-icon"&gt;&amp;#160;&lt;/ins&gt;
46
- Node title
47
- &lt;/a&gt;
48
- &lt;/li&gt;
49
- </pre>
50
- </div>
51
- <p>Both <code>ins</code> elements are inserted for visualization purposes. As for the class (<code>jstree-open</code>, <code>jstree-closed</code>) - you can specify that yourself to force the node to appear either closed or opened. Making a node with no children appear closed is often used - if you use ajax, opening a closed node with no children will result in jstree making a server call for the children (see the <a href="#demo3">demo below</a>).</p>
52
- </div>
53
-
54
- <h2 id="configuration">Configuration</h2>
55
- <div class="panel configuration">
56
- <h3>data</h3>
57
- <p class="meta">A HTML string (or <code>false</code> if not used). Default is <code>false</code>.</p>
58
- <p>Specifies the content to load into the container and convert to a tree.</p>
59
- <h3>ajax</h3>
60
- <p class="meta">An object (or <code>false</code> if not used). Default is <code>false</code>.</p>
61
- <p>The ajax config object is pretty much the same as the <a href="http://api.jquery.com/jQuery.ajax/">jQuery ajax settings object</a>.</p>
62
- <p>You can set the <code>data</code> option to a function, that will be executed in the current tree's scope (<code>this</code> will be the tree instance) and gets the node about to be open as a paramater (or <code>-1</code> for initial load). Whatever you return in the function will be sent to the server as data (so for example you can send the node's ID).</p>
63
- <p>You can set the <code>url</code> option to a function, that will be executed in the current tree's scope (<code>this</code> will be the tree instance) and gets the node about to be open as a paramater (or <code>-1</code> for initial load). Whatever you return in the <code>url</code> function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).</p>
64
- <p>The <code>error</code> and <code>success</code> functions (if present) also fire in the context of the tree, and if you return a value in the <code>success</code> function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree.</p>
65
- <h3>correct_state</h3>
66
- <p class="meta">A Boolean. Default is <code>true</code>.</p>
67
- <p>If this option is set to <code>true</code> if an AJAX request returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).</p>
68
-
69
- <p class="note"><strong>NOTE:</strong><br />If both <code>data</code> and <code>ajax</code> are not set, the current container's HTML is used to build the tree.<br />If both <code>data</code> and <code>ajax</code> are set the initial tree is rendered from the <code>data</code> string. When opening a closed node (that has no loaded children) an AJAX request is made.</p>
70
- </div>
71
-
72
- <h2 id="demos">Demos</h2>
73
- <div class="panel">
74
-
75
- <h3>Using initial content (convert an existing list)</h3>
76
- <div id="demo1" class="demo">
77
- <ul>
78
- <li id="phtml_1">
79
- <a href="#">Root node 1</a>
80
- <ul>
81
- <li id="phtml_2">
82
- <a href="#">Child node 1</a>
83
- </li>
84
- <li id="phtml_3">
85
- <a href="#">Child node 2</a>
86
- </li>
87
- </ul>
88
- </li>
89
- <li id="phtml_4">
90
- <a href="#">Root node 2</a>
91
- </li>
92
- </ul>
93
- </div>
94
- <script type="text/javascript" class="source">
95
- $(function () {
96
- $("#demo1").jstree({
97
- "plugins" : [ "themes", "html_data" ]
98
- });
99
- });
100
- </script>
101
-
102
- <h3>Using the data config option</h3>
103
- <div id="demo2" class="demo"></div>
104
- <script type="text/javascript" class="source">
105
- $(function () {
106
- $("#demo2").jstree({
107
- "core" : { "initially_open" : [ "root" ] },
108
- "html_data" : {
109
- "data" : "<li id='root'><a href='#'>Root node</a><ul><li><a href='#'>Child node</a></li></ul></li>"
110
- },
111
- "plugins" : [ "themes", "html_data" ]
112
- });
113
- });
114
- </script>
115
-
116
- <h3>Using the ajax config option</h3>
117
- <div id="demo3" class="demo"></div>
118
- <script type="text/javascript" class="source">
119
- $(function () {
120
- $("#demo3").jstree({
121
- "html_data" : {
122
- "ajax" : {
123
- "url" : "_html_data.html",
124
- "data" : function (n) {
125
- return { id : n.attr ? n.attr("id") : 0 };
126
- }
127
- }
128
- },
129
- "plugins" : [ "themes", "html_data" ]
130
- });
131
- });
132
- </script>
133
-
134
- <h3>Using both the data &amp; ajax config options</h3>
135
- <div id="demo4" class="demo"></div>
136
- <script type="text/javascript" class="source">
137
- $(function () {
138
- $("#demo4").jstree({
139
- "core" : { "initially_open" : [ "root2" ] },
140
- "html_data" : {
141
- "data" : "<li class='jstree-closed' id='root2'><a href='#'>Root node</a></li>",
142
- "ajax" : { "url" : "_html_data.html" }
143
- },
144
- "plugins" : [ "themes", "html_data" ]
145
- });
146
- });
147
- </script>
148
- </div>
149
-
150
- <h2 id="api">API</h2>
151
- <div class="panel api">
152
- <p>Both dummy functions - <code>_is_loaded</code> and <code>load_node</code> are overwritten.</p>
153
- <h3 id="load_node_html">.load_node_html ( node , success_callback , error_callback )</h3>
154
- <p>This function is called instead of <code>load_node</code>.</p>
155
- <ul class="arguments">
156
- <li>
157
- <code class="tp">mixed</code> <strong>node</strong>
158
- <p>This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use <code>-1</code> for root nodes.</p>
159
- </li>
160
- <li>
161
- <code class="tp">function</code> <strong>success_callback</strong>
162
- <p>A function to be executed once the node is loaded successfully - used internally. You should wait for the <code>load_node</code> event.</p>
163
- </li>
164
- <li>
165
- <code class="tp">function</code> <strong>error_callback</strong>
166
- <p>A function to be executed if the node is not loaded due to an error - used internally. You should wait for the <code>load_node</code> event.</p>
167
- </li>
168
- </ul>
169
-
170
- </div>
171
-
172
- </div>
173
- </body>
174
- </html>
@@ -1,75 +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 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</h1>
21
- <h2>Description</h2>
22
- <div id="description">
23
- <p>jsTree is a javascript based, cross browser tree component. It is packaged as a <a href="http://jquery.com">jQuery</a> plugin.</p>
24
- <p>jsTree is absolutely free (licensed same as jQuery – under both GPL and MIT – whichever suits your needs).</p>
25
- <h3>Features at a glance</h3>
26
- <ul class="columns">
27
- <li>Various data sources - HTML, JSON, XML</li>
28
- <li>Supports AJAX loading</li>
29
- <li>Drag &amp; drop support</li>
30
- <li>Highly configurable</li>
31
- <li>Theme support + included themes</li>
32
- <li>Uses jQuery's event system</li>
33
- <li>Optional keyboard navigation</li>
34
- <li>Maintain the same tree in many languages</li>
35
- <li>Inline editing</li>
36
- <li>Open/close optional animation</li>
37
- <li>Define node types and fine tune them</li>
38
- <li>Configurable multitree drag &amp; drop</li>
39
- <li>Optional checkbox tree support</li>
40
- <li>Search function</li>
41
- <li>Supports plugins</li>
42
- <li>Optional state saving using cookies</li>
43
- <li>RTL support</li>
44
- <li>Optional sorting / unique management</li>
45
- </ul>
46
- <p>As of version 1.0 jsTree is extremely plugin friendly, so all functionality is now wrapped in plugins, which take care of various aspects of the tree and can be removed without affecting the functionality of other plugins. Below you will find a list of plugins - each with its own documentation page. Probably a good place to start is the <a href="core.html">core</a>.</p>
47
- </div>
48
-
49
- <h2 id="plugins">Plugins</h2>
50
- <div class="panel">
51
- <ul class="columns plugins">
52
- <li style="float:none; width:660px;"><a href="core.html" style="font-weight:bold;">Core functionality</a><p>all core functions for manipulating the tree + basic examples of including, configuring and working with the tree, along with demos of the new event system</p></li>
53
- <li><a href="html_data.html">HTML_DATA plugin</a><p>enables jsTree to convert nested unordered lists to interactive trees, an already existing UL may be used or data could be retrieved from a server</p></li>
54
- <li><a href="json_data.html">JSON_DATA plugin</a><p>enables jsTree to convert JSON objects to interactive trees, data can be set up in the config or retrieved from a server</p></li>
55
- <li><a href="xml_data.html">XML_DATA plugin</a><p>enables jsTree to convert XML objects to interactive trees (using XSL), data can be set up in the config or retrieved from a server</p></li>
56
- <li><a href="themes.html">Themes plugin</a><p>controls the looks of jstree - without this plugin you will get a functional tree, but it will look just like an ordinary UL list</p></li>
57
- <li><a href="ui.html">UI plugin</a><p>handles selecting, deselecting and hovering tree items</p></li>
58
- <li><a href="crrm.html">CRRM plugin</a><p>handles creating, renaming, removing and moving nodes by the user, also includes cut/copy/paste functions</p></li>
59
- <li><a href="hotkeys.html">Hotkeys plugin</a><p>enables support for keyboard navigation &amp; shortcuts, highly configurable</p></li>
60
- <li><a href="languages.html">Languages plugin</a><p>enables multilanguage support - each node can have multiple titles, but only one is visible</p></li>
61
- <li><a href="cookies.html">Cookies plugin</a><p>enables jstree to save the state of the tree across sessions, by saving selected and opened nodes in a cookie</p></li>
62
- <li><a href="sort.html">Sort plugin</a><p>enables jstree to automatically sort all nodes<br />using a specified function</p></li>
63
- <li><a href="dnd.html">DND plugin</a><p>enables drag'n'drop support for jstree, also using foreign nodes and drop targets</p></li>
64
- <li><a href="checkbox.html">Checkbox plugin</a><p>makes multiselection possible using three-state checkboxes</p></li>
65
- <li><a href="search.html">Search plugin</a><p>enables searching for nodes whose title contains a given string, works on async trees too</p></li>
66
- <li><a href="contextmenu.html">Contextmenu plugin</a><p>enables a multilevel context menu on tree items</p></li>
67
- <li><a href="types.html">Types plugin</a><p>each node can have a type, and you can define rules on how that type should behave</p></li>
68
- <li><a href="themeroller.html">Themeroller plugin</a><p>adds support for jQuery UI's themes</p></li>
69
- <li><a href="unique.html">Unique plugin</a><p>adds unique checking to jsTree</p></li>
70
- </ul>
71
- </div>
72
-
73
- </div>
74
- </body>
75
- </html>
@@ -1,240 +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 - json_data 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 - json_data plugin</h1>
21
- <h2>Description</h2>
22
- <div id="description">
23
- <p>The <code>json_data</code> plugin enables jsTree to convert JSON objects to interactive trees. The data (JSON) can be set up in the config or retrieved from a server (also ondemand). Version 1.0 also introduces the experimental progressive render feature, which is suitable for large heavy trees, when the DOM would be too heavy to manipulate.</p>
24
- <p>The basic structure you need to follow when supplying data in the JSON format is:</p>
25
- <div class="code_f">
26
- <pre class="brush:js;">
27
- {
28
- data : "node_title",
29
- // omit `attr` if not needed; the `attr` object gets passed to the jQuery `attr` function
30
- attr : { id : "node_identificator", some-other-attribute : "attribute_value" },
31
- // `state` and `children` are only used for NON-leaf nodes
32
- state: "closed", // or "open", defaults to "closed"
33
- children: [ /* an array of child nodes objects */ ]
34
- }
35
- </pre>
36
- </div>
37
- <p>The attr object will appear as attributes on the resulting <code>li</code> node.</p>
38
- <p>You may need to pass some attributes to the <code>a</code> node, or set some metadata, or use language versions (for the <a href="languages.html">languages plugin</a>):</p>
39
- <div class="code_f">
40
- <pre class="brush:js;">
41
- {
42
- // `data` can also be an object
43
- data : {
44
- title : "The node title",
45
- // omit when not needed
46
- attr : {},
47
- // if `icon` contains a slash <code>/</code> it is treated as a file, used for background
48
- // otherwise - it is added as a class to the &lt;ins&gt; node
49
- icon : "folder"
50
- },
51
-
52
- // the `metadata` property will be saved using the jQuery `data` function on the `li` node
53
- metadata : "a string, array, object, etc",
54
-
55
- // if you use the language plugin - just set this property
56
- // also make sure that `data` is an array of objects
57
- language : "en" // any code you are using
58
- }
59
- </pre>
60
- </div>
61
- <p>As seen in the first example below - you can also use a simple string to define a node (Child 1 &amp; Child 2).</p>
62
- </div>
63
-
64
- <h2 id="configuration">Configuration</h2>
65
- <div class="panel configuration">
66
- <h3>data</h3>
67
- <p class="meta">A JSON object (or <code>false</code> if not used). Default is <code>false</code>.</p>
68
- <p>Specifies the content to load into the container and convert to a tree.</p>
69
- <h3>ajax</h3>
70
- <p class="meta">An object (or <code>false</code> if not used). Default is <code>false</code>.</p>
71
- <p>The ajax config object is pretty much the same as the <a href="http://api.jquery.com/jQuery.ajax/">jQuery ajax settings object</a>.</p>
72
- <p>You can set the <code>data</code> option to a function, that will be executed in the current tree's scope (<code>this</code> will be the tree instance) and gets the node about to be open as a paramater (or <code>-1</code> for initial load). Whatever you return in the <code>data</code> function will be sent to the server as data (so for example you can send the node's ID).</p>
73
- <p>You can set the <code>url</code> option to a function, that will be executed in the current tree's scope (<code>this</code> will be the tree instance) and gets the node about to be open as a paramater (or <code>-1</code> for initial load). Whatever you return in the <code>url</code> function will be used as the ajax URL (so that you can accomodate pretty paths such as /get_children/node_2).</p>
74
- <p>The <code>error</code> and <code>success</code> functions (if present) also fire in the context of the tree, and if you return a value in the <code>success</code> function it will be used to populate the tree - this can be useful if you want to somehow change what the server returned on the client side before it is displayed in the tree (for example some .NET json implementations require this to work: <code>"success" : function (data) { return data.d; }</code>.</p>
75
- <h3>correct_state</h3>
76
- <p class="meta">A Boolean. Default is <code>true</code>.</p>
77
- <p>If this option is set to <code>true</code> if an AJAX returns an empty result, the node that was about to be opened will be converted to a leaf node (the open icon will no longer be displayed).</p>
78
- <h3>progressive_render</h3>
79
- <p class="meta">A Boolean. Default is <code>false</code>.</p>
80
- <p>If this option is set to <code>true</code> only the visible (open nodes) parts of the returned JSON are converted to DOM nodes, any hidden parts are saved away and parsed ondemand (when a node becomes visible). This is useful when you have a large nested tree which would result in a heavy DOM.</p>
81
-
82
- <p class="note"><strong>NOTE:</strong><br />If both <code>data</code> and <code>ajax</code> are set the initial tree is rendered from the <code>data</code> string. When opening a closed node (that has no loaded children) an AJAX request is made.</p>
83
- </div>
84
-
85
- <h2 id="demos">Demos</h2>
86
- <div class="panel">
87
-
88
- <h3>Using the data config option</h3>
89
- <div id="demo1" class="demo"></div>
90
- <script type="text/javascript" class="source">
91
- $(function () {
92
- $("#demo1").jstree({
93
- "json_data" : {
94
- "data" : [
95
- {
96
- "data" : "A node",
97
- "children" : [ "Child 1", "Child 2" ]
98
- },
99
- {
100
- "attr" : { "id" : "li.node.id" },
101
- "data" : {
102
- "title" : "Long format demo",
103
- "attr" : { "href" : "#" }
104
- }
105
- }
106
- ]
107
- },
108
- "plugins" : [ "themes", "json_data" ]
109
- });
110
- });
111
- </script>
112
-
113
- <h3>Using the ajax config option</h3>
114
- <div id="demo2" class="demo"></div>
115
- <script type="text/javascript" class="source">
116
- $(function () {
117
- $("#demo2").jstree({
118
- "json_data" : {
119
- "ajax" : {
120
- "url" : "_json_data.json",
121
- "data" : function (n) {
122
- return { id : n.attr ? n.attr("id") : 0 };
123
- }
124
- }
125
- },
126
- "plugins" : [ "themes", "json_data" ]
127
- });
128
- });
129
- </script>
130
-
131
- <h3>Using the progressive render config option</h3>
132
- <div id="demo3" class="demo"></div>
133
- <script type="text/javascript" class="source">
134
- $(function () {
135
- $("#demo3").jstree({
136
- "json_data" : {
137
- "data" : [
138
- {
139
- "data" : "A node",
140
- "children" : [ "Child 1", "Child 2" ]
141
- },
142
- {
143
- "attr" : { "id" : "li.node.id" },
144
- "data" : {
145
- "title" : "Long format demo",
146
- "attr" : { "href" : "#" }
147
- }
148
- }
149
- ],
150
- "progressive_render" : true
151
- },
152
- "plugins" : [ "themes", "json_data" ]
153
- });
154
- });
155
- </script>
156
-
157
- <h3>Using both the data &amp; ajax config options</h3>
158
- <div id="demo4" class="demo"></div>
159
- <script type="text/javascript" class="source">
160
- $(function () {
161
- $("#demo4").jstree({
162
- "json_data" : {
163
- "data" : [
164
- {
165
- "data" : "A node",
166
- "state" : "closed"
167
- },
168
- {
169
- "attr" : { "id" : "li.node.id" },
170
- "data" : {
171
- "title" : "Long format demo",
172
- "attr" : { "href" : "#" }
173
- }
174
- }
175
- ],
176
- "ajax" : { "url" : "_json_data.json" }
177
- },
178
- "plugins" : [ "themes", "json_data" ]
179
- });
180
- });
181
- </script>
182
- </div>
183
-
184
- <h2 id="api">API</h2>
185
- <div class="panel api">
186
- <p>Both dummy functions - <code>_is_loaded</code> and <code>load_node</code> are overwritten.</p>
187
- <h3 id="load_node_json">.load_node_json ( node , success_callback , error_callback )</h3>
188
- <p>This function is called instead of <code>load_node</code>.</p>
189
- <ul class="arguments">
190
- <li>
191
- <code class="tp">mixed</code> <strong>node</strong>
192
- <p>This can be a DOM node, jQuery node or selector pointing to an element you want loaded. Use <code>-1</code> for root nodes.</p>
193
- </li>
194
- <li>
195
- <code class="tp">function</code> <strong>success_callback</strong>
196
- <p>A function to be executed once the node is loaded successfully - used internally. You should wait for the <code>load_node</code> event.</p>
197
- </li>
198
- <li>
199
- <code class="tp">function</code> <strong>error_callback</strong>
200
- <p>A function to be executed if the node is not loaded due to an error - used internally. You should wait for the <code>load_node</code> event.</p>
201
- </li>
202
- </ul>
203
- <h3 id="_parse_json">._parse_json ( data , is_callback )</h3>
204
- <p>This function converts JSON nodes to the DOM structure required by jstree. Returns a jQuery object.</p>
205
- <ul class="arguments">
206
- <li>
207
- <code class="tp">mixed</code> <strong>node</strong>
208
- <p>This can be a tree node in the JSON format described above, or an array of such JSON nodes, may also be a string.</p>
209
- </li>
210
- <li>
211
- <code class="tp">bool</code> <strong>is_callback</strong>
212
- <p>Specifies if the function is called recursively - used ONLY internally.</p>
213
- </li>
214
- </ul>
215
- <h3 id="get_json">.get_json ( node , li_attr , a_attr )</h3>
216
- <p>This function returns an array of tree nodes converted back to JSON.</p>
217
- <ul class="arguments">
218
- <li>
219
- <code class="tp">mixed</code> <strong>node</strong>
220
- <p>This can be a DOM node, jQuery node or selector pointing to an element you want returned. Use <code>-1</code> or omit to get the whole tree.</p>
221
- </li>
222
- <li>
223
- <code class="tp">array</code> <strong>li_attr</strong>
224
- <p>The attributes to collect from the <code>LI</code> node. Defaults to <code>[ "id" , "class" ]</p>
225
- </li>
226
- <li>
227
- <code class="tp">array</code> <strong>a_attr</strong>
228
- <p>The attributes to collect from the <code>A</code> node. Defaults to <code>[ ]</p>
229
- </li>
230
- <li>
231
- <code class="tp">boolean</code> <strong>is_callback</strong>
232
- <p>Used internally.</p>
233
- </li>
234
- </ul>
235
-
236
- </div>
237
-
238
- </div>
239
- </body>
240
- </html>
@@ -1,138 +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 - languages 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 - languages plugin</h1>
21
- <h2>Description</h2>
22
- <div id="description">
23
- <p>The <code>languages</code> plugin enables multilanguage trees. This means that each node has a specified number of titles - each in a different "language". Only one language set is visible at any given time. This is useful for maintaining the same structure in many languages (hence the name of the plugin)</p>
24
- </div>
25
-
26
- <h2 id="configuration">Configuration</h2>
27
- <div class="panel configuration">
28
- <p>Expects an array of language codes. Each of the items is used as a CSS class name, so make sure you specify only valid CSS class name strings. The first langauge will be visible onload. For example:</p>
29
- <p><code>[ "en", "de", "bg" ]</code></p>
30
- </div>
31
-
32
- <h2 id="demos">Demos</h2>
33
- <div class="panel">
34
- <p>Check your data plugin documentation (<a href="html_data.html">html_data</a>, <a href="xml_data.html">xml_data</a>, <a href="json_data.html">json_data</a>) or take a close look at these examples for information on how to specify multilanguage nodes.</p>
35
-
36
- <h3>Using the languages plugin with HTML data</h3>
37
- <input type="button" class="button" value="en" id="en_1" style="float:left;" />
38
- <input type="button" class="button" value="bg" id="bg_1" style="float:left;" />
39
- <input type="button" class="button" value="rename_1" id="rename_1" style="float:left;" />
40
- <input type="button" class="button" value="rename_2" id="rename_2" style="" />
41
- <div id="demo1" class="demo">
42
- <ul>
43
- <li id="phtml_1">
44
- <a href="#" class="en">Root node 1</a>
45
- <a href="#" class="bg">Корен 1</a>
46
- <ul>
47
- <li id="phtml_2">
48
- <a href="#" class="en">Child node 1</a>
49
- <a href="#" class="bg">Дете 1</a>
50
- </li>
51
- <li id="phtml_3">
52
- <a href="#" class="en">Child node 2</a>
53
- <a href="#" class="bg">Дете 2</a>
54
- </li>
55
- </ul>
56
- </li>
57
- <li id="phtml_4">
58
- <a href="#" class="en">Root node 2</a>
59
- <a href="#" class="bg">Корен 2</a>
60
- </li>
61
- </ul>
62
- </div>
63
- <script type="text/javascript" class="source">
64
- $(function () {
65
- $("#en_1, #bg_1").click(function () {
66
- $("#demo1").jstree("set_lang", this.value);
67
- });
68
- $("#rename_1").click(function () {
69
- $("#demo1").jstree("rename_node", "#phtml_1", "Rename visible lang");
70
- });
71
- $("#rename_2").click(function () {
72
- $("#demo1").jstree("rename_node", "#phtml_1", "Rename `bg`", "bg");
73
- });
74
- $("#demo1").jstree({
75
- "languages" : [ "en", "bg" ],
76
- "plugins" : [ "themes", "html_data", "languages"]
77
- });
78
- });
79
- </script>
80
-
81
- </div>
82
-
83
- <h2 id="api">API</h2>
84
- <div class="panel api">
85
-
86
- <h3 id="set_lang">.set_lang ( lang )</h3>
87
- <p>Set the tree's visible language. Triggers an event.</p>
88
- <ul class="arguments">
89
- <li>
90
- <code class="tp">string <br />number</code> <strong>lang</strong>
91
- <p>Either the language code string (as specified in the config) or an index from the config array.</p>
92
- </li>
93
- </ul>
94
- <h3 id="get_lang">.get_lang ( )</h3>
95
- <p>Returns the name of the currently visible language.</p>
96
-
97
- <h3 id="get_text">.get_text ( node , lang )</h3>
98
- <p>Returns the title of a node. Overwrites the <a href="core.html#get_text">get_text function</a> from the core.</p>
99
- <ul class="arguments">
100
- <li>
101
- <code class="tp">mixed</code> <strong>node</strong>
102
- <p>This can be a DOM node, jQuery node or selector pointing to the element whose title you need.</p>
103
- </li>
104
- <li>
105
- <code class="tp">string</code> <strong>lang</strong>
106
- <p>The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.</p>
107
- </li>
108
- </ul>
109
-
110
- <h3 id="set_text">.set_text ( node , text , lang )</h3>
111
- <p>Sets the title of a node. Overwrites the <a href="core.html#set_text">set_text function</a> from the core. This is used internally - you should use <a href="core.html#rename_node">rename_node</a>. Since <code>rename_node</code> uses <code>set_text</code> internally you can pass a language string as a third parameter to rename_node.</p>
112
- <ul class="arguments">
113
- <li>
114
- <code class="tp">mixed</code> <strong>node</strong>
115
- <p>This can be a DOM node, jQuery node or selector pointing to the element whose title you want to change.</p>
116
- </li>
117
- <li>
118
- <code class="tp">string</code> <strong>text</strong>
119
- <p>The new title.</p>
120
- </li>
121
- <li>
122
- <code class="tp">string</code> <strong>lang</strong>
123
- <p>The language code string (as specified in the config) to get the title in. If you omit this - the currently visible language is used.</p>
124
- </li>
125
- </ul>
126
-
127
- <h3 id="_load_css">._load_css ( )</h3>
128
- <p>used only internally to include the CSS necessary for the plugin onload.</p>
129
-
130
- <h3 id="create_node">.create_node ( obj , position , js , callback )</h3>
131
- <p>Overwrites the <a href="core.html#create_node">create_node</a> function from the core. To create a node with a few titles use an array for the <code>data</code> property of the <code>js</code> parameter:</p>
132
- <p><code>{ "data" : [ { "title" : "EN title", language : "en" }, { "title" : "BG заглавие", language : "bg" } ] }</code></p>
133
-
134
- </div>
135
-
136
- </div>
137
- </body>
138
- </html>