rails_admin 2.3.1 → 3.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rails_admin might be problematic. Click here for more details.

Files changed (329) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -11
  3. data/README.md +37 -31
  4. data/Rakefile +2 -2
  5. data/app/assets/javascripts/rails_admin.js +21 -0
  6. data/app/assets/stylesheets/rails_admin/custom/mixins.scss +1 -1
  7. data/app/assets/stylesheets/rails_admin/custom/variables.scss +1 -1
  8. data/app/assets/stylesheets/rails_admin.scss.erb +76 -0
  9. data/app/controllers/rails_admin/application_controller.rb +4 -3
  10. data/app/controllers/rails_admin/main_controller.rb +43 -24
  11. data/app/helpers/rails_admin/application_helper.rb +69 -52
  12. data/app/helpers/rails_admin/form_builder.rb +5 -4
  13. data/app/helpers/rails_admin/main_helper.rb +27 -43
  14. data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.erb +5 -0
  15. data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +9 -0
  16. data/app/views/kaminari/ra-twitter-bootstrap/_page.html.erb +9 -0
  17. data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.erb +13 -0
  18. data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +9 -0
  19. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.erb +9 -0
  20. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.erb +6 -0
  21. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.erb +9 -0
  22. data/app/views/layouts/rails_admin/_head.html.erb +17 -0
  23. data/app/views/layouts/rails_admin/_navigation.html.erb +21 -0
  24. data/app/views/layouts/rails_admin/_secondary_navigation.html.erb +24 -0
  25. data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +9 -0
  26. data/app/views/layouts/rails_admin/application.html.erb +27 -0
  27. data/app/views/layouts/rails_admin/modal.js.erb +7 -0
  28. data/app/views/layouts/rails_admin/pjax.html.erb +20 -0
  29. data/app/views/rails_admin/main/_dashboard_history.html.erb +45 -0
  30. data/app/views/rails_admin/main/_delete_notice.html.erb +35 -0
  31. data/app/views/rails_admin/main/_form_action_text.html.erb +7 -0
  32. data/app/views/rails_admin/main/_form_boolean.html.erb +16 -0
  33. data/app/views/rails_admin/main/{_form_ck_editor.html.haml → _form_ck_editor.html.erb} +3 -3
  34. data/app/views/rails_admin/main/_form_code_mirror.html.erb +9 -0
  35. data/app/views/rails_admin/main/_form_colorpicker.html.erb +1 -0
  36. data/app/views/rails_admin/main/_form_datetime.html.erb +9 -0
  37. data/app/views/rails_admin/main/_form_enumeration.html.erb +21 -0
  38. data/app/views/rails_admin/main/_form_field.html.erb +1 -0
  39. data/app/views/rails_admin/main/_form_file_upload.html.erb +17 -0
  40. data/app/views/rails_admin/main/{_form_filtering_multiselect.html.haml → _form_filtering_multiselect.html.erb} +11 -11
  41. data/app/views/rails_admin/main/{_form_filtering_select.html.haml → _form_filtering_select.html.erb} +13 -12
  42. data/app/views/rails_admin/main/_form_froala.html.erb +8 -0
  43. data/app/views/rails_admin/main/_form_multiple_file_upload.html.erb +20 -0
  44. data/app/views/rails_admin/main/_form_nested_many.html.erb +21 -0
  45. data/app/views/rails_admin/main/_form_nested_one.html.erb +21 -0
  46. data/app/views/rails_admin/main/_form_polymorphic_association.html.erb +27 -0
  47. data/app/views/rails_admin/main/_form_simple_mde.html.erb +8 -0
  48. data/app/views/rails_admin/main/_form_text.html.erb +1 -0
  49. data/app/views/rails_admin/main/_form_wysihtml5.html.erb +8 -0
  50. data/app/views/rails_admin/main/_submit_buttons.html.erb +25 -0
  51. data/app/views/rails_admin/main/bulk_delete.html.erb +19 -0
  52. data/app/views/rails_admin/main/dashboard.html.erb +64 -0
  53. data/app/views/rails_admin/main/delete.html.erb +21 -0
  54. data/app/views/rails_admin/main/edit.html.erb +3 -0
  55. data/app/views/rails_admin/main/export.html.erb +146 -0
  56. data/app/views/rails_admin/main/history.html.erb +78 -0
  57. data/app/views/rails_admin/main/index.html.erb +193 -0
  58. data/app/views/rails_admin/main/new.html.erb +3 -0
  59. data/app/views/rails_admin/main/show.html.erb +28 -0
  60. data/config/initializers/active_record_extensions.rb +3 -1
  61. data/config/initializers/mongoid_extensions.rb +1 -1
  62. data/config/locales/rails_admin.en.yml +5 -1
  63. data/lib/generators/rails_admin/install_generator.rb +51 -3
  64. data/lib/generators/rails_admin/templates/environment.js +6 -0
  65. data/lib/generators/rails_admin/templates/initializer.erb +2 -1
  66. data/lib/generators/rails_admin/templates/rails_admin.js.erb +2 -0
  67. data/lib/generators/rails_admin/templates/rails_admin.scss +1 -0
  68. data/lib/generators/rails_admin/templates/webpack.config.js +32 -0
  69. data/lib/rails_admin/abstract_model.rb +24 -10
  70. data/lib/rails_admin/adapters/active_record/association.rb +20 -1
  71. data/lib/rails_admin/adapters/active_record/object_extension.rb +29 -0
  72. data/lib/rails_admin/adapters/active_record/property.rb +1 -1
  73. data/lib/rails_admin/adapters/active_record.rb +19 -21
  74. data/lib/rails_admin/adapters/mongoid/association.rb +38 -9
  75. data/lib/rails_admin/adapters/mongoid/bson.rb +4 -5
  76. data/lib/rails_admin/adapters/mongoid/extension.rb +3 -1
  77. data/lib/rails_admin/adapters/mongoid/object_extension.rb +32 -0
  78. data/lib/rails_admin/adapters/mongoid/property.rb +2 -2
  79. data/lib/rails_admin/adapters/mongoid.rb +25 -19
  80. data/lib/rails_admin/config/actions/base.rb +7 -2
  81. data/lib/rails_admin/config/actions/bulk_delete.rb +2 -2
  82. data/lib/rails_admin/config/actions/dashboard.rb +4 -3
  83. data/lib/rails_admin/config/actions/delete.rb +5 -9
  84. data/lib/rails_admin/config/actions/edit.rb +7 -7
  85. data/lib/rails_admin/config/actions/export.rb +2 -2
  86. data/lib/rails_admin/config/actions/history_index.rb +2 -2
  87. data/lib/rails_admin/config/actions/history_show.rb +2 -2
  88. data/lib/rails_admin/config/actions/index.rb +5 -7
  89. data/lib/rails_admin/config/actions/new.rb +9 -9
  90. data/lib/rails_admin/config/actions/show.rb +1 -1
  91. data/lib/rails_admin/config/actions/show_in_app.rb +6 -2
  92. data/lib/rails_admin/config/actions.rb +4 -4
  93. data/lib/rails_admin/config/configurable.rb +2 -2
  94. data/lib/rails_admin/config/fields/association.rb +15 -12
  95. data/lib/rails_admin/config/fields/base.rb +44 -24
  96. data/lib/rails_admin/config/fields/factories/active_storage.rb +1 -0
  97. data/lib/rails_admin/config/fields/factories/association.rb +6 -8
  98. data/lib/rails_admin/config/fields/factories/carrierwave.rb +2 -1
  99. data/lib/rails_admin/config/fields/factories/devise.rb +2 -1
  100. data/lib/rails_admin/config/fields/factories/dragonfly.rb +2 -1
  101. data/lib/rails_admin/config/fields/factories/paperclip.rb +2 -1
  102. data/lib/rails_admin/config/fields/factories/shrine.rb +1 -1
  103. data/lib/rails_admin/config/fields/group.rb +1 -2
  104. data/lib/rails_admin/config/fields/types/active_record_enum.rb +2 -0
  105. data/lib/rails_admin/config/fields/types/active_storage.rb +9 -7
  106. data/lib/rails_admin/config/fields/types/all.rb +1 -0
  107. data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -12
  108. data/lib/rails_admin/config/fields/types/boolean.rb +32 -8
  109. data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -0
  110. data/lib/rails_admin/config/fields/types/citext.rb +13 -0
  111. data/lib/rails_admin/config/fields/types/color.rb +6 -2
  112. data/lib/rails_admin/config/fields/types/date.rb +5 -8
  113. data/lib/rails_admin/config/fields/types/datetime.rb +18 -21
  114. data/lib/rails_admin/config/fields/types/decimal.rb +9 -2
  115. data/lib/rails_admin/config/fields/types/dragonfly.rb +3 -1
  116. data/lib/rails_admin/config/fields/types/enum.rb +1 -1
  117. data/lib/rails_admin/config/fields/types/file_upload.rb +4 -3
  118. data/lib/rails_admin/config/fields/types/float.rb +9 -2
  119. data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -5
  120. data/lib/rails_admin/config/fields/types/has_one_association.rb +1 -13
  121. data/lib/rails_admin/config/fields/types/integer.rb +2 -6
  122. data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +8 -6
  123. data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +1 -0
  124. data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +4 -3
  125. data/lib/rails_admin/config/fields/types/numeric.rb +18 -0
  126. data/lib/rails_admin/config/fields/types/polymorphic_association.rb +3 -2
  127. data/lib/rails_admin/config/fields/types/string.rb +1 -1
  128. data/lib/rails_admin/config/fields/types/time.rb +1 -4
  129. data/lib/rails_admin/config/fields/types/timestamp.rb +0 -4
  130. data/lib/rails_admin/config/fields/types.rb +1 -1
  131. data/lib/rails_admin/config/fields.rb +3 -1
  132. data/lib/rails_admin/config/has_fields.rb +5 -6
  133. data/lib/rails_admin/config/hideable.rb +1 -1
  134. data/lib/rails_admin/config/inspectable.rb +1 -3
  135. data/lib/rails_admin/config/model.rb +10 -10
  136. data/lib/rails_admin/config/sections/base.rb +2 -3
  137. data/lib/rails_admin/config/sections/list.rb +4 -15
  138. data/lib/rails_admin/config/sections.rb +1 -1
  139. data/lib/rails_admin/config.rb +73 -38
  140. data/lib/rails_admin/engine.rb +36 -23
  141. data/lib/rails_admin/extension.rb +6 -14
  142. data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +4 -2
  143. data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +12 -7
  144. data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +6 -7
  145. data/lib/rails_admin/support/csv_converter.rb +12 -13
  146. data/lib/rails_admin/support/datetime.rb +40 -74
  147. data/lib/rails_admin/support/esmodule_preprocessor.rb +32 -0
  148. data/lib/rails_admin/support/hash_helper.rb +6 -5
  149. data/lib/rails_admin/version.rb +8 -4
  150. data/lib/rails_admin.rb +1 -4
  151. data/lib/tasks/rails_admin.rake +3 -3
  152. data/package.json +28 -0
  153. data/src/rails_admin/base.js +21 -0
  154. data/src/rails_admin/filter-box.js +405 -0
  155. data/src/rails_admin/filtering-multiselect.js +394 -0
  156. data/src/rails_admin/filtering-select.js +302 -0
  157. data/src/rails_admin/i18n.js +19 -0
  158. data/src/rails_admin/nested-form-hooks.js +100 -0
  159. data/src/rails_admin/remote-form.js +190 -0
  160. data/src/rails_admin/sidescroll.js +20 -0
  161. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/theming.scss +93 -34
  162. data/src/rails_admin/styles/base.scss +64 -0
  163. data/src/rails_admin/styles/filtering-multiselect.scss +53 -0
  164. data/src/rails_admin/styles/filtering-select.scss +70 -0
  165. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/theming.scss +23 -21
  166. data/src/rails_admin/styles/themes/cerulean/variables.scss +830 -0
  167. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/mixins.scss +1 -1
  168. data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/variables.scss +1 -1
  169. data/src/rails_admin/styles/widgets.scss +35 -0
  170. data/src/rails_admin/ui.js +172 -0
  171. data/src/rails_admin/vendor/jquery.pjax.js +899 -0
  172. data/src/rails_admin/vendor/jquery_nested_form.js +122 -0
  173. data/src/rails_admin/widgets.js +512 -0
  174. data/vendor/assets/fonts/rails_admin/fa-solid-900.eot +0 -0
  175. data/vendor/assets/fonts/rails_admin/fa-solid-900.svg +5034 -0
  176. data/vendor/assets/fonts/rails_admin/fa-solid-900.ttf +0 -0
  177. data/vendor/assets/fonts/rails_admin/fa-solid-900.woff +0 -0
  178. data/vendor/assets/fonts/rails_admin/fa-solid-900.woff2 +0 -0
  179. data/vendor/assets/javascripts/rails_admin/jquery-ui/data.js +41 -0
  180. data/vendor/assets/javascripts/rails_admin/jquery-ui/effect.js +1637 -0
  181. data/vendor/assets/javascripts/rails_admin/jquery-ui/ie.js +17 -0
  182. data/vendor/assets/javascripts/rails_admin/jquery-ui/keycode.js +47 -0
  183. data/vendor/assets/javascripts/rails_admin/jquery-ui/position.js +500 -0
  184. data/vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js +42 -0
  185. data/vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js +47 -0
  186. data/vendor/assets/javascripts/rails_admin/jquery-ui/unique-id.js +51 -0
  187. data/vendor/assets/javascripts/rails_admin/jquery-ui/version.js +17 -0
  188. data/vendor/assets/javascripts/rails_admin/jquery-ui/widget.js +735 -0
  189. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/autocomplete.js +689 -0
  190. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/menu.js +680 -0
  191. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/mouse.js +230 -0
  192. data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/sortable.js +1561 -0
  193. data/vendor/assets/javascripts/rails_admin/jquery3.js +10872 -0
  194. data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +4476 -2216
  195. metadata +118 -263
  196. data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +0 -0
  197. data/app/assets/images/rails_admin/aristo/images/icon_sprite.png +0 -0
  198. data/app/assets/images/rails_admin/aristo/images/progress_bar.gif +0 -0
  199. data/app/assets/images/rails_admin/aristo/images/slider_handles.png +0 -0
  200. data/app/assets/images/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  201. data/app/assets/images/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  202. data/app/assets/images/rails_admin/bullet_black.png +0 -0
  203. data/app/assets/images/rails_admin/bullet_white.png +0 -0
  204. data/app/assets/images/rails_admin/calendar.png +0 -0
  205. data/app/assets/images/rails_admin/clock.png +0 -0
  206. data/app/assets/images/rails_admin/logo.png +0 -0
  207. data/app/assets/images/rails_admin/magnifier.png +0 -0
  208. data/app/assets/images/rails_admin/multiselect/icon_sprite.png +0 -0
  209. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-dark.png +0 -0
  210. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-light.png +0 -0
  211. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-dark.png +0 -0
  212. data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-light.png +0 -0
  213. data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +0 -8
  214. data/app/assets/javascripts/rails_admin/jquery.migrate.js +0 -3
  215. data/app/assets/javascripts/rails_admin/ra.filter-box.js +0 -253
  216. data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +0 -331
  217. data/app/assets/javascripts/rails_admin/ra.filtering-select.js +0 -294
  218. data/app/assets/javascripts/rails_admin/ra.i18n.js +0 -28
  219. data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +0 -59
  220. data/app/assets/javascripts/rails_admin/ra.remote-form.js +0 -155
  221. data/app/assets/javascripts/rails_admin/ra.sidescroll.js +0 -31
  222. data/app/assets/javascripts/rails_admin/ra.widgets.js +0 -379
  223. data/app/assets/javascripts/rails_admin/rails_admin.js +0 -21
  224. data/app/assets/javascripts/rails_admin/ui.js +0 -135
  225. data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +0 -0
  226. data/app/assets/stylesheets/rails_admin/aristo/images/icon_sprite.png +0 -0
  227. data/app/assets/stylesheets/rails_admin/aristo/images/progress_bar.gif +0 -0
  228. data/app/assets/stylesheets/rails_admin/aristo/images/slider_handles.png +0 -0
  229. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
  230. data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
  231. data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +0 -733
  232. data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +0 -153
  233. data/app/assets/stylesheets/rails_admin/ra.filtering-multiselect.scss +0 -88
  234. data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +0 -29
  235. data/app/assets/stylesheets/rails_admin/ra.widgets.scss +0 -17
  236. data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +0 -110
  237. data/app/assets/stylesheets/rails_admin/themes/cerulean/variables.scss +0 -857
  238. data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.haml +0 -2
  239. data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.haml +0 -4
  240. data/app/views/kaminari/ra-twitter-bootstrap/_page.html.haml +0 -4
  241. data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.haml +0 -9
  242. data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.haml +0 -4
  243. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +0 -4
  244. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +0 -4
  245. data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +0 -4
  246. data/app/views/layouts/rails_admin/_head.html.haml +0 -7
  247. data/app/views/layouts/rails_admin/_navigation.html.haml +0 -12
  248. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +0 -10
  249. data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +0 -3
  250. data/app/views/layouts/rails_admin/application.html.haml +0 -16
  251. data/app/views/layouts/rails_admin/pjax.html.haml +0 -12
  252. data/app/views/rails_admin/main/_dashboard_history.html.haml +0 -21
  253. data/app/views/rails_admin/main/_delete_notice.html.haml +0 -24
  254. data/app/views/rails_admin/main/_form_action_text.html.haml +0 -7
  255. data/app/views/rails_admin/main/_form_boolean.html.haml +0 -3
  256. data/app/views/rails_admin/main/_form_code_mirror.html.haml +0 -9
  257. data/app/views/rails_admin/main/_form_colorpicker.html.haml +0 -1
  258. data/app/views/rails_admin/main/_form_datetime.html.haml +0 -5
  259. data/app/views/rails_admin/main/_form_enumeration.html.haml +0 -19
  260. data/app/views/rails_admin/main/_form_field.html.haml +0 -1
  261. data/app/views/rails_admin/main/_form_file_upload.html.haml +0 -17
  262. data/app/views/rails_admin/main/_form_froala.html.haml +0 -8
  263. data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +0 -16
  264. data/app/views/rails_admin/main/_form_nested_many.html.haml +0 -15
  265. data/app/views/rails_admin/main/_form_nested_one.html.haml +0 -17
  266. data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +0 -26
  267. data/app/views/rails_admin/main/_form_simple_mde.haml +0 -8
  268. data/app/views/rails_admin/main/_form_text.html.haml +0 -1
  269. data/app/views/rails_admin/main/_form_wysihtml5.html.haml +0 -8
  270. data/app/views/rails_admin/main/_submit_buttons.html.haml +0 -16
  271. data/app/views/rails_admin/main/bulk_delete.html.haml +0 -11
  272. data/app/views/rails_admin/main/dashboard.html.haml +0 -34
  273. data/app/views/rails_admin/main/delete.html.haml +0 -18
  274. data/app/views/rails_admin/main/edit.html.haml +0 -2
  275. data/app/views/rails_admin/main/export.html.haml +0 -92
  276. data/app/views/rails_admin/main/history.html.haml +0 -51
  277. data/app/views/rails_admin/main/index.html.haml +0 -126
  278. data/app/views/rails_admin/main/new.html.haml +0 -2
  279. data/app/views/rails_admin/main/show.html.haml +0 -15
  280. data/config/initializers/haml.rb +0 -5
  281. data/lib/rails_admin/adapters/active_record/abstract_object.rb +0 -38
  282. data/lib/rails_admin/adapters/active_record.rb.bak +0 -348
  283. data/lib/rails_admin/adapters/mongoid/abstract_object.rb +0 -42
  284. data/lib/rails_admin/bootstrap-sass/compass_functions.rb +0 -28
  285. data/lib/rails_admin/bootstrap-sass/sass_functions.rb +0 -16
  286. data/lib/rails_admin/bootstrap-sass.rb +0 -49
  287. data/lib/rails_admin/config/lazy_model.rb +0 -68
  288. data/lib/rails_admin/extensions/history/auditing_adapter.rb +0 -37
  289. data/lib/rails_admin/extensions/history/history.rb +0 -44
  290. data/lib/rails_admin/extensions/history.rb +0 -3
  291. data/lib/rails_admin/support/i18n.rb +0 -43
  292. data/vendor/assets/fonts/rails_admin/FontAwesome.otf +0 -0
  293. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.eot +0 -0
  294. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.svg +0 -2671
  295. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.ttf +0 -0
  296. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff +0 -0
  297. data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff2 +0 -0
  298. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
  299. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
  300. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
  301. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
  302. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
  303. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
  304. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
  305. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
  306. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
  307. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
  308. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_select.gif +0 -0
  309. data/vendor/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
  310. data/vendor/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
  311. data/vendor/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
  312. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
  313. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
  314. data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
  315. data/vendor/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
  316. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
  317. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
  318. data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_r.png +0 -0
  319. data/vendor/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
  320. data/vendor/assets/images/rails_admin/colorpicker/select.png +0 -0
  321. data/vendor/assets/images/rails_admin/colorpicker/select2.png +0 -0
  322. data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
  323. data/vendor/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -484
  324. data/vendor/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -182
  325. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/README.txt +0 -0
  326. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/mixins.scss +0 -0
  327. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/variables.scss +0 -0
  328. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/mixins.scss +0 -0
  329. /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/theming.scss +0 -0
