jquery_sortable_tree 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (328) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +22 -0
  3. data/README.md +319 -0
  4. data/Rakefile +36 -0
  5. data/app/assets/images/iconza/icons/add.png +0 -0
  6. data/app/assets/images/iconza/icons/delete.png +0 -0
  7. data/app/assets/images/iconza/icons/edit.png +0 -0
  8. data/app/assets/images/iconza/icons/move.png +0 -0
  9. data/app/assets/images/iconza/icons/red_add.png +0 -0
  10. data/app/assets/images/iconza/icons/red_delete.png +0 -0
  11. data/app/assets/images/iconza/icons/red_edit.png +0 -0
  12. data/app/assets/images/iconza/icons/red_move.png +0 -0
  13. data/app/assets/javascripts/expandable_tree/expandable_tree.js.coffee +104 -0
  14. data/app/assets/javascripts/expandable_tree/hashchange.js.coffee +33 -0
  15. data/app/assets/javascripts/expandable_tree/initializer.js +6 -0
  16. data/app/assets/javascripts/expandable_tree/jquery.cookie.coffee +68 -0
  17. data/app/assets/javascripts/expandable_tree/restorable.js.coffee +125 -0
  18. data/app/assets/javascripts/nested_sortable/inline_operations.js.coffee +56 -0
  19. data/app/assets/javascripts/nested_sortable/jquery.ui.nestedSortable.js +358 -0
  20. data/app/assets/javascripts/render_tree_helper.js.coffee +82 -0
  21. data/app/assets/javascripts/sortable_tree/initializer.js +3 -0
  22. data/app/assets/javascripts/sortable_tree/sortable_tree.js.coffee +60 -0
  23. data/app/assets/stylesheets/expandable_tree.css.scss +26 -0
  24. data/app/assets/stylesheets/nested_options.css.scss +25 -0
  25. data/app/assets/stylesheets/sortable_tree.css.scss +108 -0
  26. data/app/assets/stylesheets/tree.css.scss +35 -0
  27. data/app/controllers/jquery_sortable_tree_controller.rb +93 -0
  28. data/app/helpers/jquery_sortable_tree_helper/render_expandable_tree_helper.rb +27 -0
  29. data/app/helpers/jquery_sortable_tree_helper/render_indented_options_helper.rb +37 -0
  30. data/app/helpers/jquery_sortable_tree_helper/render_nested_options_helper.rb +29 -0
  31. data/app/helpers/jquery_sortable_tree_helper/render_sortable_tree_helper.rb +65 -0
  32. data/app/helpers/jquery_sortable_tree_helper/render_tree_helper.rb +23 -0
  33. data/app/helpers/jquery_sortable_tree_helper.rb +142 -0
  34. data/app/inputs/indented_collection_select_input.rb +12 -0
  35. data/lib/fake.example +44 -0
  36. data/lib/generators/jquery_sortable_tree/views_generator.rb +56 -0
  37. data/lib/jquery_sortable_tree/engine.rb +6 -0
  38. data/lib/jquery_sortable_tree/version.rb +3 -0
  39. data/lib/jquery_sortable_tree.rb +13 -0
  40. data/spec/dummy_app/Gemfile +38 -0
  41. data/spec/dummy_app/Gemfile.lock +206 -0
  42. data/spec/dummy_app/README.md +48 -0
  43. data/spec/dummy_app/Rakefile +7 -0
  44. data/spec/dummy_app/_test/fixtures/admin/pages.yml +7 -0
  45. data/spec/dummy_app/_test/fixtures/article_categories.yml +9 -0
  46. data/spec/dummy_app/_test/fixtures/comments.yml +13 -0
  47. data/spec/dummy_app/_test/fixtures/inventory/categories.yml +9 -0
  48. data/spec/dummy_app/_test/functional/inventory/category_controller_test.rb +14 -0
  49. data/spec/dummy_app/_test/performance/browsing_test.rb +12 -0
  50. data/spec/dummy_app/_test/test_helper.rb +13 -0
  51. data/spec/dummy_app/_test/unit/admin/page_test.rb +7 -0
  52. data/spec/dummy_app/_test/unit/article_category_test.rb +7 -0
  53. data/spec/dummy_app/_test/unit/comment_test.rb +7 -0
  54. data/spec/dummy_app/_test/unit/helpers/inventory/category_helper_test.rb +4 -0
  55. data/spec/dummy_app/_test/unit/inventory/category_test.rb +7 -0
  56. data/spec/dummy_app/app/assets/images/rails.png +0 -0
  57. data/spec/dummy_app/app/assets/javascripts/application.js +11 -0
  58. data/spec/dummy_app/app/assets/stylesheets/application.css +11 -0
  59. data/spec/dummy_app/app/controllers/admin/pages_controller.rb +35 -0
  60. data/spec/dummy_app/app/controllers/application_controller.rb +3 -0
  61. data/spec/dummy_app/app/controllers/article_categories_controller.rb +11 -0
  62. data/spec/dummy_app/app/controllers/inventory/categories_controller.rb +15 -0
  63. data/spec/dummy_app/app/controllers/pages_controller.rb +30 -0
  64. data/spec/dummy_app/app/controllers/welcome_controller.rb +3 -0
  65. data/spec/dummy_app/app/models/admin/page.rb +4 -0
  66. data/spec/dummy_app/app/models/admin.rb +5 -0
  67. data/spec/dummy_app/app/models/article_category.rb +4 -0
  68. data/spec/dummy_app/app/models/inventory/category.rb +4 -0
  69. data/spec/dummy_app/app/models/inventory.rb +5 -0
  70. data/spec/dummy_app/app/models/page.rb +4 -0
  71. data/spec/dummy_app/app/views/admin/pages/indented_options.html.haml +3 -0
  72. data/spec/dummy_app/app/views/admin/pages/index.html.haml +8 -0
  73. data/spec/dummy_app/app/views/admin/pages/manage.html.haml +3 -0
  74. data/spec/dummy_app/app/views/admin/pages/namespaced_link.html.haml +3 -0
  75. data/spec/dummy_app/app/views/admin/pages/nested_options.html.haml +3 -0
  76. data/spec/dummy_app/app/views/admin/pages/node_manage.html.haml +12 -0
  77. data/spec/dummy_app/app/views/article_categories/index.html.haml +3 -0
  78. data/spec/dummy_app/app/views/article_categories/manage.html.haml +4 -0
  79. data/spec/dummy_app/app/views/inventory/categories/index.html.haml +3 -0
  80. data/spec/dummy_app/app/views/inventory/categories/manage.html.haml +4 -0
  81. data/spec/dummy_app/app/views/layouts/application.html.erb +18 -0
  82. data/spec/dummy_app/app/views/pages/expand.html.haml +8 -0
  83. data/spec/dummy_app/app/views/pages/expand_node.html.haml +1 -0
  84. data/spec/dummy_app/app/views/pages/indented_options.html.haml +3 -0
  85. data/spec/dummy_app/app/views/pages/index.html.haml +3 -0
  86. data/spec/dummy_app/app/views/pages/manage.html.haml +7 -0
  87. data/spec/dummy_app/app/views/pages/nested_options.html.haml +3 -0
  88. data/spec/dummy_app/app/views/welcome/index.html.haml +42 -0
  89. data/spec/dummy_app/config/application.rb +48 -0
  90. data/spec/dummy_app/config/boot.rb +6 -0
  91. data/spec/dummy_app/config/database.yml +7 -0
  92. data/spec/dummy_app/config/database.yml.example +7 -0
  93. data/spec/dummy_app/config/environment.rb +5 -0
  94. data/spec/dummy_app/config/environments/development.rb +30 -0
  95. data/spec/dummy_app/config/environments/production.rb +61 -0
  96. data/spec/dummy_app/config/environments/test.rb +42 -0
  97. data/spec/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  98. data/spec/dummy_app/config/initializers/inflections.rb +10 -0
  99. data/spec/dummy_app/config/initializers/mime_types.rb +5 -0
  100. data/spec/dummy_app/config/initializers/secret_token.rb +7 -0
  101. data/spec/dummy_app/config/initializers/session_store.rb +8 -0
  102. data/spec/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  103. data/spec/dummy_app/config/locales/en.yml +28 -0
  104. data/spec/dummy_app/config/routes.rb +53 -0
  105. data/spec/dummy_app/config.ru +4 -0
  106. data/spec/dummy_app/db/development.db +0 -0
  107. data/spec/dummy_app/db/migrate/20120211053457_create_pages.rb +16 -0
  108. data/spec/dummy_app/db/migrate/20120503173258_create_article_categories.rb +16 -0
  109. data/spec/dummy_app/db/migrate/20120508093823_create_inventory_categories.rb +16 -0
  110. data/spec/dummy_app/db/migrate/20130128160328_create_admin_pages.rb +16 -0
  111. data/spec/dummy_app/db/schema.rb +64 -0
  112. data/spec/dummy_app/db/seeds.rb +97 -0
  113. data/spec/dummy_app/db/test.db +0 -0
  114. data/spec/dummy_app/doc/README_FOR_APP +2 -0
  115. data/spec/dummy_app/lib/tasks/db_bootstrap.rake +16 -0
  116. data/spec/dummy_app/log/development.log +22714 -0
  117. data/spec/dummy_app/public/404.html +26 -0
  118. data/spec/dummy_app/public/422.html +26 -0
  119. data/spec/dummy_app/public/500.html +26 -0
  120. data/spec/dummy_app/public/favicon.ico +0 -0
  121. data/spec/dummy_app/public/robots.txt +5 -0
  122. data/spec/dummy_app/script/rails +6 -0
  123. data/spec/dummy_app/spec/build_tree_helper.rb +39 -0
  124. data/spec/dummy_app/spec/spec_helper.rb +52 -0
  125. data/spec/dummy_app/spec/views/pages/index.html.haml_spec.rb +48 -0
  126. data/spec/dummy_app/tmp/cache/assets/development/sass/8ecb1409c36a90649b49ac975da6493b50db6d95/expandable_tree.css.scssc +0 -0
  127. data/spec/dummy_app/tmp/cache/assets/development/sass/8ecb1409c36a90649b49ac975da6493b50db6d95/nested_options.css.scssc +0 -0
  128. data/spec/dummy_app/tmp/cache/assets/development/sass/8ecb1409c36a90649b49ac975da6493b50db6d95/sortable_tree.css.scssc +0 -0
  129. data/spec/dummy_app/tmp/cache/assets/development/sass/8ecb1409c36a90649b49ac975da6493b50db6d95/tree.css.scssc +0 -0
  130. data/spec/dummy_app/tmp/cache/assets/development/sprockets/058d9080443081a540c61e79945ebf47 +0 -0
  131. data/spec/dummy_app/tmp/cache/assets/development/sprockets/06512a74da586fbbce22e1cd023f5f9b +0 -0
  132. data/spec/dummy_app/tmp/cache/assets/development/sprockets/06f9ffc86fda6ef4279cabf09f68e631 +0 -0
  133. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0702872e43cbcc4c2b6d097f7fe035e7 +0 -0
  134. data/spec/dummy_app/tmp/cache/assets/development/sprockets/07400ad691b6b3bbcf10ee74e64d72b7 +0 -0
  135. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0a382d7e102e254c52006bed6975001d +0 -0
  136. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0a8a33aec09977105c0190f6b8c2ca49 +0 -0
  137. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0b2e7c9a5645a67e6af72feeaa70b633 +0 -0
  138. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0c5e7aa7ad8e39ced2e25d911b060c3a +0 -0
  139. data/spec/dummy_app/tmp/cache/assets/development/sprockets/0fc4a5842f45f40d2e1283df0025ac7e +0 -0
  140. data/spec/dummy_app/tmp/cache/assets/development/sprockets/12eb4832c22cd32076db3d3eddcd941b +0 -0
  141. data/spec/dummy_app/tmp/cache/assets/development/sprockets/13d999d14a434a925372c43c3633f355 +0 -0
  142. data/spec/dummy_app/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  143. data/spec/dummy_app/tmp/cache/assets/development/sprockets/14805e3ed08782f4b821fe6cfd03d911 +0 -0
  144. data/spec/dummy_app/tmp/cache/assets/development/sprockets/15cc819db1fd73a5d6ccd95fba030668 +0 -0
  145. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1607bba44953c4434330d20d0cd747f4 +0 -0
  146. data/spec/dummy_app/tmp/cache/assets/development/sprockets/16b9e0f8dc1fdd8bea7b606f065d205d +0 -0
  147. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1a780b90bf4d532e88e6943e93f18320 +0 -0
  148. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1e445aefca5bc750ef4f584ec1dc0849 +0 -0
  149. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1e9c5d8fa6de36416732b4eb490ceb6f +0 -0
  150. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1ea633756c6cc95716a7887e44f88da7 +0 -0
  151. data/spec/dummy_app/tmp/cache/assets/development/sprockets/1ece2c45f188a29a36b208442154f8a2 +0 -0
  152. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2172c90088dc36adff9ec10b3384286e +0 -0
  153. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2489731b3ac988935fe92593f0f2edbf +0 -0
  154. data/spec/dummy_app/tmp/cache/assets/development/sprockets/27c712c397ece8a28de4ff2044a3f722 +0 -0
  155. data/spec/dummy_app/tmp/cache/assets/development/sprockets/28eefd9e9c7ea2e1414cd10a6d184ae5 +0 -0
  156. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2a013e71f11699ea897968c03d3f4355 +0 -0
  157. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2c4f283baa7b297e503fe2d75f959b06 +0 -0
  158. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2cf86cf22c1bd9a69271904cb4a1c131 +0 -0
  159. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  160. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2fa38257718e8b4641d97f10b43d1ac7 +0 -0
  161. data/spec/dummy_app/tmp/cache/assets/development/sprockets/2fd038eaf9bbdb2d1f4fe4afd3aeb654 +0 -0
  162. data/spec/dummy_app/tmp/cache/assets/development/sprockets/303d5268aec48d5bd29ea616e15ea1cd +0 -0
  163. data/spec/dummy_app/tmp/cache/assets/development/sprockets/309e5bc3a9891c7dfcb01887b7c973a5 +0 -0
  164. data/spec/dummy_app/tmp/cache/assets/development/sprockets/30f138394dc8bad04a7ad6c19f3ee922 +0 -0
  165. data/spec/dummy_app/tmp/cache/assets/development/sprockets/31036ef469da85883b40b6b4ee37e61e +0 -0
  166. data/spec/dummy_app/tmp/cache/assets/development/sprockets/31a9b7e7b828d0633af58b75c59273de +0 -0
  167. data/spec/dummy_app/tmp/cache/assets/development/sprockets/332ad2cb8debd7079dda31bd72d43806 +0 -0
  168. data/spec/dummy_app/tmp/cache/assets/development/sprockets/344185411a898184d8eaa3f96536e50f +0 -0
  169. data/spec/dummy_app/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  170. data/spec/dummy_app/tmp/cache/assets/development/sprockets/364e7109a425ab206d5f8881b5d37cfc +0 -0
  171. data/spec/dummy_app/tmp/cache/assets/development/sprockets/37dd73a179070963cb766a24703a58a1 +0 -0
  172. data/spec/dummy_app/tmp/cache/assets/development/sprockets/39c9026282a865c56fac8e234419eb61 +0 -0
  173. data/spec/dummy_app/tmp/cache/assets/development/sprockets/3a592f975983e33afd63283ecac1de80 +0 -0
  174. data/spec/dummy_app/tmp/cache/assets/development/sprockets/3a7a7c1950ba3ca0968d0c8ffc9b8635 +0 -0
  175. data/spec/dummy_app/tmp/cache/assets/development/sprockets/3ab09536f24f9fbe56a56a012bf266d7 +0 -0
  176. data/spec/dummy_app/tmp/cache/assets/development/sprockets/3b22caac59de2c2af20c0e8bf86cf015 +0 -0
  177. data/spec/dummy_app/tmp/cache/assets/development/sprockets/3dbf5c413607e86fa3ff1f931887217e +0 -0
  178. data/spec/dummy_app/tmp/cache/assets/development/sprockets/4063ac4ee22e83471de121940c9a9689 +0 -0
  179. data/spec/dummy_app/tmp/cache/assets/development/sprockets/425aa438199f939cf930519e27539355 +0 -0
  180. data/spec/dummy_app/tmp/cache/assets/development/sprockets/43485146d4435be69b94512f4871b48a +0 -0
  181. data/spec/dummy_app/tmp/cache/assets/development/sprockets/43c3c0bfd40d48fa470d6369b70c4ed5 +0 -0
  182. data/spec/dummy_app/tmp/cache/assets/development/sprockets/44290e987cc9e134606381c2ed4c3e19 +0 -0
  183. data/spec/dummy_app/tmp/cache/assets/development/sprockets/450d1a68e0d88f6f859522ccf0e7fa75 +0 -0
  184. data/spec/dummy_app/tmp/cache/assets/development/sprockets/46ff8eb0f50fc17b55b2e65a1a9a1832 +0 -0
  185. data/spec/dummy_app/tmp/cache/assets/development/sprockets/498d1a8d06e7b8bd347f41609dfe7dbc +0 -0
  186. data/spec/dummy_app/tmp/cache/assets/development/sprockets/4da7d8ac21ee8ee7cbdde2edd894cc4e +0 -0
  187. data/spec/dummy_app/tmp/cache/assets/development/sprockets/505027f29aa1c70c5425d19ea9fb77ce +0 -0
  188. data/spec/dummy_app/tmp/cache/assets/development/sprockets/5073b1f44a8a2ee95c4368fb2610360d +0 -0
  189. data/spec/dummy_app/tmp/cache/assets/development/sprockets/50b1ef23635589d50f9b31642903f67c +0 -0
  190. data/spec/dummy_app/tmp/cache/assets/development/sprockets/51663175018a723eb6432251c4ff2e2a +0 -0
  191. data/spec/dummy_app/tmp/cache/assets/development/sprockets/5287e92c354e3bafe071e5853eb65ced +0 -0
  192. data/spec/dummy_app/tmp/cache/assets/development/sprockets/52955fb6b1313a736917570386d038f7 +0 -0
  193. data/spec/dummy_app/tmp/cache/assets/development/sprockets/54603322364591c06b6250b0584ab27e +0 -0
  194. data/spec/dummy_app/tmp/cache/assets/development/sprockets/55d364519e6304a1d512d881ced67211 +0 -0
  195. data/spec/dummy_app/tmp/cache/assets/development/sprockets/56d487b917bb9ff84706849c66fee0c7 +0 -0
  196. data/spec/dummy_app/tmp/cache/assets/development/sprockets/59f72211dfd90317c1bc78a481ae189d +0 -0
  197. data/spec/dummy_app/tmp/cache/assets/development/sprockets/5c6b037458b3843da5366697c858985e +0 -0
  198. data/spec/dummy_app/tmp/cache/assets/development/sprockets/5e8f4ca85fe26be682d2e563f23f1f9e +0 -0
  199. data/spec/dummy_app/tmp/cache/assets/development/sprockets/5f6cb8d54ddfd855f5fbfb72a4aac107 +0 -0
  200. data/spec/dummy_app/tmp/cache/assets/development/sprockets/6016aac84581a1ff8e9503adf790f0eb +0 -0
  201. data/spec/dummy_app/tmp/cache/assets/development/sprockets/604f08938cbe197b663267d4ac623b3c +0 -0
  202. data/spec/dummy_app/tmp/cache/assets/development/sprockets/63703decf049effbdea24cb40c7d8feb +0 -0
  203. data/spec/dummy_app/tmp/cache/assets/development/sprockets/65a64732023d6edc64645f6d67ab6376 +0 -0
  204. data/spec/dummy_app/tmp/cache/assets/development/sprockets/67e64bdc647ff62357f616466875cc05 +0 -0
  205. data/spec/dummy_app/tmp/cache/assets/development/sprockets/685130c66086333bc60a3e13426e637d +0 -0
  206. data/spec/dummy_app/tmp/cache/assets/development/sprockets/68bc948f8a4f37f1b96c1ccef3501603 +0 -0
  207. data/spec/dummy_app/tmp/cache/assets/development/sprockets/68df326b958b409f9811f1aa1ae3df75 +0 -0
  208. data/spec/dummy_app/tmp/cache/assets/development/sprockets/693bc2b458236fe0f3db96348cb0d0dc +0 -0
  209. data/spec/dummy_app/tmp/cache/assets/development/sprockets/699daefc627fb5fde880b9a0791933b6 +0 -0
  210. data/spec/dummy_app/tmp/cache/assets/development/sprockets/6aba4f56935b86463d039d0849f8a4b4 +0 -0
  211. data/spec/dummy_app/tmp/cache/assets/development/sprockets/6ff566ad21a9b0caa51f55b63848d1d5 +0 -0
  212. data/spec/dummy_app/tmp/cache/assets/development/sprockets/729d2237d10c9e2170d23785478ca63f +0 -0
  213. data/spec/dummy_app/tmp/cache/assets/development/sprockets/76a8cd7f52d42a76574338632a5356d6 +0 -0
  214. data/spec/dummy_app/tmp/cache/assets/development/sprockets/779d045bffa46a9da91572f71bb4f33a +0 -0
  215. data/spec/dummy_app/tmp/cache/assets/development/sprockets/78762c001b9b200fa9963eee922b41d0 +0 -0
  216. data/spec/dummy_app/tmp/cache/assets/development/sprockets/7991e04eb66b191a868dbb38c761d2da +0 -0
  217. data/spec/dummy_app/tmp/cache/assets/development/sprockets/7af26b28f05d60534b847b073340b9d0 +0 -0
  218. data/spec/dummy_app/tmp/cache/assets/development/sprockets/7c3ec870c8e901cb6ca171c7345618c2 +0 -0
  219. data/spec/dummy_app/tmp/cache/assets/development/sprockets/7d5d91f945b7415354d7f6d3653e7d80 +0 -0
  220. data/spec/dummy_app/tmp/cache/assets/development/sprockets/7eecec59a10631fead107d7e8c265910 +0 -0
  221. data/spec/dummy_app/tmp/cache/assets/development/sprockets/8497b02b98b9d3a6e78388d6c1bab1f1 +0 -0
  222. data/spec/dummy_app/tmp/cache/assets/development/sprockets/858868dacf187de97fe2580f31d09dbe +0 -0
  223. data/spec/dummy_app/tmp/cache/assets/development/sprockets/859c3817c6f5b6d64e457ccd9a33d5a2 +0 -0
  224. data/spec/dummy_app/tmp/cache/assets/development/sprockets/86f13c507e9e995021b05371d252c33c +0 -0
  225. data/spec/dummy_app/tmp/cache/assets/development/sprockets/8717579ef5b551df9b2635f59120a0e1 +0 -0
  226. data/spec/dummy_app/tmp/cache/assets/development/sprockets/888dd6c485e0655b1ca9bfde716acdda +0 -0
  227. data/spec/dummy_app/tmp/cache/assets/development/sprockets/88b7acf651a9d0e1c9b3c8e6db719467 +0 -0
  228. data/spec/dummy_app/tmp/cache/assets/development/sprockets/88f65fc30613c8283f186e248253c020 +0 -0
  229. data/spec/dummy_app/tmp/cache/assets/development/sprockets/8a6aebb20a64dd2680834fa0d28bf832 +0 -0
  230. data/spec/dummy_app/tmp/cache/assets/development/sprockets/8a7d0e83eaa7cfb2826796e2c1a81a65 +0 -0
  231. data/spec/dummy_app/tmp/cache/assets/development/sprockets/902a894fafabac558abf12953428d975 +0 -0
  232. data/spec/dummy_app/tmp/cache/assets/development/sprockets/90c19158b0d4f03b467216c6f9b61af2 +0 -0
  233. data/spec/dummy_app/tmp/cache/assets/development/sprockets/91da1a8fa92fc4acdb6f8fb1658eff85 +0 -0
  234. data/spec/dummy_app/tmp/cache/assets/development/sprockets/958c546e8b56eecbfd2357ee9984f986 +0 -0
  235. data/spec/dummy_app/tmp/cache/assets/development/sprockets/977fe9c1da3ce7cbef3ec54cd7681b57 +0 -0
  236. data/spec/dummy_app/tmp/cache/assets/development/sprockets/98048e0cb396b79d4352a7d10737bc22 +0 -0
  237. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9828e6214ad484fda452904b4591a6ba +0 -0
  238. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9915a7d7fc327736e2852c02cf683916 +0 -0
  239. data/spec/dummy_app/tmp/cache/assets/development/sprockets/99dd18a65861aff71f60940f3f904dc4 +0 -0
  240. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9b8b02558a49e17f6230fd1a84af03ac +0 -0
  241. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9daf110b844179988cda473c3702cd36 +0 -0
  242. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9e98d3ede9a4ae58ad176c09aac8784c +0 -0
  243. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9f2acc37eeea8b15228a38ecbcfe12ec +0 -0
  244. data/spec/dummy_app/tmp/cache/assets/development/sprockets/9f304eccc018ffb73d8dbdea67ff4c45 +0 -0
  245. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a0ac3dab292e1eb99d5e8a524e6dfded +0 -0
  246. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a19531c0b551d0e8aaa386a2cba28621 +0 -0
  247. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a1b5928996636a64ed28d5c815722fc0 +0 -0
  248. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a2c39932df9ec8c9bcd8e1f4a84240dd +0 -0
  249. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a2e4e33192daa77f118bde803b5f469e +0 -0
  250. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a43272bdd86ec2506b047bc1e4ce8876 +0 -0
  251. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a7e1c04200e6e4bda31455a74405ff27 +0 -0
  252. data/spec/dummy_app/tmp/cache/assets/development/sprockets/a971e4dcd80c8771557c6770de027db9 +0 -0
  253. data/spec/dummy_app/tmp/cache/assets/development/sprockets/aa295fd96f916013ffee63976fc76a95 +0 -0
  254. data/spec/dummy_app/tmp/cache/assets/development/sprockets/aa5ab09e4efff43a501273bba49aff5a +0 -0
  255. data/spec/dummy_app/tmp/cache/assets/development/sprockets/ab7de79e9f45ea0210ca722448a61ee6 +0 -0
  256. data/spec/dummy_app/tmp/cache/assets/development/sprockets/abc033045fbf49313622395790a41449 +0 -0
  257. data/spec/dummy_app/tmp/cache/assets/development/sprockets/ac5ba64ea91a44c78d859322e8007b51 +0 -0
  258. data/spec/dummy_app/tmp/cache/assets/development/sprockets/ae56fc628b3fcbc09e9d6bc9cfcfa47f +0 -0
  259. data/spec/dummy_app/tmp/cache/assets/development/sprockets/af312b037fcda8a7c4d4314bbb1294d6 +0 -0
  260. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b0a443220285aa4214c99886f304be36 +0 -0
  261. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b12fd4d4c75c5d4ecedeb33e9015d240 +0 -0
  262. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b24f7fb90e26a052f58af7aec2887f99 +0 -0
  263. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b31281285c049738a71f17d3bce0cb07 +0 -0
  264. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b3ebffc5d529a910f098e186052959ec +0 -0
  265. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b6767aa65b283214e52c1b488053348a +0 -0
  266. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b76e4c022c5b8441b34d7fd884f01591 +0 -0
  267. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b7832ccf4cb727dbb1db2fa906ba58ce +0 -0
  268. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b7fda322633dec2bac36ebd075fca86b +0 -0
  269. data/spec/dummy_app/tmp/cache/assets/development/sprockets/b993ae256cdd45c1f983da2d611049a3 +0 -0
  270. data/spec/dummy_app/tmp/cache/assets/development/sprockets/badb668711397918483b38b6452a19ce +0 -0
  271. data/spec/dummy_app/tmp/cache/assets/development/sprockets/bc96c4fb801c05f926e1bc3fa935418b +0 -0
  272. data/spec/dummy_app/tmp/cache/assets/development/sprockets/bd574a8c5be676a00338f53b536d16c7 +0 -0
  273. data/spec/dummy_app/tmp/cache/assets/development/sprockets/bdff1b5babecc1dd5f99a5878c240298 +0 -0
  274. data/spec/dummy_app/tmp/cache/assets/development/sprockets/beebf50fccb9786a6b9c15060939e196 +0 -0
  275. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c0ecb07d07862572d3e52a8b48245757 +0 -0
  276. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c1d57e1af37bb3d7fec10b83b501c561 +0 -0
  277. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c32f36794c5f61e47ff16beed6cd32ee +0 -0
  278. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c546515632c00eb37eb345e92d604abc +0 -0
  279. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c7383cde7ee415f0a343bfe658885afc +0 -0
  280. data/spec/dummy_app/tmp/cache/assets/development/sprockets/c93eebdbd34ccde24867d33a75ba23bb +0 -0
  281. data/spec/dummy_app/tmp/cache/assets/development/sprockets/cc343c6575f3d88e77e5d0c54208f131 +0 -0
  282. data/spec/dummy_app/tmp/cache/assets/development/sprockets/cc66ba8f2c55f0e0201e9c5d3fb9756a +0 -0
  283. data/spec/dummy_app/tmp/cache/assets/development/sprockets/cd0ab14140d01fee32d8cd011f558895 +0 -0
  284. data/spec/dummy_app/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  285. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d0182afb2a6b3793c9b793d174a32c52 +0 -0
  286. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d0ff728fdab90faf6864895c4388b9a3 +0 -0
  287. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d22147d54feb1d5083b1858b3f0ca9d4 +0 -0
  288. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d281f19fc3b6a6755f669021ba1f1e6c +0 -0
  289. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d383bce808d440db9243b6a766172489 +0 -0
  290. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d3bc3752c772eeb2e0b3c2918cc863a6 +0 -0
  291. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  292. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d7fb14951075b1ec677cc130302a26b2 +0 -0
  293. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d893535a31ef07ab97ed6965cb3f0fb5 +0 -0
  294. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d8e009b8040122f415eeab5ea2b48e58 +0 -0
  295. data/spec/dummy_app/tmp/cache/assets/development/sprockets/d99ca00bff5f10b356270d8c956f4012 +0 -0
  296. data/spec/dummy_app/tmp/cache/assets/development/sprockets/db193f817e5de1268f9e9397829aa188 +0 -0
  297. data/spec/dummy_app/tmp/cache/assets/development/sprockets/dd22a990e8e9fc359a59039954abc0c3 +0 -0
  298. data/spec/dummy_app/tmp/cache/assets/development/sprockets/dddcb7f44b3421803102a90cef903b2a +0 -0
  299. data/spec/dummy_app/tmp/cache/assets/development/sprockets/de89d996da9e70756b13c808c1db5251 +0 -0
  300. data/spec/dummy_app/tmp/cache/assets/development/sprockets/dea7e9cb07d7e5890a38c24eba35e55e +0 -0
  301. data/spec/dummy_app/tmp/cache/assets/development/sprockets/df2e404f81bab3f3b50423d7aa652844 +0 -0
  302. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e076be05d795e33011e9165ce3565719 +0 -0
  303. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e16add15b2c7174bd21c0d70d318f4fc +0 -0
  304. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e2158064cf90553ca96435e06073bb60 +0 -0
  305. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e4cef9cfcc9f94843f54b52b318f593c +0 -0
  306. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e54d18d8cbe7b6ab25445a607c15674c +0 -0
  307. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e5f6b1c85d1d4ec5a26284694ab8d660 +0 -0
  308. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e7cc7fb019fd86a28d82c7f63d749ebe +0 -0
  309. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e8b94e5699ca066cbff81d9ed6727dbf +0 -0
  310. data/spec/dummy_app/tmp/cache/assets/development/sprockets/e901ea625274dfd094b70154e09d58b2 +0 -0
  311. data/spec/dummy_app/tmp/cache/assets/development/sprockets/eb794751bdec36ee921a2fbebfb6c7e6 +0 -0
  312. data/spec/dummy_app/tmp/cache/assets/development/sprockets/eccc72c3ec8522b88d235892cd8f45f2 +0 -0
  313. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f1365895382790389d013528129a140a +0 -0
  314. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f27b5dad4fdaec1c4ede5f174b64de32 +0 -0
  315. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f2c23c8157dd64d926ee77c4b955f6b6 +0 -0
  316. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f3e483f413d3151c5849cbd83476ce0a +0 -0
  317. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f76fdcf47a0b7ee91ca690326d152bee +0 -0
  318. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  319. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f903a7ee38dcd742dca81df64e11733e +0 -0
  320. data/spec/dummy_app/tmp/cache/assets/development/sprockets/f9295b3b0f4d6dc11fdffaa7e0d02f72 +0 -0
  321. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fa12d1dad434ff516a64628a635c07c8 +0 -0
  322. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fae07930e81fdd4084871f66e4634e8a +0 -0
  323. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fc182fc9375dd4ba9b0e0039d71f0944 +0 -0
  324. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fd5d00a09369cb7c59b53d72ca896828 +0 -0
  325. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fdf1d8b5d1d7b6c5fe5e2f5b467812a3 +0 -0
  326. data/spec/dummy_app/tmp/cache/assets/development/sprockets/fef1622202b16661f9ae083c25eaa0cd +0 -0
  327. data/spec/dummy_app/tmp/cache/assets/development/sprockets/ff5a0e8ee643dae44f31640f626ce94a +0 -0
  328. metadata +726 -0
