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,262 +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 - full featured demo</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
- <style type="text/css">
14
- html, body { margin:0; padding:0; }
15
- body, td, th, pre, code, select, option, input, textarea { font-family:verdana,arial,sans-serif; font-size:10px; }
16
- .demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; }
17
- #container { width:780px; margin:10px auto; overflow:hidden; position:relative; }
18
- #demo { width:auto; height:400px; overflow:auto; border:1px solid gray; }
19
-
20
- #text { margin-top:1px; }
21
-
22
- #alog { font-size:9px !important; margin:5px; border:1px solid silver; }
23
- </style>
24
- </head>
25
- <body>
26
- <div id="container">
27
-
28
- <div id="mmenu" style="height:30px; overflow:auto;">
29
- <input type="button" id="add_folder" value="add folder" style="display:block; float:left;"/>
30
- <input type="button" id="add_default" value="add file" style="display:block; float:left;"/>
31
- <input type="button" id="rename" value="rename" style="display:block; float:left;"/>
32
- <input type="button" id="remove" value="remove" style="display:block; float:left;"/>
33
- <input type="button" id="cut" value="cut" style="display:block; float:left;"/>
34
- <input type="button" id="copy" value="copy" style="display:block; float:left;"/>
35
- <input type="button" id="paste" value="paste" style="display:block; float:left;"/>
36
- <input type="button" id="clear_search" value="clear" style="display:block; float:right;"/>
37
- <input type="button" id="search" value="search" style="display:block; float:right;"/>
38
- <input type="text" id="text" value="" style="display:block; float:right;" />
39
- </div>
40
-
41
- <!-- the tree container (notice NOT an UL node) -->
42
- <div id="demo" class="demo"></div>
43
- <!-- JavaScript neccessary for the tree -->
44
- <script type="text/javascript">
45
- $(function () {
46
- // Settings up the tree - using $(selector).jstree(options);
47
- // All those configuration options are documented in the _docs folder
48
- $("#demo")
49
- .jstree({
50
- // the list of plugins to include
51
- "plugins" : [ "themes", "json_data", "ui", "crrm", "cookies", "dnd", "search", "types", "hotkeys", "contextmenu" ],
52
- // Plugin configuration
53
-
54
- // I usually configure the plugin that handles the data first - in this case JSON as it is most common
55
- "json_data" : {
56
- // I chose an ajax enabled tree - again - as this is most common, and maybe a bit more complex
57
- // All the options are the same as jQuery's except for `data` which CAN (not should) be a function
58
- "ajax" : {
59
- // the URL to fetch the data
60
- "url" : "./server.php",
61
- // this function is executed in the instance's scope (this refers to the tree instance)
62
- // the parameter is the node being loaded (may be -1, 0, or undefined when loading the root nodes)
63
- "data" : function (n) {
64
- // the result is fed to the AJAX request `data` option
65
- return {
66
- "operation" : "get_children",
67
- "id" : n.attr ? n.attr("id").replace("node_","") : 1
68
- };
69
- }
70
- }
71
- },
72
- // Configuring the search plugin
73
- "search" : {
74
- // As this has been a common question - async search
75
- // Same as above - the `ajax` config option is actually jQuery's object (only `data` can be a function)
76
- "ajax" : {
77
- "url" : "./server.php",
78
- // You get the search string as a parameter
79
- "data" : function (str) {
80
- return {
81
- "operation" : "search",
82
- "search_str" : str
83
- };
84
- }
85
- }
86
- },
87
- // Using types - most of the time this is an overkill
88
- // Still meny people use them - here is how
89
- "types" : {
90
- // I set both options to -2, as I do not need depth and children count checking
91
- // Those two checks may slow jstree a lot, so use only when needed
92
- "max_depth" : -2,
93
- "max_children" : -2,
94
- // I want only `drive` nodes to be root nodes
95
- // This will prevent moving or creating any other type as a root node
96
- "valid_children" : [ "drive" ],
97
- "types" : {
98
- // The default type
99
- "default" : {
100
- // I want this type to have no children (so only leaf nodes)
101
- // In my case - those are files
102
- "valid_children" : "none",
103
- // If we specify an icon for the default type it WILL OVERRIDE the theme icons
104
- "icon" : {
105
- "image" : "./file.png"
106
- }
107
- },
108
- // The `folder` type
109
- "folder" : {
110
- // can have files and other folders inside of it, but NOT `drive` nodes
111
- "valid_children" : [ "default", "folder" ],
112
- "icon" : {
113
- "image" : "./folder.png"
114
- }
115
- },
116
- // The `drive` nodes
117
- "drive" : {
118
- // can have files and folders inside, but NOT other `drive` nodes
119
- "valid_children" : [ "default", "folder" ],
120
- "icon" : {
121
- "image" : "./root.png"
122
- },
123
- // those options prevent the functions with the same name to be used on the `drive` type nodes
124
- // internally the `before` event is used
125
- "start_drag" : false,
126
- "move_node" : false,
127
- "delete_node" : false,
128
- "remove" : false
129
- }
130
- }
131
- },
132
- // For UI & core - the nodes to initially select and open will be overwritten by the cookie plugin
133
-
134
- // the UI plugin - it handles selecting/deselecting/hovering nodes
135
- "ui" : {
136
- // this makes the node with ID node_4 selected onload
137
- "initially_select" : [ "node_4" ]
138
- },
139
- // the core plugin - not many options here
140
- "core" : {
141
- // just open those two nodes up
142
- // as this is an AJAX enabled tree, both will be downloaded from the server
143
- "initially_open" : [ "node_2" , "node_3" ]
144
- }
145
- })
146
- .bind("create.jstree", function (e, data) {
147
- $.post(
148
- "./server.php",
149
- {
150
- "operation" : "create_node",
151
- "id" : data.rslt.parent.attr("id").replace("node_",""),
152
- "position" : data.rslt.position,
153
- "title" : data.rslt.name,
154
- "type" : data.rslt.obj.attr("rel")
155
- },
156
- function (r) {
157
- if(r.status) {
158
- $(data.rslt.obj).attr("id", "node_" + r.id);
159
- }
160
- else {
161
- $.jstree.rollback(data.rlbk);
162
- }
163
- }
164
- );
165
- })
166
- .bind("remove.jstree", function (e, data) {
167
- data.rslt.obj.each(function () {
168
- $.ajax({
169
- async : false,
170
- type: 'POST',
171
- url: "./server.php",
172
- data : {
173
- "operation" : "remove_node",
174
- "id" : this.id.replace("node_","")
175
- },
176
- success : function (r) {
177
- if(!r.status) {
178
- data.inst.refresh();
179
- }
180
- }
181
- });
182
- });
183
- })
184
- .bind("rename.jstree", function (e, data) {
185
- $.post(
186
- "./server.php",
187
- {
188
- "operation" : "rename_node",
189
- "id" : data.rslt.obj.attr("id").replace("node_",""),
190
- "title" : data.rslt.new_name
191
- },
192
- function (r) {
193
- if(!r.status) {
194
- $.jstree.rollback(data.rlbk);
195
- }
196
- }
197
- );
198
- })
199
- .bind("move_node.jstree", function (e, data) {
200
- data.rslt.o.each(function (i) {
201
- $.ajax({
202
- async : false,
203
- type: 'POST',
204
- url: "./server.php",
205
- data : {
206
- "operation" : "move_node",
207
- "id" : $(this).attr("id").replace("node_",""),
208
- "ref" : data.rslt.np.attr("id").replace("node_",""),
209
- "position" : data.rslt.cp + i,
210
- "title" : data.rslt.name,
211
- "copy" : data.rslt.cy ? 1 : 0
212
- },
213
- success : function (r) {
214
- if(!r.status) {
215
- $.jstree.rollback(data.rlbk);
216
- }
217
- else {
218
- $(data.rslt.oc).attr("id", "node_" + r.id);
219
- if(data.rslt.cy && $(data.rslt.oc).children("UL").length) {
220
- data.inst.refresh(data.inst._get_parent(data.rslt.oc));
221
- }
222
- }
223
- $("#analyze").click();
224
- }
225
- });
226
- });
227
- });
228
- });
229
- </script>
230
- <script type="text/javascript">
231
- $(function () {
232
- $("#mmenu input").click(function () {
233
- switch(this.id) {
234
- case "add_default":
235
- case "add_folder":
236
- $("#demo").jstree("create", null, "last", { "attr" : { "rel" : this.id.toString().replace("add_", "") } });
237
- break;
238
- case "search":
239
- $("#demo").jstree("search", document.getElementById("text").value);
240
- break;
241
- case "text": break;
242
- default:
243
- $("#demo").jstree(this.id);
244
- break;
245
- }
246
- });
247
- });
248
- </script>
249
-
250
- <div style="position:absolute; right:30px; top:120px; width:220px; border:1px solid silver; min-height:160px;">
251
- <input type="button" style='display:block; width:170px; height:24px; margin:5px auto;' value="reconstruct" onclick="$.get('./server.php?reconstruct', function () { $('#demo').jstree('refresh',-1); });" />
252
- <input type="button" style='display:block; width:170px; height:24px; margin:5px auto;' id="analyze" value="analyze" onclick="$('#alog').load('./server.php?analyze');" />
253
- <input type="button" style='display:block; width:170px; height:24px; margin:5px auto;' value="refresh" onclick="$('#demo').jstree('refresh',-1);" />
254
- <div id='alog'></div>
255
- </div>
256
-
257
- <p style="margin:1em 2em 3em 2em; text-align:center; ">If you like the project - consider <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=paypal@vakata.com&currency_code=USD&amount=&return=http://jstree.com/donation&item_name=Buy+me+a+coffee+for+jsTree">supporting jstree</a>.</p>
258
-
259
- </div>
260
-
261
- </body>
262
- </html>
@@ -1,69 +0,0 @@
1
- <?php
2
- require_once("config.php");
3
- $jstree = new json_tree();
4
-
5
- //$jstree->_create_default();
6
- //die();
7
-
8
- if(isset($_GET["reconstruct"])) {
9
- $jstree->_reconstruct();
10
- die();
11
- }
12
- if(isset($_GET["analyze"])) {
13
- echo $jstree->_analyze();
14
- die();
15
- }
16
-
17
- if($_REQUEST["operation"] && strpos("_", $_REQUEST["operation"]) !== 0 && method_exists($jstree, $_REQUEST["operation"])) {
18
- header("HTTP/1.0 200 OK");
19
- header('Content-type: text/json; charset=utf-8');
20
- header("Cache-Control: no-cache, must-revalidate");
21
- header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
22
- header("Pragma: no-cache");
23
- echo $jstree->{$_REQUEST["operation"]}($_REQUEST);
24
- die();
25
- }
26
- header("HTTP/1.0 404 Not Found");
27
- ?>
28
-
29
- <?php
30
- /*
31
- $jstree->_drop();
32
- $jstree->create_node(array("id"=>0,"position"=>0));
33
- $jstree->create_node(array("id"=>1,"position"=>0));
34
- $jstree->create_node(array("id"=>1,"position"=>0));
35
- $jstree->create_node(array("id"=>3,"position"=>0,"name"=>"Pesho"));
36
- $jstree->move(3,2,0,true);
37
- $jstree->_dump(true);
38
- $jstree->_reconstruct();
39
- echo $jstree->_analyze();
40
- die();
41
-
42
- $tree = new _tree_struct;
43
- $tree->drop();
44
- $tree->create(0, 0);
45
- $tree->create(0, 0);
46
- $tree->create(1, 0);
47
- $tree->create(0, 3);
48
- $tree->create(2, 3);
49
- $tree->create(2, 0);
50
- $tree->dump(true);
51
- $tree->move(6,4,0);
52
- $tree->move(1,0,0);
53
- $tree->move(3,2,99,true);
54
- $tree->move(7,1,0,true);
55
- $tree->move(1,7,0);
56
- $tree->move(1,0,1,true);
57
- $tree->move(2, 0, 0, true);
58
- $tree->move(13, 12, 2, true);
59
- $tree->dump(true);
60
- $tree->move(15, 16, 2, true);
61
- $tree->dump(true);
62
- $tree->move(4, 0, 0);
63
- $tree->dump(true);
64
- $tree->move(4, 0, 2);
65
- $tree->dump(true);
66
- echo $tree->analyze();
67
- $tree->drop();
68
- */
69
- ?>
@@ -1,37 +0,0 @@
1
- html, body { margin:0; padding:0; }
2
- body, td, th, pre, code, select, option, input, textarea { font-family:"lucida grande",tahoma,verdana,arial,sans-serif; font-size:10pt; }
3
- h1 { margin:0; padding:0.2em 0 0.5em 0; font-size:14pt; font-family:Georgia; /*text-shadow:1px 1px 2px gray;*/ border-bottom:2px solid; margin-bottom:0.5em; text-align:center; }
4
- h2 { margin:0.5em 0 0.5em 0; padding:0.5em 0 0.5em 20px; font-size:12pt; font-family:Georgia; color:white; background:silver; text-shadow:1px 1px 2px gray; clear:both; -moz-border-radius:5px; }
5
- h3 { margin:0; padding:0.5em 0 0.5em 0; font-size:11.5pt; font-family:Georgia; color:gray; clear:both; }
6
- p { padding:0em 0 0.5em 0; margin:0; line-height:1.8em; }
7
- p.meta { font-size:9pt; color:gray; margin-top:-5px; }
8
- .arguments .tp, p code { color:green; padding:0 4px; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size:13px; }
9
- #description, .panel { margin:0 20px; }
10
- #container { width:800px; margin:10px auto; overflow:hidden; }
11
- .demo { width:255px; float:left; margin:0; border:1px solid gray; background:white; overflow:auto; }
12
- .code { width:490px; float:right; margin:0 0 10px 0; border:1px solid gray; font-size:12px; }
13
- pre { display:block; }
14
- .code_f { border:1px solid gray; margin-bottom:1em; }
15
- .syntaxhighlighter { margin:0 0 0 0 !important; padding:0 !important; line-height:18px; }
16
-
17
- .log { padding:4px; border:1px solid gray; margin-bottom:1em; }
18
- .button { display:block; margin-bottom:0.5em; }
19
- .arguments { margin:0em 1em; padding:0; list-style-type:none; }
20
- .arguments .tp { padding:0 0 0 0; float:left; width:70px; }
21
- .arguments strong { display:block; }
22
-
23
- .api h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; }
24
- .api .arguments li strong { color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:13px; }
25
-
26
- .configuration h3 { margin-left:-10px; color:black; font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-weight: normal !important; font-size:14px; margin-top:2em; border-top:1px solid; width:780px; }
27
- .note { background:#ffffee; padding:10px 20px; border:1px solid #333; -moz-border-radius:5px; border-radius:5px; -webkit-border-radius:5px; margin-bottom:15px; text-align:center; font-weight:bold; }
28
-
29
- ul.columns { list-style-type:none; width:700px; margin:5px auto 15px auto; padding:0; overflow:hidden; }
30
- ul.columns li { float:left; margin:0; padding:0 0 0 0px; line-height:18px; width:345px; }
31
- ul.plugins li { width:220px; text-align:left; padding:5px 0; }
32
- ul.plugins li a { text-decoration:none; color:#3B5998; }
33
- ul.plugins li a:hover { text-decoration:underline; }
34
- ul.plugins li p { text-align:left; font-size:9px; color:#333; margin:0 5px 0 0; }
35
-
36
- .demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; }
37
-
Binary file
@@ -1,2 +0,0 @@
1
- <li class="jstree-closed"><a href="#">Node 1</a></li>
2
- <li><a href="#">Node 2</a></li>
@@ -1,4 +0,0 @@
1
- [
2
- { "data" : "A node", "children" : [ { "data" : "Only child", "state" : "closed" } ], "state" : "open" },
3
- "Ajax node"
4
- ]
@@ -1,6 +0,0 @@
1
- [
2
- "Ajax node 1",
3
- "Ajax node 2",
4
- "TARGET",
5
- "Ajax node 4"
6
- ]
@@ -1 +0,0 @@
1
- [ "#root_node" ]
@@ -1,12 +0,0 @@
1
- <root>
2
- <item parent_id="0" id="node_1" state="closed">
3
- <content>
4
- <name><![CDATA[Node 1]]></name>
5
- </content>
6
- </item>
7
- <item parent_id="0" id="node_2">
8
- <content>
9
- <name><![CDATA[Node 2]]></name>
10
- </content>
11
- </item>
12
- </root>
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <root>
3
- <item id="pxml_1">
4
- <content><name><![CDATA[Root node 1]]></name></content>
5
- <item id="pxml_2">
6
- <content><name><![CDATA[Child node 1]]></name></content>
7
- </item>
8
- <item id="pxml_3">
9
- <content><name><![CDATA[Child node 2]]></name></content>
10
- </item>
11
- <item id="pxml_4">
12
- <content><name><![CDATA[Some other child node]]></name></content>
13
- </item>
14
- </item>
15
- <item id="pxml_5">
16
- <content><name ><![CDATA[Root node 2]]></name></content>
17
- </item>
18
- </root>
@@ -1,148 +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 - checkbox 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 - checkbox plugin</h1>
21
- <h2>Description</h2>
22
- <div id="description">
23
- <p>The <code>checkbox</code> plugin makes multiselection possible using three-state checkboxes.</p>
24
- </div>
25
-
26
- <h2 id="configuration">Configuration</h2>
27
- <div class="panel configuration">
28
- <p>No configuration possible</p>
29
- </div>
30
-
31
- <h2 id="demos">Demos</h2>
32
- <div class="panel">
33
- <h3>Using the checkbox plugin - all you need to do is include it in the list of active plugins.</h3>
34
- <div id="demo1" class="demo">
35
- <ul>
36
- <li id="phtml_1">
37
- <a href="#">Root node 1</a>
38
- <ul>
39
- <li id="phtml_2" class="jstree-checked">
40
- <a href="#">Child node 1</a>
41
- </li>
42
- <li id="phtml_3">
43
- <a href="#">Child node 2</a>
44
- </li>
45
- </ul>
46
- </li>
47
- <li id="phtml_4">
48
- <a href="#">Root node 2</a>
49
- </li>
50
- </ul>
51
- </div>
52
- <script type="text/javascript" class="source">
53
- $(function () {
54
- $("#demo1").jstree({
55
- "plugins" : [ "themes", "html_data", "checkbox" ]
56
- });
57
- });
58
- </script>
59
-
60
- </div>
61
-
62
- <h2 id="api">API</h2>
63
- <div class="panel api">
64
- <p>The checkbox plugin maps UI's <a href="ui.html#get_selected">get_selected function</a> to its own <a href="#get_checked">get_checked function</a> and overwrites the <a href="ui.html#reselect">UI reselect function</a>. It also disables the <code>select_node</code>, <code>deselect_node</code> and <code>deselect_all</code> functions.
65
-
66
- <h3 id="_prepare_checkboxes">._prepare_checkboxes ( node )</h3>
67
- <p>Inserts the checkbox icons on the node. Used internally.</p>
68
- <ul class="arguments">
69
- <li>
70
- <code class="tp">mixed</code> <strong>node</strong>
71
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
72
- </li>
73
- </ul>
74
-
75
- <h3 id="_repair_state">._repair_state ( node )</h3>
76
- <p>Repairs the checkbox state inside the node. Used internally.</p>
77
- <ul class="arguments">
78
- <li>
79
- <code class="tp">mixed</code> <strong>node</strong>
80
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
81
- </li>
82
- </ul>
83
-
84
- <h3 id="change_state">.change_state ( node , uncheck )</h3>
85
- <p>Changes the state of a node. Used mostly internally - you'd be better off using the <code>check_node</code> and <code>uncheck_node</code> functions. Triggers an event.</p>
86
- <ul class="arguments">
87
- <li>
88
- <code class="tp">mixed</code> <strong>node</strong>
89
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
90
- </li>
91
- <li>
92
- <code class="tp">boolean</code> <strong>uncheck</strong>
93
- <p>If set to <code>true</code> the node is unchecked, if set to <code>false</code> the node is checked, otherwise - the state is toggled.</p>
94
- </li>
95
- </ul>
96
-
97
- <h3 id="check_node">.check_node ( node )</h3>
98
- <p>Checks a node.</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 an element within the tree.</p>
103
- </li>
104
- </ul>
105
-
106
- <h3 id="uncheck_node">.uncheck_node ( node )</h3>
107
- <p>Unchecks a node.</p>
108
- <ul class="arguments">
109
- <li>
110
- <code class="tp">mixed</code> <strong>node</strong>
111
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
112
- </li>
113
- </ul>
114
-
115
- <h3 id="check_all">.check_all ( )</h3>
116
- <p>Checks all nodes.</p>
117
-
118
- <h3 id="uncheck_all">.uncheck_all ( )</h3>
119
- <p>Unchecks all nodes.</p>
120
-
121
- <h3 id="is_checked">.is_checked ( node )</h3>
122
- <p>Checks if a node is checked. Returns boolean.</p>
123
- <ul class="arguments">
124
- <li>
125
- <code class="tp">mixed</code> <strong>node</strong>
126
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree.</p>
127
- </li>
128
- </ul>
129
-
130
- <div style="height:1px; visibility:hidden; overflow:hidden;"><span id="get_unchecked">&#160;</span></div>
131
- <h3 id="get_checked">.get_checked ( context ), .get_unchecked ( context )</h3>
132
- <p>Both functions return jQuery collections.</p>
133
- <ul class="arguments">
134
- <li>
135
- <code class="tp">mixed</code> <strong>context</strong>
136
- <p>This can be a DOM node, jQuery node or selector pointing to an element within the tree. If specified only nodes inside the specified context are returned, otherwise the whole tree is searched.</p>
137
- </li>
138
- </ul>
139
-
140
- <div style="height:1px; visibility:hidden; overflow:hidden;"><span id="hide_checkboxes">&#160;</span></div>
141
- <h3 id="show_checkboxes">.show_checkboxes ( ), .get_unchecked ( )</h3>
142
- <p>Show or hide the checkbox icons.</p>
143
-
144
- </div>
145
-
146
- </div>
147
- </body>
148
- </html>