@@ -0,0 +1,735 @@
1
+ //= require rails_admin/jquery-ui/version
2
+
3
+ /*!
4
+ * jQuery UI Widget 1.12.1
5
+ * http://jqueryui.com
6
+ *
7
+ * Copyright jQuery Foundation and other contributors
8
+ * Released under the MIT license.
9
+ * http://jquery.org/license
10
+ */
11
+
12
+ //>>label: Widget
13
+ //>>group: Core
14
+ //>>description: Provides a factory for creating stateful widgets with a common API.
15
+ //>>docs: http://api.jqueryui.com/jQuery.widget/
16
+ //>>demos: http://jqueryui.com/widget/
17
+
18
+ ( function( factory ) {
19
+ if ( typeof define === "function" && define.amd ) {
20
+
21
+ // AMD. Register as an anonymous module.
22
+ define( [ "jquery", "./version" ], factory );
23
+ } else {
24
+
25
+ // Browser globals
26
+ factory( jQuery );
27
+ }
28
+ }( function( $ ) {
29
+
30
+ var widgetUuid = 0;
31
+ var widgetSlice = Array.prototype.slice;
32
+
33
+ $.cleanData = ( function( orig ) {
34
+ return function( elems ) {
35
+ var events, elem, i;
36
+ for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
37
+ try {
38
+
39
+ // Only trigger remove when necessary to save time
40
+ events = $._data( elem, "events" );
41
+ if ( events && events.remove ) {
42
+ $( elem ).triggerHandler( "remove" );
43
+ }
44
+
45
+ // Http://bugs.jquery.com/ticket/8235
46
+ } catch ( e ) {}
47
+ }
48
+ orig( elems );
49
+ };
50
+ } )( $.cleanData );
51
+
52
+ $.widget = function( name, base, prototype ) {
53
+ var existingConstructor, constructor, basePrototype;
54
+
55
+ // ProxiedPrototype allows the provided prototype to remain unmodified
56
+ // so that it can be used as a mixin for multiple widgets (#8876)
57
+ var proxiedPrototype = {};
58
+
59
+ var namespace = name.split( "." )[ 0 ];
60
+ name = name.split( "." )[ 1 ];
61
+ var fullName = namespace + "-" + name;
62
+
63
+ if ( !prototype ) {
64
+ prototype = base;
65
+ base = $.Widget;
66
+ }
67
+
68
+ if ( $.isArray( prototype ) ) {
69
+ prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
70
+ }
71
+
72
+ // Create selector for plugin
73
+ $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
74
+ return !!$.data( elem, fullName );
75
+ };
76
+
77
+ $[ namespace ] = $[ namespace ] || {};
78
+ existingConstructor = $[ namespace ][ name ];
79
+ constructor = $[ namespace ][ name ] = function( options, element ) {
80
+
81
+ // Allow instantiation without "new" keyword
82
+ if ( !this._createWidget ) {
83
+ return new constructor( options, element );
84
+ }
85
+
86
+ // Allow instantiation without initializing for simple inheritance
87
+ // must use "new" keyword (the code above always passes args)
88
+ if ( arguments.length ) {
89
+ this._createWidget( options, element );
90
+ }
91
+ };
92
+
93
+ // Extend with the existing constructor to carry over any static properties
94
+ $.extend( constructor, existingConstructor, {
95
+ version: prototype.version,
96
+
97
+ // Copy the object used to create the prototype in case we need to
98
+ // redefine the widget later
99
+ _proto: $.extend( {}, prototype ),
100
+
101
+ // Track widgets that inherit from this widget in case this widget is
102
+ // redefined after a widget inherits from it
103
+ _childConstructors: []
104
+ } );
105
+
106
+ basePrototype = new base();
107
+
108
+ // We need to make the options hash a property directly on the new instance
109
+ // otherwise we'll modify the options hash on the prototype that we're
110
+ // inheriting from
111
+ basePrototype.options = $.widget.extend( {}, basePrototype.options );
112
+ $.each( prototype, function( prop, value ) {
113
+ if ( !$.isFunction( value ) ) {
114
+ proxiedPrototype[ prop ] = value;
115
+ return;
116
+ }
117
+ proxiedPrototype[ prop ] = ( function() {
118
+ function _super() {
119
+ return base.prototype[ prop ].apply( this, arguments );
120
+ }
121
+
122
+ function _superApply( args ) {
123
+ return base.prototype[ prop ].apply( this, args );
124
+ }
125
+
126
+ return function() {
127
+ var __super = this._super;
128
+ var __superApply = this._superApply;
129
+ var returnValue;
130
+
131
+ this._super = _super;
132
+ this._superApply = _superApply;
133
+
134
+ returnValue = value.apply( this, arguments );
135
+
136
+ this._super = __super;
137
+ this._superApply = __superApply;
138
+
139
+ return returnValue;
140
+ };
141
+ } )();
142
+ } );
143
+ constructor.prototype = $.widget.extend( basePrototype, {
144
+
145
+ // TODO: remove support for widgetEventPrefix
146
+ // always use the name + a colon as the prefix, e.g., draggable:start
147
+ // don't prefix for widgets that aren't DOM-based
148
+ widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
149
+ }, proxiedPrototype, {
150
+ constructor: constructor,
151
+ namespace: namespace,
152
+ widgetName: name,
153
+ widgetFullName: fullName
154
+ } );
155
+
156
+ // If this widget is being redefined then we need to find all widgets that
157
+ // are inheriting from it and redefine all of them so that they inherit from
158
+ // the new version of this widget. We're essentially trying to replace one
159
+ // level in the prototype chain.
160
+ if ( existingConstructor ) {
161
+ $.each( existingConstructor._childConstructors, function( i, child ) {
162
+ var childPrototype = child.prototype;
163
+
164
+ // Redefine the child widget using the same prototype that was
165
+ // originally used, but inherit from the new version of the base
166
+ $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
167
+ child._proto );
168
+ } );
169
+
170
+ // Remove the list of existing child constructors from the old constructor
171
+ // so the old child constructors can be garbage collected
172
+ delete existingConstructor._childConstructors;
173
+ } else {
174
+ base._childConstructors.push( constructor );
175
+ }
176
+
177
+ $.widget.bridge( name, constructor );
178
+
179
+ return constructor;
180
+ };
181
+
182
+ $.widget.extend = function( target ) {
183
+ var input = widgetSlice.call( arguments, 1 );
184
+ var inputIndex = 0;
185
+ var inputLength = input.length;
186
+ var key;
187
+ var value;
188
+
189
+ for ( ; inputIndex < inputLength; inputIndex++ ) {
190
+ for ( key in input[ inputIndex ] ) {
191
+ value = input[ inputIndex ][ key ];
192
+ if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
193
+
194
+ // Clone objects
195
+ if ( $.isPlainObject( value ) ) {
196
+ target[ key ] = $.isPlainObject( target[ key ] ) ?
197
+ $.widget.extend( {}, target[ key ], value ) :
198
+
199
+ // Don't extend strings, arrays, etc. with objects
200
+ $.widget.extend( {}, value );
201
+
202
+ // Copy everything else by reference
203
+ } else {
204
+ target[ key ] = value;
205
+ }
206
+ }
207
+ }
208
+ }
209
+ return target;
210
+ };
211
+
212
+ $.widget.bridge = function( name, object ) {
213
+ var fullName = object.prototype.widgetFullName || name;
214
+ $.fn[ name ] = function( options ) {
215
+ var isMethodCall = typeof options === "string";
216
+ var args = widgetSlice.call( arguments, 1 );
217
+ var returnValue = this;
218
+
219
+ if ( isMethodCall ) {
220
+
221
+ // If this is an empty collection, we need to have the instance method
222
+ // return undefined instead of the jQuery instance
223
+ if ( !this.length && options === "instance" ) {
224
+ returnValue = undefined;
225
+ } else {
226
+ this.each( function() {
227
+ var methodValue;
228
+ var instance = $.data( this, fullName );
229
+
230
+ if ( options === "instance" ) {
231
+ returnValue = instance;
232
+ return false;
233
+ }
234
+
235
+ if ( !instance ) {
236
+ return $.error( "cannot call methods on " + name +
237
+ " prior to initialization; " +
238
+ "attempted to call method '" + options + "'" );
239
+ }
240
+
241
+ if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
242
+ return $.error( "no such method '" + options + "' for " + name +
243
+ " widget instance" );
244
+ }
245
+
246
+ methodValue = instance[ options ].apply( instance, args );
247
+
248
+ if ( methodValue !== instance && methodValue !== undefined ) {
249
+ returnValue = methodValue && methodValue.jquery ?
250
+ returnValue.pushStack( methodValue.get() ) :
251
+ methodValue;
252
+ return false;
253
+ }
254
+ } );
255
+ }
256
+ } else {
257
+
258
+ // Allow multiple hashes to be passed on init
259
+ if ( args.length ) {
260
+ options = $.widget.extend.apply( null, [ options ].concat( args ) );
261
+ }
262
+
263
+ this.each( function() {
264
+ var instance = $.data( this, fullName );
265
+ if ( instance ) {
266
+ instance.option( options || {} );
267
+ if ( instance._init ) {
268
+ instance._init();
269
+ }
270
+ } else {
271
+ $.data( this, fullName, new object( options, this ) );
272
+ }
273
+ } );
274
+ }
275
+
276
+ return returnValue;
277
+ };
278
+ };
279
+
280
+ $.Widget = function( /* options, element */ ) {};
281
+ $.Widget._childConstructors = [];
282
+
283
+ $.Widget.prototype = {
284
+ widgetName: "widget",
285
+ widgetEventPrefix: "",
286
+ defaultElement: "<div>",
287
+
288
+ options: {
289
+ classes: {},
290
+ disabled: false,
291
+
292
+ // Callbacks
293
+ create: null
294
+ },
295
+
296
+ _createWidget: function( options, element ) {
297
+ element = $( element || this.defaultElement || this )[ 0 ];
298
+ this.element = $( element );
299
+ this.uuid = widgetUuid++;
300
+ this.eventNamespace = "." + this.widgetName + this.uuid;
301
+
302
+ this.bindings = $();
303
+ this.hoverable = $();
304
+ this.focusable = $();
305
+ this.classesElementLookup = {};
306
+
307
+ if ( element !== this ) {
308
+ $.data( element, this.widgetFullName, this );
309
+ this._on( true, this.element, {
310
+ remove: function( event ) {
311
+ if ( event.target === element ) {
312
+ this.destroy();
313
+ }
314
+ }
315
+ } );
316
+ this.document = $( element.style ?
317
+
318
+ // Element within the document
319
+ element.ownerDocument :
320
+
321
+ // Element is window or document
322
+ element.document || element );
323
+ this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
324
+ }
325
+
326
+ this.options = $.widget.extend( {},
327
+ this.options,
328
+ this._getCreateOptions(),
329
+ options );
330
+
331
+ this._create();
332
+
333
+ if ( this.options.disabled ) {
334
+ this._setOptionDisabled( this.options.disabled );
335
+ }
336
+
337
+ this._trigger( "create", null, this._getCreateEventData() );
338
+ this._init();
339
+ },
340
+
341
+ _getCreateOptions: function() {
342
+ return {};
343
+ },
344
+
345
+ _getCreateEventData: $.noop,
346
+
347
+ _create: $.noop,
348
+
349
+ _init: $.noop,
350
+
351
+ destroy: function() {
352
+ var that = this;
353
+
354
+ this._destroy();
355
+ $.each( this.classesElementLookup, function( key, value ) {
356
+ that._removeClass( value, key );
357
+ } );
358
+
359
+ // We can probably remove the unbind calls in 2.0
360
+ // all event bindings should go through this._on()
361
+ this.element
362
+ .off( this.eventNamespace )
363
+ .removeData( this.widgetFullName );
364
+ this.widget()
365
+ .off( this.eventNamespace )
366
+ .removeAttr( "aria-disabled" );
367
+
368
+ // Clean up events and states
369
+ this.bindings.off( this.eventNamespace );
370
+ },
371
+
372
+ _destroy: $.noop,
373
+
374
+ widget: function() {
375
+ return this.element;
376
+ },
377
+
378
+ option: function( key, value ) {
379
+ var options = key;
380
+ var parts;
381
+ var curOption;
382
+ var i;
383
+
384
+ if ( arguments.length === 0 ) {
385
+
386
+ // Don't return a reference to the internal hash
387
+ return $.widget.extend( {}, this.options );
388
+ }
389
+
390
+ if ( typeof key === "string" ) {
391
+
392
+ // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
393
+ options = {};
394
+ parts = key.split( "." );
395
+ key = parts.shift();
396
+ if ( parts.length ) {
397
+ curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
398
+ for ( i = 0; i < parts.length - 1; i++ ) {
399
+ curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
400
+ curOption = curOption[ parts[ i ] ];
401
+ }
402
+ key = parts.pop();
403
+ if ( arguments.length === 1 ) {
404
+ return curOption[ key ] === undefined ? null : curOption[ key ];
405
+ }
406
+ curOption[ key ] = value;
407
+ } else {
408
+ if ( arguments.length === 1 ) {
409
+ return this.options[ key ] === undefined ? null : this.options[ key ];
410
+ }
411
+ options[ key ] = value;
412
+ }
413
+ }
414
+
415
+ this._setOptions( options );
416
+
417
+ return this;
418
+ },
419
+
420
+ _setOptions: function( options ) {
421
+ var key;
422
+
423
+ for ( key in options ) {
424
+ this._setOption( key, options[ key ] );
425
+ }
426
+
427
+ return this;
428
+ },
429
+
430
+ _setOption: function( key, value ) {
431
+ if ( key === "classes" ) {
432
+ this._setOptionClasses( value );
433
+ }
434
+
435
+ this.options[ key ] = value;
436
+
437
+ if ( key === "disabled" ) {
438
+ this._setOptionDisabled( value );
439
+ }
440
+
441
+ return this;
442
+ },
443
+
444
+ _setOptionClasses: function( value ) {
445
+ var classKey, elements, currentElements;
446
+
447
+ for ( classKey in value ) {
448
+ currentElements = this.classesElementLookup[ classKey ];
449
+ if ( value[ classKey ] === this.options.classes[ classKey ] ||
450
+ !currentElements ||
451
+ !currentElements.length ) {
452
+ continue;
453
+ }
454
+
455
+ // We are doing this to create a new jQuery object because the _removeClass() call
456
+ // on the next line is going to destroy the reference to the current elements being
457
+ // tracked. We need to save a copy of this collection so that we can add the new classes
458
+ // below.
459
+ elements = $( currentElements.get() );
460
+ this._removeClass( currentElements, classKey );
461
+
462
+ // We don't use _addClass() here, because that uses this.options.classes
463
+ // for generating the string of classes. We want to use the value passed in from
464
+ // _setOption(), this is the new value of the classes option which was passed to
465
+ // _setOption(). We pass this value directly to _classes().
466
+ elements.addClass( this._classes( {
467
+ element: elements,
468
+ keys: classKey,
469
+ classes: value,
470
+ add: true
471
+ } ) );
472
+ }
473
+ },
474
+
475
+ _setOptionDisabled: function( value ) {
476
+ this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
477
+
478
+ // If the widget is becoming disabled, then nothing is interactive
479
+ if ( value ) {
480
+ this._removeClass( this.hoverable, null, "ui-state-hover" );
481
+ this._removeClass( this.focusable, null, "ui-state-focus" );
482
+ }
483
+ },
484
+
485
+ enable: function() {
486
+ return this._setOptions( { disabled: false } );
487
+ },
488
+
489
+ disable: function() {
490
+ return this._setOptions( { disabled: true } );
491
+ },
492
+
493
+ _classes: function( options ) {
494
+ var full = [];
495
+ var that = this;
496
+
497
+ options = $.extend( {
498
+ element: this.element,
499
+ classes: this.options.classes || {}
500
+ }, options );
501
+
502
+ function processClassString( classes, checkOption ) {
503
+ var current, i;
504
+ for ( i = 0; i < classes.length; i++ ) {
505
+ current = that.classesElementLookup[ classes[ i ] ] || $();
506
+ if ( options.add ) {
507
+ current = $( $.unique( current.get().concat( options.element.get() ) ) );
508
+ } else {
509
+ current = $( current.not( options.element ).get() );
510
+ }
511
+ that.classesElementLookup[ classes[ i ] ] = current;
512
+ full.push( classes[ i ] );
513
+ if ( checkOption && options.classes[ classes[ i ] ] ) {
514
+ full.push( options.classes[ classes[ i ] ] );
515
+ }
516
+ }
517
+ }
518
+
519
+ this._on( options.element, {
520
+ "remove": "_untrackClassesElement"
521
+ } );
522
+
523
+ if ( options.keys ) {
524
+ processClassString( options.keys.match( /\S+/g ) || [], true );
525
+ }
526
+ if ( options.extra ) {
527
+ processClassString( options.extra.match( /\S+/g ) || [] );
528
+ }
529
+
530
+ return full.join( " " );
531
+ },
532
+
533
+ _untrackClassesElement: function( event ) {
534
+ var that = this;
535
+ $.each( that.classesElementLookup, function( key, value ) {
536
+ if ( $.inArray( event.target, value ) !== -1 ) {
537
+ that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
538
+ }
539
+ } );
540
+ },
541
+
542
+ _removeClass: function( element, keys, extra ) {
543
+ return this._toggleClass( element, keys, extra, false );
544
+ },
545
+
546
+ _addClass: function( element, keys, extra ) {
547
+ return this._toggleClass( element, keys, extra, true );
548
+ },
549
+
550
+ _toggleClass: function( element, keys, extra, add ) {
551
+ add = ( typeof add === "boolean" ) ? add : extra;
552
+ var shift = ( typeof element === "string" || element === null ),
553
+ options = {
554
+ extra: shift ? keys : extra,
555
+ keys: shift ? element : keys,
556
+ element: shift ? this.element : element,
557
+ add: add
558
+ };
559
+ options.element.toggleClass( this._classes( options ), add );
560
+ return this;
561
+ },
562
+
563
+ _on: function( suppressDisabledCheck, element, handlers ) {
564
+ var delegateElement;
565
+ var instance = this;
566
+
567
+ // No suppressDisabledCheck flag, shuffle arguments
568
+ if ( typeof suppressDisabledCheck !== "boolean" ) {
569
+ handlers = element;
570
+ element = suppressDisabledCheck;
571
+ suppressDisabledCheck = false;
572
+ }
573
+
574
+ // No element argument, shuffle and use this.element
575
+ if ( !handlers ) {
576
+ handlers = element;
577
+ element = this.element;
578
+ delegateElement = this.widget();
579
+ } else {
580
+ element = delegateElement = $( element );
581
+ this.bindings = this.bindings.add( element );
582
+ }
583
+
584
+ $.each( handlers, function( event, handler ) {
585
+ function handlerProxy() {
586
+
587
+ // Allow widgets to customize the disabled handling
588
+ // - disabled as an array instead of boolean
589
+ // - disabled class as method for disabling individual parts
590
+ if ( !suppressDisabledCheck &&
591
+ ( instance.options.disabled === true ||
592
+ $( this ).hasClass( "ui-state-disabled" ) ) ) {
593
+ return;
594
+ }
595
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
596
+ .apply( instance, arguments );
597
+ }
598
+
599
+ // Copy the guid so direct unbinding works
600
+ if ( typeof handler !== "string" ) {
601
+ handlerProxy.guid = handler.guid =
602
+ handler.guid || handlerProxy.guid || $.guid++;
603
+ }
604
+
605
+ var match = event.match( /^([\w:-]*)\s*(.*)$/ );
606
+ var eventName = match[ 1 ] + instance.eventNamespace;
607
+ var selector = match[ 2 ];
608
+
609
+ if ( selector ) {
610
+ delegateElement.on( eventName, selector, handlerProxy );
611
+ } else {
612
+ element.on( eventName, handlerProxy );
613
+ }
614
+ } );
615
+ },
616
+
617
+ _off: function( element, eventName ) {
618
+ eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
619
+ this.eventNamespace;
620
+ element.off( eventName ).off( eventName );
621
+
622
+ // Clear the stack to avoid memory leaks (#10056)
623
+ this.bindings = $( this.bindings.not( element ).get() );
624
+ this.focusable = $( this.focusable.not( element ).get() );
625
+ this.hoverable = $( this.hoverable.not( element ).get() );
626
+ },
627
+
628
+ _delay: function( handler, delay ) {
629
+ function handlerProxy() {
630
+ return ( typeof handler === "string" ? instance[ handler ] : handler )
631
+ .apply( instance, arguments );
632
+ }
633
+ var instance = this;
634
+ return setTimeout( handlerProxy, delay || 0 );
635
+ },
636
+
637
+ _hoverable: function( element ) {
638
+ this.hoverable = this.hoverable.add( element );
639
+ this._on( element, {
640
+ mouseenter: function( event ) {
641
+ this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
642
+ },
643
+ mouseleave: function( event ) {
644
+ this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
645
+ }
646
+ } );
647
+ },
648
+
649
+ _focusable: function( element ) {
650
+ this.focusable = this.focusable.add( element );
651
+ this._on( element, {
652
+ focusin: function( event ) {
653
+ this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
654
+ },
655
+ focusout: function( event ) {
656
+ this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
657
+ }
658
+ } );
659
+ },
660
+
661
+ _trigger: function( type, event, data ) {
662
+ var prop, orig;
663
+ var callback = this.options[ type ];
664
+
665
+ data = data || {};
666
+ event = $.Event( event );
667
+ event.type = ( type === this.widgetEventPrefix ?
668
+ type :
669
+ this.widgetEventPrefix + type ).toLowerCase();
670
+
671
+ // The original event may come from any element
672
+ // so we need to reset the target on the new event
673
+ event.target = this.element[ 0 ];
674
+
675
+ // Copy original event properties over to the new event
676
+ orig = event.originalEvent;
677
+ if ( orig ) {
678
+ for ( prop in orig ) {
679
+ if ( !( prop in event ) ) {
680
+ event[ prop ] = orig[ prop ];
681
+ }
682
+ }
683
+ }
684
+
685
+ this.element.trigger( event, data );
686
+ return !( $.isFunction( callback ) &&
687
+ callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
688
+ event.isDefaultPrevented() );
689
+ }
690
+ };
691
+
692
+ $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
693
+ $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
694
+ if ( typeof options === "string" ) {
695
+ options = { effect: options };
696
+ }
697
+
698
+ var hasOptions;
699
+ var effectName = !options ?
700
+ method :
701
+ options === true || typeof options === "number" ?
702
+ defaultEffect :
703
+ options.effect || defaultEffect;
704
+
705
+ options = options || {};
706
+ if ( typeof options === "number" ) {
707
+ options = { duration: options };
708
+ }
709
+
710
+ hasOptions = !$.isEmptyObject( options );
711
+ options.complete = callback;
712
+
713
+ if ( options.delay ) {
714
+ element.delay( options.delay );
715
+ }
716
+
717
+ if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
718
+ element[ method ]( options );
719
+ } else if ( effectName !== method && element[ effectName ] ) {
720
+ element[ effectName ]( options.duration, options.easing, callback );
721
+ } else {
722
+ element.queue( function( next ) {
723
+ $( this )[ method ]();
724
+ if ( callback ) {
725
+ callback.call( element[ 0 ] );
726
+ }
727
+ next();
728
+ } );
729
+ }
730
+ };
731
+ } );
732
+
733
+ return $.widget;
734
+
735
+ } ) );