@@ -0,0 +1,56 @@
1
+ module JquerySortableTree
2
+ module Generators
3
+ class ViewsGenerator < Rails::Generators::NamedBase
4
+ APP_DIR = File.expand_path('../../../../app/', __FILE__)
5
+ FILES_FOR_NAMES = {
6
+ tree: 'helpers/render_tree_helper.rb',
7
+ sortable: 'helpers/render_sortable_tree_helper.rb',
8
+ nested_options: 'helpers/render_nested_options_helper.rb',
9
+ indented_options: 'helpers/render_indented_options_helper.rb',
10
+ helper: 'helpers/jquery_sortable_tree_helper.rb',
11
+ assets: 'assets'
12
+ }.freeze
13
+
14
+ source_root APP_DIR
15
+
16
+ def self.banner
17
+ <<-BANNER.chomp
18
+
19
+ bundle exec rails g jquery_sortable_tree:views tree
20
+ bundle exec rails g jquery_sortable_tree:views sortable
21
+ bundle exec rails g jquery_sortable_tree:views nested_options
22
+ bundle exec rails g jquery_sortable_tree:views indented_options
23
+ bundle exec rails g jquery_sortable_tree:views helper
24
+ bundle exec rails g jquery_sortable_tree:views assets
25
+
26
+ BANNER
27
+ end
28
+
29
+ def copy_sortable_tree_files
30
+ copy_helper_files
31
+ end
32
+
33
+ private
34
+
35
+ def filename
36
+ FILES_FOR_NAMES[name.downcase.to_sym]
37
+ end
38
+
39
+ def is_directory?
40
+ File.directory?(File.join(APP_DIR, filename))
41
+ end
42
+
43
+ def copy_command
44
+ is_directory? ? :directory : :copy_file
45
+ end
46
+
47
+ def copy_helper_files
48
+ if filename
49
+ send(copy_command, filename, File.join('app', filename))
50
+ else
51
+ puts "Wrong parameter - use only [#{FILES_FOR_NAMES.keys.map(&:to_s).join(' | ')}] values"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,6 @@
1
+ require 'jquery_sortable_tree'
2
+ require 'rails'
3
+
4
+ module JquerySortableTree
5
+ class Engine < Rails::Engine; end
6
+ end
@@ -0,0 +1,3 @@
1
+ module JquerySortableTree
2
+ VERSION = '3.0.0'
3
+ end
@@ -0,0 +1,13 @@
1
+ require 'jquery_sortable_tree/engine'
2
+ require 'jquery_sortable_tree/version'
3
+
4
+ module JquerySortableTree
5
+ module Scopes
6
+ def self.included(base)
7
+ base.class_eval do
8
+ scope :nested_set, -> { order('lft ASC') }
9
+ scope :reversed_nested_set, -> { order('lft DESC') }
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,38 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails', '~> 4.1.0'
4
+ gem 'sqlite3'
5
+
6
+ gem 'json'
7
+ gem 'haml'
8
+ gem 'haml-rails'
9
+ gem 'jquery-rails'
10
+ gem 'jquery-ui-rails'
11
+
12
+ gem 'quiet_assets'
13
+
14
+ gem 'awesome_nested_set', github: "collectiveidea/awesome_nested_set"
15
+ gem 'jquery_sortable_tree', path: '../../'
16
+
17
+ gem 'uglifier'
18
+ gem 'sass-rails'
19
+ gem 'coffee-rails'
20
+
21
+ group :development, :test do
22
+ gem 'faker'
23
+ gem 'pry'
24
+
25
+ gem 'rspec'
26
+ gem 'rspec-core'
27
+ gem 'rspec-rails'
28
+ gem 'rspec-mocks'
29
+ gem 'rspec-expectations'
30
+
31
+ gem 'capybara'
32
+ gem 'selenium-webdriver'
33
+ end
34
+
35
+ group :test do
36
+ gem 'factory_girl'
37
+ gem 'database_cleaner'
38
+ end
@@ -0,0 +1,206 @@
1
+ GIT
2
+ remote: git://github.com/collectiveidea/awesome_nested_set.git
3
+ revision: f823ffb304ccf5ca9c4f14b60ff1f45ad2c3f440
4
+ specs:
5
+ awesome_nested_set (3.0.0.rc.6)
6
+ activerecord (>= 4.0.0, < 5)
7
+
8
+ PATH
9
+ remote: ../../
10
+ specs:
11
+ jquery_sortable_tree (3.0.0)
12
+ rails (>= 3.1)
13
+
14
+ GEM
15
+ remote: http://rubygems.org/
16
+ specs:
17
+ actionmailer (4.1.4)
18
+ actionpack (= 4.1.4)
19
+ actionview (= 4.1.4)
20
+ mail (~> 2.5.4)
21
+ actionpack (4.1.4)
22
+ actionview (= 4.1.4)
23
+ activesupport (= 4.1.4)
24
+ rack (~> 1.5.2)
25
+ rack-test (~> 0.6.2)
26
+ actionview (4.1.4)
27
+ activesupport (= 4.1.4)
28
+ builder (~> 3.1)
29
+ erubis (~> 2.7.0)
30
+ activemodel (4.1.4)
31
+ activesupport (= 4.1.4)
32
+ builder (~> 3.1)
33
+ activerecord (4.1.4)
34
+ activemodel (= 4.1.4)
35
+ activesupport (= 4.1.4)
36
+ arel (~> 5.0.0)
37
+ activesupport (4.1.4)
38
+ i18n (~> 0.6, >= 0.6.9)
39
+ json (~> 1.7, >= 1.7.7)
40
+ minitest (~> 5.1)
41
+ thread_safe (~> 0.1)
42
+ tzinfo (~> 1.1)
43
+ arel (5.0.1.20140414130214)
44
+ builder (3.2.2)
45
+ capybara (2.4.1)
46
+ mime-types (>= 1.16)
47
+ nokogiri (>= 1.3.3)
48
+ rack (>= 1.0.0)
49
+ rack-test (>= 0.5.4)
50
+ xpath (~> 2.0)
51
+ childprocess (0.5.3)
52
+ ffi (~> 1.0, >= 1.0.11)
53
+ coderay (1.1.0)
54
+ coffee-rails (4.0.1)
55
+ coffee-script (>= 2.2.0)
56
+ railties (>= 4.0.0, < 5.0)
57
+ coffee-script (2.3.0)
58
+ coffee-script-source
59
+ execjs
60
+ coffee-script-source (1.7.1)
61
+ database_cleaner (1.3.0)
62
+ diff-lcs (1.2.5)
63
+ erubis (2.7.0)
64
+ execjs (2.2.1)
65
+ factory_girl (4.4.0)
66
+ activesupport (>= 3.0.0)
67
+ faker (1.4.2)
68
+ i18n (~> 0.5)
69
+ ffi (1.9.3)
70
+ haml (4.0.5)
71
+ tilt
72
+ haml-rails (0.5.3)
73
+ actionpack (>= 4.0.1)
74
+ activesupport (>= 4.0.1)
75
+ haml (>= 3.1, < 5.0)
76
+ railties (>= 4.0.1)
77
+ hike (1.2.3)
78
+ i18n (0.6.11)
79
+ jquery-rails (3.1.1)
80
+ railties (>= 3.0, < 5.0)
81
+ thor (>= 0.14, < 2.0)
82
+ jquery-ui-rails (5.0.0)
83
+ railties (>= 3.2.16)
84
+ json (1.8.1)
85
+ mail (2.5.4)
86
+ mime-types (~> 1.16)
87
+ treetop (~> 1.4.8)
88
+ method_source (0.8.2)
89
+ mime-types (1.25.1)
90
+ mini_portile (0.6.0)
91
+ minitest (5.4.0)
92
+ multi_json (1.10.1)
93
+ nokogiri (1.6.3)
94
+ mini_portile (= 0.6.0)
95
+ polyglot (0.3.5)
96
+ pry (0.10.0)
97
+ coderay (~> 1.1.0)
98
+ method_source (~> 0.8.1)
99
+ slop (~> 3.4)
100
+ quiet_assets (1.0.3)
101
+ railties (>= 3.1, < 5.0)
102
+ rack (1.5.2)
103
+ rack-test (0.6.2)
104
+ rack (>= 1.0)
105
+ rails (4.1.4)
106
+ actionmailer (= 4.1.4)
107
+ actionpack (= 4.1.4)
108
+ actionview (= 4.1.4)
109
+ activemodel (= 4.1.4)
110
+ activerecord (= 4.1.4)
111
+ activesupport (= 4.1.4)
112
+ bundler (>= 1.3.0, < 2.0)
113
+ railties (= 4.1.4)
114
+ sprockets-rails (~> 2.0)
115
+ railties (4.1.4)
116
+ actionpack (= 4.1.4)
117
+ activesupport (= 4.1.4)
118
+ rake (>= 0.8.7)
119
+ thor (>= 0.18.1, < 2.0)
120
+ rake (10.3.2)
121
+ rspec (3.0.0)
122
+ rspec-core (~> 3.0.0)
123
+ rspec-expectations (~> 3.0.0)
124
+ rspec-mocks (~> 3.0.0)
125
+ rspec-core (3.0.2)
126
+ rspec-support (~> 3.0.0)
127
+ rspec-expectations (3.0.2)
128
+ diff-lcs (>= 1.2.0, < 2.0)
129
+ rspec-support (~> 3.0.0)
130
+ rspec-mocks (3.0.2)
131
+ rspec-support (~> 3.0.0)
132
+ rspec-rails (3.0.1)
133
+ actionpack (>= 3.0)
134
+ activesupport (>= 3.0)
135
+ railties (>= 3.0)
136
+ rspec-core (~> 3.0.0)
137
+ rspec-expectations (~> 3.0.0)
138
+ rspec-mocks (~> 3.0.0)
139
+ rspec-support (~> 3.0.0)
140
+ rspec-support (3.0.2)
141
+ rubyzip (1.1.6)
142
+ sass (3.2.19)
143
+ sass-rails (4.0.3)
144
+ railties (>= 4.0.0, < 5.0)
145
+ sass (~> 3.2.0)
146
+ sprockets (~> 2.8, <= 2.11.0)
147
+ sprockets-rails (~> 2.0)
148
+ selenium-webdriver (2.42.0)
149
+ childprocess (>= 0.5.0)
150
+ multi_json (~> 1.0)
151
+ rubyzip (~> 1.0)
152
+ websocket (~> 1.0.4)
153
+ slop (3.6.0)
154
+ sprockets (2.11.0)
155
+ hike (~> 1.2)
156
+ multi_json (~> 1.0)
157
+ rack (~> 1.0)
158
+ tilt (~> 1.1, != 1.3.0)
159
+ sprockets-rails (2.1.3)
160
+ actionpack (>= 3.0)
161
+ activesupport (>= 3.0)
162
+ sprockets (~> 2.8)
163
+ sqlite3 (1.3.9)
164
+ thor (0.19.1)
165
+ thread_safe (0.3.4)
166
+ tilt (1.4.1)
167
+ treetop (1.4.15)
168
+ polyglot
169
+ polyglot (>= 0.3.1)
170
+ tzinfo (1.2.1)
171
+ thread_safe (~> 0.1)
172
+ uglifier (2.5.3)
173
+ execjs (>= 0.3.0)
174
+ json (>= 1.8.0)
175
+ websocket (1.0.7)
176
+ xpath (2.0.0)
177
+ nokogiri (~> 1.3)
178
+
179
+ PLATFORMS
180
+ ruby
181
+
182
+ DEPENDENCIES
183
+ awesome_nested_set!
184
+ capybara
185
+ coffee-rails
186
+ database_cleaner
187
+ factory_girl
188
+ faker
189
+ haml
190
+ haml-rails
191
+ jquery-rails
192
+ jquery-ui-rails
193
+ jquery_sortable_tree!
194
+ json
195
+ pry
196
+ quiet_assets
197
+ rails (~> 4.1.0)
198
+ rspec
199
+ rspec-core
200
+ rspec-expectations
201
+ rspec-mocks
202
+ rspec-rails
203
+ sass-rails
204
+ selenium-webdriver
205
+ sqlite3
206
+ uglifier
@@ -0,0 +1,48 @@
1
+ ## JquerySortableTree Test Application
2
+
3
+ #### Ruby 2.0.0p247 + Rails 4 + Haml 4 + jquery_sortable_tree (2.5.0)
4
+
5
+
6
+ ### Install App and try to use JquerySortableTree
7
+
8
+ Create Database config file
9
+
10
+ ```
11
+ cp config/database.yml.example config/database.yml
12
+ ```
13
+
14
+ Create Database and Test data
15
+
16
+ ```
17
+ rake db:bootstrap_and_seed
18
+ ```
19
+
20
+ Start Rails 4
21
+
22
+ ```
23
+ rails s
24
+ ```
25
+
26
+ or
27
+
28
+ ```
29
+ rails s -p 3000 -b site.com
30
+ ```
31
+
32
+ Open browser
33
+
34
+ ```
35
+ localhost:3000
36
+ ```
37
+
38
+ ### How to run tests for JquerySortable tree
39
+
40
+ ```ruby
41
+ git clone git@github.com:maximalink/jquery_sortable_tree.git
42
+ cd jquery_sortable_tree/spec/dummy_app/
43
+
44
+ # cp config/database.yml.example config/database.yml
45
+
46
+ rake db:bootstrap RAILS_ENV=test
47
+ rspec
48
+ ```
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env rake
2
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
3
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
4
+
5
+ require File.expand_path('../config/application', __FILE__)
6
+
7
+ JquerySortableTreeTest::Application.load_tasks
@@ -0,0 +1,7 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
+
3
+ one:
4
+ title: MyString
5
+
6
+ two:
7
+ title: MyString
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
+
3
+ one:
4
+ title: MyString
5
+ content: MyText
6
+
7
+ two:
8
+ title: MyString
9
+ content: MyText
@@ -0,0 +1,13 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
+
3
+ one:
4
+ name: MyString
5
+ email: MyString
6
+ raw_content: MyText
7
+ content: MyText
8
+
9
+ two:
10
+ name: MyString
11
+ email: MyString
12
+ raw_content: MyText
13
+ content: MyText
@@ -0,0 +1,9 @@
1
+ # Read about fixtures at http://api.rubyonrails.org/classes/Fixtures.html
2
+
3
+ one:
4
+ title: MyString
5
+ content: MyText
6
+
7
+ two:
8
+ title: MyString
9
+ content: MyText
@@ -0,0 +1,14 @@
1
+ require 'test_helper'
2
+
3
+ class Inventory::CategoryControllerTest < ActionController::TestCase
4
+ test "should get index" do
5
+ get :index
6
+ assert_response :success
7
+ end
8
+
9
+ test "should get manage" do
10
+ get :manage
11
+ assert_response :success
12
+ end
13
+
14
+ end
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ class BrowsingTest < ActionDispatch::PerformanceTest
5
+ # Refer to the documentation for all available options
6
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
+ # :output => 'tmp/performance', :formats => [:flat] }
8
+
9
+ def test_homepage
10
+ get '/'
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7
+ #
8
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
+ # -- they do not yet inherit this setting
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class Admin::PageTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class ArticleCategoryTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class CommentTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,4 @@
1
+ require 'test_helper'
2
+
3
+ class Inventory::CategoryHelperTest < ActionView::TestCase
4
+ end
@@ -0,0 +1,7 @@
1
+ require 'test_helper'
2
+
3
+ class Inventory::CategoryTest < ActiveSupport::TestCase
4
+ # test "the truth" do
5
+ # assert true
6
+ # end
7
+ end
@@ -0,0 +1,11 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery-ui
9
+ //= require jquery_ujs
10
+ //= require sortable_tree/initializer
11
+ //= require expandable_tree/initializer
@@ -0,0 +1,11 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+
7
+ *= require tree
8
+ *= require sortable_tree
9
+ *= require nested_options
10
+ *= require expandable_tree
11
+ */
@@ -0,0 +1,35 @@
1
+ class Admin::PagesController < ApplicationController
2
+ include JquerySortableTreeController::Rebuild
3
+
4
+ def index
5
+ @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15)
6
+ end
7
+
8
+ def manage
9
+ @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15)
10
+ end
11
+
12
+ def nested_options
13
+ @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15)
14
+ end
15
+
16
+ def indented_options
17
+ @pages = Admin::Page.nested_set.select('id, title, content, parent_id').limit(15)
18
+ end
19
+
20
+ def node_manage
21
+ @root = Admin::Page.root
22
+ @pages = @root.self_and_descendants.nested_set.select('id, title, content, parent_id').limit(15) if @root
23
+ render template: 'admin/pages/manage'
24
+ end
25
+
26
+ protected
27
+
28
+ def sortable_model
29
+ Admin::Page
30
+ end
31
+
32
+ def sortable_collection
33
+ 'admin_pages'
34
+ end
35
+ end
@@ -0,0 +1,3 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+ end
@@ -0,0 +1,11 @@
1
+ class ArticleCategoriesController < ApplicationController
2
+ include JquerySortableTreeController::Rebuild
3
+
4
+ def index
5
+ @article_categories = ArticleCategory.nested_set.all
6
+ end
7
+
8
+ def manage
9
+ @article_categories = ArticleCategory.nested_set.all
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ class Inventory::CategoriesController < ApplicationController
2
+ include JquerySortableTreeController::Rebuild
3
+
4
+ def index
5
+ @inventory_categories = Inventory::Category.nested_set.all
6
+ end
7
+
8
+ def manage
9
+ @inventory_categories = Inventory::Category.nested_set.all
10
+ end
11
+
12
+ def sortable_model
13
+ Inventory::Category
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ class PagesController < ApplicationController
2
+ include JquerySortableTreeController::Rebuild
3
+ include JquerySortableTreeController::ExpandNode
4
+
5
+ def index
6
+ @pages = Page.nested_set.select('id, title, content, parent_id').limit(15)
7
+ end
8
+
9
+ def nested_options
10
+ @pages = Page.nested_set.select('id, title, content, parent_id').limit(15)
11
+ end
12
+
13
+ def indented_options
14
+ @pages = Page.nested_set.select('id, title, content, parent_id').limit(15)
15
+ end
16
+
17
+ def manage
18
+ @pages = Page.nested_set.select('id, title, content, parent_id').all
19
+ end
20
+
21
+ def node_manage
22
+ @root = Page.root
23
+ @pages = @root.self_and_descendants.nested_set.select('id, title, content, parent_id').limit(15) if @root
24
+ render template: 'pages/manage'
25
+ end
26
+
27
+ def expand
28
+ @pages = Page.nested_set.roots.select('id, title, content, parent_id')
29
+ end
30
+ end
@@ -0,0 +1,3 @@
1
+ class WelcomeController < ApplicationController
2
+ def index; end
3
+ end
@@ -0,0 +1,4 @@
1
+ class Admin::Page < ActiveRecord::Base
2
+ acts_as_nested_set
3
+ include JquerySortableTree::Scopes
4
+ end
@@ -0,0 +1,5 @@
1
+ module Admin
2
+ def self.table_name_prefix
3
+ 'admin_'
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ class ArticleCategory < ActiveRecord::Base
2
+ acts_as_nested_set
3
+ include JquerySortableTree::Scopes
4
+ end
@@ -0,0 +1,4 @@
1
+ class Inventory::Category < ActiveRecord::Base
2
+ acts_as_nested_set
3
+ include JquerySortableTree::Scopes
4
+ end
@@ -0,0 +1,5 @@
1
+ module Inventory
2
+ def self.table_name_prefix
3
+ 'inventory_'
4
+ end
5
+ end