rails_admin 2.3.0 → 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.
- checksums.yaml +4 -4
- data/Gemfile +9 -11
- data/README.md +37 -31
- data/Rakefile +2 -2
- data/app/assets/javascripts/rails_admin.js +21 -0
- data/app/assets/stylesheets/rails_admin/custom/mixins.scss +1 -1
- data/app/assets/stylesheets/rails_admin/custom/variables.scss +1 -1
- data/app/assets/stylesheets/rails_admin.scss.erb +76 -0
- data/app/controllers/rails_admin/application_controller.rb +4 -3
- data/app/controllers/rails_admin/main_controller.rb +43 -24
- data/app/helpers/rails_admin/application_helper.rb +69 -52
- data/app/helpers/rails_admin/form_builder.rb +5 -4
- data/app/helpers/rails_admin/main_helper.rb +27 -43
- data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.erb +5 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.erb +13 -0
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.erb +9 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.erb +6 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.erb +9 -0
- data/app/views/layouts/rails_admin/_head.html.erb +17 -0
- data/app/views/layouts/rails_admin/_navigation.html.erb +21 -0
- data/app/views/layouts/rails_admin/_secondary_navigation.html.erb +24 -0
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.erb +9 -0
- data/app/views/layouts/rails_admin/application.html.erb +27 -0
- data/app/views/layouts/rails_admin/modal.js.erb +7 -0
- data/app/views/layouts/rails_admin/pjax.html.erb +20 -0
- data/app/views/rails_admin/main/_dashboard_history.html.erb +45 -0
- data/app/views/rails_admin/main/_delete_notice.html.erb +35 -0
- data/app/views/rails_admin/main/_form_action_text.html.erb +7 -0
- data/app/views/rails_admin/main/_form_boolean.html.erb +16 -0
- data/app/views/rails_admin/main/{_form_ck_editor.html.haml → _form_ck_editor.html.erb} +3 -3
- data/app/views/rails_admin/main/_form_code_mirror.html.erb +9 -0
- data/app/views/rails_admin/main/_form_colorpicker.html.erb +1 -0
- data/app/views/rails_admin/main/_form_datetime.html.erb +9 -0
- data/app/views/rails_admin/main/_form_enumeration.html.erb +21 -0
- data/app/views/rails_admin/main/_form_field.html.erb +1 -0
- data/app/views/rails_admin/main/_form_file_upload.html.erb +17 -0
- data/app/views/rails_admin/main/{_form_filtering_multiselect.html.haml → _form_filtering_multiselect.html.erb} +11 -11
- data/app/views/rails_admin/main/{_form_filtering_select.html.haml → _form_filtering_select.html.erb} +13 -12
- data/app/views/rails_admin/main/_form_froala.html.erb +8 -0
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.erb +20 -0
- data/app/views/rails_admin/main/_form_nested_many.html.erb +21 -0
- data/app/views/rails_admin/main/_form_nested_one.html.erb +21 -0
- data/app/views/rails_admin/main/_form_polymorphic_association.html.erb +27 -0
- data/app/views/rails_admin/main/_form_simple_mde.html.erb +8 -0
- data/app/views/rails_admin/main/_form_text.html.erb +1 -0
- data/app/views/rails_admin/main/_form_wysihtml5.html.erb +8 -0
- data/app/views/rails_admin/main/_submit_buttons.html.erb +25 -0
- data/app/views/rails_admin/main/bulk_delete.html.erb +19 -0
- data/app/views/rails_admin/main/dashboard.html.erb +64 -0
- data/app/views/rails_admin/main/delete.html.erb +21 -0
- data/app/views/rails_admin/main/edit.html.erb +3 -0
- data/app/views/rails_admin/main/export.html.erb +146 -0
- data/app/views/rails_admin/main/history.html.erb +78 -0
- data/app/views/rails_admin/main/index.html.erb +193 -0
- data/app/views/rails_admin/main/new.html.erb +3 -0
- data/app/views/rails_admin/main/show.html.erb +28 -0
- data/config/initializers/active_record_extensions.rb +3 -1
- data/config/initializers/mongoid_extensions.rb +1 -1
- data/config/locales/rails_admin.en.yml +5 -1
- data/lib/generators/rails_admin/install_generator.rb +51 -3
- data/lib/generators/rails_admin/templates/environment.js +6 -0
- data/lib/generators/rails_admin/templates/initializer.erb +2 -1
- data/lib/generators/rails_admin/templates/rails_admin.js.erb +2 -0
- data/lib/generators/rails_admin/templates/rails_admin.scss +1 -0
- data/lib/generators/rails_admin/templates/webpack.config.js +32 -0
- data/lib/rails_admin/abstract_model.rb +24 -10
- data/lib/rails_admin/adapters/active_record/association.rb +20 -1
- data/lib/rails_admin/adapters/active_record/object_extension.rb +29 -0
- data/lib/rails_admin/adapters/active_record/property.rb +1 -1
- data/lib/rails_admin/adapters/active_record.rb +19 -21
- data/lib/rails_admin/adapters/mongoid/association.rb +38 -9
- data/lib/rails_admin/adapters/mongoid/bson.rb +4 -5
- data/lib/rails_admin/adapters/mongoid/extension.rb +3 -1
- data/lib/rails_admin/adapters/mongoid/object_extension.rb +32 -0
- data/lib/rails_admin/adapters/mongoid/property.rb +2 -2
- data/lib/rails_admin/adapters/mongoid.rb +25 -19
- data/lib/rails_admin/config/actions/base.rb +7 -2
- data/lib/rails_admin/config/actions/bulk_delete.rb +2 -2
- data/lib/rails_admin/config/actions/dashboard.rb +4 -3
- data/lib/rails_admin/config/actions/delete.rb +5 -9
- data/lib/rails_admin/config/actions/edit.rb +7 -7
- data/lib/rails_admin/config/actions/export.rb +2 -2
- data/lib/rails_admin/config/actions/history_index.rb +2 -2
- data/lib/rails_admin/config/actions/history_show.rb +2 -2
- data/lib/rails_admin/config/actions/index.rb +5 -7
- data/lib/rails_admin/config/actions/new.rb +9 -9
- data/lib/rails_admin/config/actions/show.rb +1 -1
- data/lib/rails_admin/config/actions/show_in_app.rb +6 -2
- data/lib/rails_admin/config/actions.rb +4 -4
- data/lib/rails_admin/config/configurable.rb +2 -2
- data/lib/rails_admin/config/fields/association.rb +15 -12
- data/lib/rails_admin/config/fields/base.rb +44 -24
- data/lib/rails_admin/config/fields/factories/active_storage.rb +1 -0
- data/lib/rails_admin/config/fields/factories/association.rb +6 -8
- data/lib/rails_admin/config/fields/factories/carrierwave.rb +2 -1
- data/lib/rails_admin/config/fields/factories/devise.rb +2 -1
- data/lib/rails_admin/config/fields/factories/dragonfly.rb +2 -1
- data/lib/rails_admin/config/fields/factories/paperclip.rb +2 -1
- data/lib/rails_admin/config/fields/factories/shrine.rb +1 -1
- data/lib/rails_admin/config/fields/group.rb +1 -2
- data/lib/rails_admin/config/fields/types/active_record_enum.rb +2 -0
- data/lib/rails_admin/config/fields/types/active_storage.rb +9 -7
- data/lib/rails_admin/config/fields/types/all.rb +1 -0
- data/lib/rails_admin/config/fields/types/belongs_to_association.rb +4 -12
- data/lib/rails_admin/config/fields/types/boolean.rb +32 -8
- data/lib/rails_admin/config/fields/types/carrierwave.rb +1 -0
- data/lib/rails_admin/config/fields/types/citext.rb +13 -0
- data/lib/rails_admin/config/fields/types/color.rb +6 -2
- data/lib/rails_admin/config/fields/types/date.rb +5 -8
- data/lib/rails_admin/config/fields/types/datetime.rb +18 -21
- data/lib/rails_admin/config/fields/types/decimal.rb +9 -2
- data/lib/rails_admin/config/fields/types/dragonfly.rb +3 -1
- data/lib/rails_admin/config/fields/types/enum.rb +1 -1
- data/lib/rails_admin/config/fields/types/file_upload.rb +4 -3
- data/lib/rails_admin/config/fields/types/float.rb +9 -2
- data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -5
- data/lib/rails_admin/config/fields/types/has_one_association.rb +1 -13
- data/lib/rails_admin/config/fields/types/integer.rb +2 -6
- data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +8 -6
- data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +1 -0
- data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +4 -3
- data/lib/rails_admin/config/fields/types/numeric.rb +18 -0
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +3 -2
- data/lib/rails_admin/config/fields/types/string.rb +1 -1
- data/lib/rails_admin/config/fields/types/time.rb +1 -4
- data/lib/rails_admin/config/fields/types/timestamp.rb +0 -4
- data/lib/rails_admin/config/fields/types.rb +1 -1
- data/lib/rails_admin/config/fields.rb +3 -1
- data/lib/rails_admin/config/has_fields.rb +5 -6
- data/lib/rails_admin/config/hideable.rb +1 -1
- data/lib/rails_admin/config/inspectable.rb +1 -3
- data/lib/rails_admin/config/model.rb +10 -10
- data/lib/rails_admin/config/sections/base.rb +2 -3
- data/lib/rails_admin/config/sections/list.rb +4 -15
- data/lib/rails_admin/config/sections.rb +1 -1
- data/lib/rails_admin/config.rb +73 -38
- data/lib/rails_admin/engine.rb +36 -23
- data/lib/rails_admin/extension.rb +6 -14
- data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +4 -2
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +12 -7
- data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +6 -7
- data/lib/rails_admin/support/csv_converter.rb +12 -13
- data/lib/rails_admin/support/datetime.rb +40 -74
- data/lib/rails_admin/support/esmodule_preprocessor.rb +32 -0
- data/lib/rails_admin/support/hash_helper.rb +6 -5
- data/lib/rails_admin/version.rb +7 -3
- data/lib/rails_admin.rb +1 -4
- data/lib/tasks/rails_admin.rake +3 -3
- data/package.json +28 -0
- data/src/rails_admin/base.js +21 -0
- data/src/rails_admin/filter-box.js +405 -0
- data/src/rails_admin/filtering-multiselect.js +394 -0
- data/src/rails_admin/filtering-select.js +302 -0
- data/src/rails_admin/i18n.js +19 -0
- data/src/rails_admin/nested-form-hooks.js +100 -0
- data/src/rails_admin/remote-form.js +190 -0
- data/src/rails_admin/sidescroll.js +20 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/theming.scss +93 -34
- data/src/rails_admin/styles/base.scss +64 -0
- data/src/rails_admin/styles/filtering-multiselect.scss +53 -0
- data/src/rails_admin/styles/filtering-select.scss +70 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/theming.scss +23 -21
- data/src/rails_admin/styles/themes/cerulean/variables.scss +830 -0
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/mixins.scss +1 -1
- data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/variables.scss +1 -1
- data/src/rails_admin/styles/widgets.scss +35 -0
- data/src/rails_admin/ui.js +172 -0
- data/src/rails_admin/vendor/jquery.pjax.js +899 -0
- data/src/rails_admin/vendor/jquery_nested_form.js +122 -0
- data/src/rails_admin/widgets.js +512 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.svg +5034 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/rails_admin/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/data.js +41 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/effect.js +1637 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/ie.js +17 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/keycode.js +47 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/position.js +500 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/safe-active-element.js +42 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/scroll-parent.js +47 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/unique-id.js +51 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/version.js +17 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widget.js +735 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/autocomplete.js +689 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/menu.js +680 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/mouse.js +230 -0
- data/vendor/assets/javascripts/rails_admin/jquery-ui/widgets/sortable.js +1561 -0
- data/vendor/assets/javascripts/rails_admin/jquery3.js +10872 -0
- data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +4476 -2216
- metadata +118 -263
- data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/icon_sprite.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/progress_bar.gif +0 -0
- data/app/assets/images/rails_admin/aristo/images/slider_handles.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/images/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/images/rails_admin/bullet_black.png +0 -0
- data/app/assets/images/rails_admin/bullet_white.png +0 -0
- data/app/assets/images/rails_admin/calendar.png +0 -0
- data/app/assets/images/rails_admin/clock.png +0 -0
- data/app/assets/images/rails_admin/logo.png +0 -0
- data/app/assets/images/rails_admin/magnifier.png +0 -0
- data/app/assets/images/rails_admin/multiselect/icon_sprite.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-dark.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-n-light.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-dark.png +0 -0
- data/app/assets/images/rails_admin/multiselect/ui-icon-circle-triangle-s-light.png +0 -0
- data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +0 -8
- data/app/assets/javascripts/rails_admin/jquery.migrate.js +0 -3
- data/app/assets/javascripts/rails_admin/ra.filter-box.js +0 -253
- data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +0 -331
- data/app/assets/javascripts/rails_admin/ra.filtering-select.js +0 -294
- data/app/assets/javascripts/rails_admin/ra.i18n.js +0 -28
- data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +0 -59
- data/app/assets/javascripts/rails_admin/ra.remote-form.js +0 -155
- data/app/assets/javascripts/rails_admin/ra.sidescroll.js +0 -31
- data/app/assets/javascripts/rails_admin/ra.widgets.js +0 -379
- data/app/assets/javascripts/rails_admin/rails_admin.js +0 -21
- data/app/assets/javascripts/rails_admin/ui.js +0 -135
- data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/icon_sprite.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/progress_bar.gif +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/slider_handles.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_222222_256x240.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/ui-icons_454545_256x240.png +0 -0
- data/app/assets/stylesheets/rails_admin/aristo/jquery-ui-1.8.7.custom.scss +0 -733
- data/app/assets/stylesheets/rails_admin/base/font-awesome-4-compability.scss +0 -153
- data/app/assets/stylesheets/rails_admin/ra.filtering-multiselect.scss +0 -88
- data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +0 -29
- data/app/assets/stylesheets/rails_admin/ra.widgets.scss +0 -17
- data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +0 -110
- data/app/assets/stylesheets/rails_admin/themes/cerulean/variables.scss +0 -857
- data/app/views/kaminari/ra-twitter-bootstrap/_gap.html.haml +0 -2
- data/app/views/kaminari/ra-twitter-bootstrap/_next_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/_paginator.html.haml +0 -9
- data/app/views/kaminari/ra-twitter-bootstrap/_prev_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +0 -4
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +0 -4
- data/app/views/layouts/rails_admin/_head.html.haml +0 -7
- data/app/views/layouts/rails_admin/_navigation.html.haml +0 -12
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +0 -10
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +0 -3
- data/app/views/layouts/rails_admin/application.html.haml +0 -16
- data/app/views/layouts/rails_admin/pjax.html.haml +0 -12
- data/app/views/rails_admin/main/_dashboard_history.html.haml +0 -21
- data/app/views/rails_admin/main/_delete_notice.html.haml +0 -24
- data/app/views/rails_admin/main/_form_action_text.html.haml +0 -7
- data/app/views/rails_admin/main/_form_boolean.html.haml +0 -3
- data/app/views/rails_admin/main/_form_code_mirror.html.haml +0 -9
- data/app/views/rails_admin/main/_form_colorpicker.html.haml +0 -1
- data/app/views/rails_admin/main/_form_datetime.html.haml +0 -5
- data/app/views/rails_admin/main/_form_enumeration.html.haml +0 -19
- data/app/views/rails_admin/main/_form_field.html.haml +0 -1
- data/app/views/rails_admin/main/_form_file_upload.html.haml +0 -17
- data/app/views/rails_admin/main/_form_froala.html.haml +0 -8
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +0 -16
- data/app/views/rails_admin/main/_form_nested_many.html.haml +0 -15
- data/app/views/rails_admin/main/_form_nested_one.html.haml +0 -17
- data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +0 -26
- data/app/views/rails_admin/main/_form_simple_mde.haml +0 -8
- data/app/views/rails_admin/main/_form_text.html.haml +0 -1
- data/app/views/rails_admin/main/_form_wysihtml5.html.haml +0 -8
- data/app/views/rails_admin/main/_submit_buttons.html.haml +0 -16
- data/app/views/rails_admin/main/bulk_delete.html.haml +0 -11
- data/app/views/rails_admin/main/dashboard.html.haml +0 -34
- data/app/views/rails_admin/main/delete.html.haml +0 -18
- data/app/views/rails_admin/main/edit.html.haml +0 -2
- data/app/views/rails_admin/main/export.html.haml +0 -92
- data/app/views/rails_admin/main/history.html.haml +0 -51
- data/app/views/rails_admin/main/index.html.haml +0 -126
- data/app/views/rails_admin/main/new.html.haml +0 -2
- data/app/views/rails_admin/main/show.html.haml +0 -15
- data/config/initializers/haml.rb +0 -5
- data/lib/rails_admin/adapters/active_record/abstract_object.rb +0 -38
- data/lib/rails_admin/adapters/active_record.rb.bak +0 -348
- data/lib/rails_admin/adapters/mongoid/abstract_object.rb +0 -42
- data/lib/rails_admin/bootstrap-sass/compass_functions.rb +0 -28
- data/lib/rails_admin/bootstrap-sass/sass_functions.rb +0 -16
- data/lib/rails_admin/bootstrap-sass.rb +0 -49
- data/lib/rails_admin/config/lazy_model.rb +0 -68
- data/lib/rails_admin/extensions/history/auditing_adapter.rb +0 -37
- data/lib/rails_admin/extensions/history/history.rb +0 -44
- data/lib/rails_admin/extensions/history.rb +0 -3
- data/lib/rails_admin/support/i18n.rb +0 -43
- data/vendor/assets/fonts/rails_admin/FontAwesome.otf +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.eot +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.svg +0 -2671
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff +0 -0
- data/vendor/assets/fonts/rails_admin/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_select.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_rgb_r.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/select.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/select2.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
- data/vendor/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -484
- data/vendor/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -182
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/README.txt +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/mixins.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/base/variables.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/cerulean/mixins.scss +0 -0
- /data/{app/assets/stylesheets/rails_admin → src/rails_admin/styles}/themes/default/theming.scss +0 -0
@@ -1,379 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
$(document).on('rails_admin.dom_ready', function(e, content) {
|
3
|
-
var $editors, array, config_options, goBootstrapWysihtml5s, goCkeditors, goCodeMirrors, goFroalaWysiwygs, goSimpleMDEs, options;
|
4
|
-
content = content ? content : $('form');
|
5
|
-
if (content.length) {
|
6
|
-
content.find('[data-color]').each(function() {
|
7
|
-
var that;
|
8
|
-
that = this;
|
9
|
-
return $(this).ColorPicker({
|
10
|
-
color: $(that).val(),
|
11
|
-
onShow: function(el) {
|
12
|
-
$(el).fadeIn(500);
|
13
|
-
return false;
|
14
|
-
},
|
15
|
-
onHide: function(el) {
|
16
|
-
$(el).fadeOut(500);
|
17
|
-
return false;
|
18
|
-
},
|
19
|
-
onChange: function(hsb, hex, rgb) {
|
20
|
-
$(that).val(hex);
|
21
|
-
$(that).css('backgroundColor', '#' + hex);
|
22
|
-
}
|
23
|
-
});
|
24
|
-
});
|
25
|
-
$.fn.datetimepicker.defaults.icons = {
|
26
|
-
time: 'fa fa-clock-o',
|
27
|
-
date: 'fa fa-calendar',
|
28
|
-
up: 'fa fa-chevron-up',
|
29
|
-
down: 'fa fa-chevron-down',
|
30
|
-
previous: 'fa fa-angle-double-left',
|
31
|
-
next: 'fa fa-angle-double-right',
|
32
|
-
today: 'fa fa-dot-circle-o',
|
33
|
-
clear: 'fa fa-trash',
|
34
|
-
close: 'fa fa-times'
|
35
|
-
};
|
36
|
-
content.find('[data-datetimepicker]').each(function() {
|
37
|
-
var options;
|
38
|
-
options = $(this).data('options');
|
39
|
-
$.extend(options, {
|
40
|
-
locale: RailsAdmin.I18n.locale
|
41
|
-
});
|
42
|
-
$(this).datetimepicker(options);
|
43
|
-
});
|
44
|
-
content.find('[data-enumeration]').each(function() {
|
45
|
-
if ($(this).is('[multiple]')) {
|
46
|
-
$(this).filteringMultiselect($(this).data('options'));
|
47
|
-
} else {
|
48
|
-
$(this).filteringSelect($(this).data('options'));
|
49
|
-
}
|
50
|
-
});
|
51
|
-
content.find('[data-fileupload]').each(function() {
|
52
|
-
var parent;
|
53
|
-
parent = $(this).closest('.controls');
|
54
|
-
parent.find('.btn-remove-image').on('click', function() {
|
55
|
-
$(this).siblings('[type=checkbox]').click();
|
56
|
-
parent.find('.toggle').toggle('slow');
|
57
|
-
$(this).toggleClass('btn-danger btn-info');
|
58
|
-
return false;
|
59
|
-
});
|
60
|
-
});
|
61
|
-
content.find('[data-fileupload]').change(function() {
|
62
|
-
var ext, image_container, input, reader;
|
63
|
-
input = this;
|
64
|
-
image_container = $("#" + input.id).parent().children(".preview");
|
65
|
-
if (!image_container.length) {
|
66
|
-
image_container = $("#" + input.id).parent().prepend($('<img />').addClass('preview').addClass('img-thumbnail')).find('img.preview');
|
67
|
-
image_container.parent().find('img:not(.preview)').hide();
|
68
|
-
}
|
69
|
-
ext = $("#" + input.id).val().split('.').pop().toLowerCase();
|
70
|
-
if (input.files && input.files[0] && $.inArray(ext, ['gif', 'png', 'jpg', 'jpeg', 'bmp']) !== -1) {
|
71
|
-
reader = new FileReader();
|
72
|
-
reader.onload = function(e) {
|
73
|
-
image_container.attr("src", e.target.result);
|
74
|
-
};
|
75
|
-
reader.readAsDataURL(input.files[0]);
|
76
|
-
image_container.show();
|
77
|
-
} else {
|
78
|
-
image_container.hide();
|
79
|
-
}
|
80
|
-
});
|
81
|
-
content.find('[data-multiple-fileupload]').each(function() {
|
82
|
-
$(this).closest('.controls').find('.btn-remove-image').on('click', function() {
|
83
|
-
$(this).siblings('[type=checkbox]').click();
|
84
|
-
$(this).parent('.toggle').toggle('slow');
|
85
|
-
$(this).toggleClass('btn-danger btn-info');
|
86
|
-
return false;
|
87
|
-
}).end().sortable({
|
88
|
-
items: '.sortables'
|
89
|
-
});
|
90
|
-
});
|
91
|
-
content.find('[data-multiple-fileupload]').change(function() {
|
92
|
-
var ext, file, i, image_container, input, len, ref, results;
|
93
|
-
input = this;
|
94
|
-
$("#" + input.id).parent().children(".preview").remove();
|
95
|
-
ref = input.files;
|
96
|
-
results = [];
|
97
|
-
for (i = 0, len = ref.length; i < len; i++) {
|
98
|
-
file = ref[i];
|
99
|
-
ext = file.name.split('.').pop().toLowerCase();
|
100
|
-
if ($.inArray(ext, ['gif', 'png', 'jpg', 'jpeg', 'bmp']) === -1) {
|
101
|
-
continue;
|
102
|
-
}
|
103
|
-
image_container = $('<img />').addClass('preview').addClass('img-thumbnail');
|
104
|
-
results.push((function(image_container) {
|
105
|
-
var reader;
|
106
|
-
reader = new FileReader();
|
107
|
-
reader.onload = function(e) {
|
108
|
-
image_container.attr("src", e.target.result);
|
109
|
-
};
|
110
|
-
reader.readAsDataURL(file);
|
111
|
-
return $("#" + input.id).parent().append($('<div></div>').addClass('preview').append(image_container));
|
112
|
-
})(image_container));
|
113
|
-
}
|
114
|
-
return results;
|
115
|
-
});
|
116
|
-
content.find('[data-filteringmultiselect]').each(function() {
|
117
|
-
$(this).filteringMultiselect($(this).data('options'));
|
118
|
-
if ($(this).parents("#modal").length) {
|
119
|
-
$(this).siblings('.btn').remove();
|
120
|
-
} else {
|
121
|
-
$(this).parents('.control-group').first().remoteForm();
|
122
|
-
}
|
123
|
-
});
|
124
|
-
content.find('[data-filteringselect]').each(function() {
|
125
|
-
$(this).filteringSelect($(this).data('options'));
|
126
|
-
if ($(this).parents("#modal").length) {
|
127
|
-
$(this).siblings('.btn').remove();
|
128
|
-
} else {
|
129
|
-
$(this).parents('.control-group').first().remoteForm();
|
130
|
-
}
|
131
|
-
});
|
132
|
-
content.find('[data-nestedmany]').each(function() {
|
133
|
-
var field, nav, tab_content, toggler;
|
134
|
-
field = $(this).parents('.control-group').first();
|
135
|
-
nav = field.find('> .controls > .nav');
|
136
|
-
tab_content = field.find('> .tab-content');
|
137
|
-
toggler = field.find('> .controls > .btn-group > .toggler');
|
138
|
-
tab_content.children('.fields:not(.tab-pane)').addClass('tab-pane').each(function() {
|
139
|
-
$(this).attr('id', 'unique-id-' + (new Date().getTime()) + Math.floor(Math.random() * 100000));
|
140
|
-
nav.append(
|
141
|
-
$('<li></li>').append(
|
142
|
-
$('<a></a>').attr('data-toggle', 'tab').attr('href', '#' + this.id).text($(this).children('.object-infos').data('object-label'))
|
143
|
-
)
|
144
|
-
);
|
145
|
-
});
|
146
|
-
if (nav.find("> li.active").length === 0) {
|
147
|
-
nav.find("> li > a[data-toggle='tab']:first").tab('show');
|
148
|
-
}
|
149
|
-
if (nav.children().length === 0) {
|
150
|
-
nav.hide();
|
151
|
-
tab_content.hide();
|
152
|
-
toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right');
|
153
|
-
} else {
|
154
|
-
if (toggler.hasClass('active')) {
|
155
|
-
nav.show();
|
156
|
-
tab_content.show();
|
157
|
-
toggler.children('i').addClass('icon-chevron-down');
|
158
|
-
} else {
|
159
|
-
nav.hide();
|
160
|
-
tab_content.hide();
|
161
|
-
toggler.children('i').addClass('icon-chevron-right');
|
162
|
-
}
|
163
|
-
}
|
164
|
-
});
|
165
|
-
content.find('[data-nestedone]').each(function() {
|
166
|
-
var field, first_tab, nav, tab_content, toggler;
|
167
|
-
field = $(this).parents('.control-group').first();
|
168
|
-
nav = field.find("> .controls > .nav");
|
169
|
-
tab_content = field.find("> .tab-content");
|
170
|
-
toggler = field.find('> .controls > .btn-group > .toggler');
|
171
|
-
tab_content.children(".fields:not(.tab-pane)").addClass('tab-pane active').each(function() {
|
172
|
-
field.find('> .controls .add_nested_fields').removeClass('add_nested_fields').text($(this).children('.object-infos').data('object-label'));
|
173
|
-
nav.append(
|
174
|
-
$('<li></li>').append(
|
175
|
-
$('<a></a>').attr('data-toggle', 'tab').attr('href', '#' + $(this).id).text($(this).children('.object-infos').data('object-label'))
|
176
|
-
)
|
177
|
-
);
|
178
|
-
});
|
179
|
-
first_tab = nav.find("> li > a[data-toggle='tab']:first");
|
180
|
-
first_tab.tab('show');
|
181
|
-
field.find("> .controls > [data-target]:first").html('<i class="icon-white"></i> ' + first_tab.html());
|
182
|
-
nav.hide();
|
183
|
-
if (nav.children().length === 0) {
|
184
|
-
nav.hide();
|
185
|
-
tab_content.hide();
|
186
|
-
toggler.addClass('disabled').removeClass('active').children('i').addClass('icon-chevron-right');
|
187
|
-
} else {
|
188
|
-
if (toggler.hasClass('active')) {
|
189
|
-
toggler.children('i').addClass('icon-chevron-down');
|
190
|
-
tab_content.show();
|
191
|
-
} else {
|
192
|
-
toggler.children('i').addClass('icon-chevron-right');
|
193
|
-
tab_content.hide();
|
194
|
-
}
|
195
|
-
}
|
196
|
-
});
|
197
|
-
content.find('[data-polymorphic]').each(function() {
|
198
|
-
var field, object_select, type_select, urls;
|
199
|
-
type_select = $(this);
|
200
|
-
field = type_select.parents('.control-group').first();
|
201
|
-
object_select = field.find('select').last();
|
202
|
-
urls = type_select.data('urls');
|
203
|
-
type_select.on('change', function(e) {
|
204
|
-
var selected_data, selected_type;
|
205
|
-
selected_type = type_select.val().toLowerCase();
|
206
|
-
selected_data = $("#" + selected_type + "-js-options").data('options');
|
207
|
-
object_select.data('options', selected_data);
|
208
|
-
object_select.filteringSelect("destroy");
|
209
|
-
object_select.filteringSelect(selected_data);
|
210
|
-
});
|
211
|
-
});
|
212
|
-
goSimpleMDEs = function() {
|
213
|
-
return content.find('[data-richtext=simplemde]').not('.simplemded').each(function(index, domEle) {
|
214
|
-
var instance_config, options;
|
215
|
-
options = $(this).data('options');
|
216
|
-
instance_config = options.instance_config;
|
217
|
-
new window.SimpleMDE($.extend(true, {
|
218
|
-
element: document.getElementById(this.id),
|
219
|
-
autosave: {
|
220
|
-
uniqueId: this.id
|
221
|
-
}
|
222
|
-
}, instance_config));
|
223
|
-
$(this).addClass('simplemded');
|
224
|
-
});
|
225
|
-
};
|
226
|
-
$editors = content.find('[data-richtext=simplemde]').not('.simplemded');
|
227
|
-
if ($editors.length) {
|
228
|
-
if (!window.SimpleMDE) {
|
229
|
-
options = $editors.first().data('options');
|
230
|
-
$('head').append('<link href="' + options['css_location'] + '" rel="stylesheet" media="all" type="text\/css">');
|
231
|
-
$.getScript(options['js_location'], function(script, textStatus, jqXHR) {
|
232
|
-
return goSimpleMDEs();
|
233
|
-
});
|
234
|
-
} else {
|
235
|
-
goSimpleMDEs();
|
236
|
-
}
|
237
|
-
}
|
238
|
-
goCkeditors = function() {
|
239
|
-
return content.find('[data-richtext=ckeditor]').not('.ckeditored').each(function(index, domEle) {
|
240
|
-
var instance;
|
241
|
-
try {
|
242
|
-
if (instance = window.CKEDITOR.instances[this.id]) {
|
243
|
-
instance.destroy(true);
|
244
|
-
}
|
245
|
-
} catch (error1) {}
|
246
|
-
window.CKEDITOR.replace(this, $(this).data('options').options);
|
247
|
-
$(this).addClass('ckeditored');
|
248
|
-
});
|
249
|
-
};
|
250
|
-
$editors = content.find('[data-richtext=ckeditor]').not('.ckeditored');
|
251
|
-
if ($editors.length) {
|
252
|
-
if (!window.CKEDITOR) {
|
253
|
-
options = $editors.first().data('options');
|
254
|
-
window.CKEDITOR_BASEPATH = options['base_location'];
|
255
|
-
$.getScript(options['jspath'], (function(_this) {
|
256
|
-
return function(script, textStatus, jqXHR) {
|
257
|
-
return goCkeditors();
|
258
|
-
};
|
259
|
-
})(this));
|
260
|
-
} else {
|
261
|
-
goCkeditors();
|
262
|
-
}
|
263
|
-
}
|
264
|
-
goCodeMirrors = (function(_this) {
|
265
|
-
return function(array) {
|
266
|
-
return array.each(function(index, domEle) {
|
267
|
-
var textarea;
|
268
|
-
options = $(this).data('options');
|
269
|
-
textarea = this;
|
270
|
-
$.getScript(options['locations']['mode'], function(script, textStatus, jqXHR) {
|
271
|
-
options = $(domEle).data('options');
|
272
|
-
$('head').append('<link href="' + options['locations']['theme'] + '" rel="stylesheet" media="all" type="text\/css">');
|
273
|
-
CodeMirror.fromTextArea(textarea, options['options']);
|
274
|
-
return $(textarea).addClass('codemirrored');
|
275
|
-
});
|
276
|
-
});
|
277
|
-
};
|
278
|
-
})(this);
|
279
|
-
array = content.find('[data-richtext=codemirror]').not('.codemirrored');
|
280
|
-
if (array.length) {
|
281
|
-
this.array = array;
|
282
|
-
if (!window.CodeMirror) {
|
283
|
-
options = $(array[0]).data('options');
|
284
|
-
$('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">');
|
285
|
-
$.getScript(options['jspath'], (function(_this) {
|
286
|
-
return function(script, textStatus, jqXHR) {
|
287
|
-
return goCodeMirrors(_this.array);
|
288
|
-
};
|
289
|
-
})(this));
|
290
|
-
} else {
|
291
|
-
goCodeMirrors(this.array);
|
292
|
-
}
|
293
|
-
}
|
294
|
-
goBootstrapWysihtml5s = (function(_this) {
|
295
|
-
return function(array, config_options) {
|
296
|
-
return array.each(function() {
|
297
|
-
$(this).addClass('bootstrap-wysihtml5ed');
|
298
|
-
$(this).closest('.controls').addClass('well');
|
299
|
-
$(this).wysihtml5(config_options);
|
300
|
-
});
|
301
|
-
};
|
302
|
-
})(this);
|
303
|
-
array = content.find('[data-richtext=bootstrap-wysihtml5]').not('.bootstrap-wysihtml5ed');
|
304
|
-
if (array.length) {
|
305
|
-
this.array = array;
|
306
|
-
options = $(array[0]).data('options');
|
307
|
-
config_options = $.parseJSON(options['config_options']);
|
308
|
-
if (!window.wysihtml5) {
|
309
|
-
$('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">');
|
310
|
-
$.getScript(options['jspath'], (function(_this) {
|
311
|
-
return function(script, textStatus, jqXHR) {
|
312
|
-
return goBootstrapWysihtml5s(_this.array, config_options);
|
313
|
-
};
|
314
|
-
})(this));
|
315
|
-
} else {
|
316
|
-
goBootstrapWysihtml5s(this.array, config_options);
|
317
|
-
}
|
318
|
-
}
|
319
|
-
goFroalaWysiwygs = (function(_this) {
|
320
|
-
return function(array) {
|
321
|
-
return array.each(function() {
|
322
|
-
var uploadEnabled;
|
323
|
-
options = $(this).data('options');
|
324
|
-
config_options = $.parseJSON(options['config_options']);
|
325
|
-
if (config_options) {
|
326
|
-
if (!config_options['inlineMode']) {
|
327
|
-
config_options['inlineMode'] = false;
|
328
|
-
}
|
329
|
-
} else {
|
330
|
-
config_options = {
|
331
|
-
inlineMode: false
|
332
|
-
};
|
333
|
-
}
|
334
|
-
uploadEnabled = config_options['imageUploadURL'] ? config_options['imageUploadParams'] = {
|
335
|
-
authenticity_token: $('meta[name=csrf-token]').attr('content')
|
336
|
-
} : void 0;
|
337
|
-
$(this).addClass('froala-wysiwyged');
|
338
|
-
$(this).froalaEditor(config_options);
|
339
|
-
if (uploadEnabled) {
|
340
|
-
$(this).on('froalaEditor.image.error', function(e, editor, error) {
|
341
|
-
alert("error uploading image: " + error.message);
|
342
|
-
}).on('froalaEditor.image.removed', function(e, editor, $img) {
|
343
|
-
editor.options.imageDeleteParams = {
|
344
|
-
src: $img.attr('src'),
|
345
|
-
authenticity_token: $('meta[name=csrf-token]').attr('content')
|
346
|
-
};
|
347
|
-
editor.deleteImage($img);
|
348
|
-
}).on('editable.imageDeleteSuccess', function(e, editor, data) {}).on('editable.imageDeleteError', function(e, editor, error) {
|
349
|
-
alert("error deleting image: " + error.message);
|
350
|
-
});
|
351
|
-
}
|
352
|
-
});
|
353
|
-
};
|
354
|
-
})(this);
|
355
|
-
array = content.find('[data-richtext=froala-wysiwyg]').not('.froala-wysiwyged');
|
356
|
-
if (array.length) {
|
357
|
-
options = $(array[0]).data('options');
|
358
|
-
if (!$.isFunction($.fn.editable)) {
|
359
|
-
$('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">');
|
360
|
-
$.getScript(options['jspath'], (function(_this) {
|
361
|
-
return function(script, textStatus, jqXHR) {
|
362
|
-
return goFroalaWysiwygs(array);
|
363
|
-
};
|
364
|
-
})(this));
|
365
|
-
} else {
|
366
|
-
goFroalaWysiwygs(array);
|
367
|
-
}
|
368
|
-
}
|
369
|
-
return content.find('trix-editor').each(function() {
|
370
|
-
if (!window.Trix) {
|
371
|
-
options = $(this).data('options');
|
372
|
-
$('head').append('<link href="' + options['csspath'] + '" rel="stylesheet" media="all" type="text\/css">');
|
373
|
-
return $.getScript(options['jspath']);
|
374
|
-
}
|
375
|
-
});
|
376
|
-
}
|
377
|
-
});
|
378
|
-
|
379
|
-
}(jQuery));
|
@@ -1,21 +0,0 @@
|
|
1
|
-
//= require 'jquery3'
|
2
|
-
//= require 'rails_admin/jquery.migrate'
|
3
|
-
//= require 'jquery_ujs'
|
4
|
-
//= require 'jquery.remotipart'
|
5
|
-
//= require 'rails_admin/jquery-ui'
|
6
|
-
//= require 'rails_admin/moment-with-locales'
|
7
|
-
//= require 'rails_admin/bootstrap-datetimepicker'
|
8
|
-
//= require 'rails_admin/jquery.colorpicker'
|
9
|
-
//= require 'rails_admin/ra.filter-box'
|
10
|
-
//= require 'rails_admin/ra.filtering-multiselect'
|
11
|
-
//= require 'rails_admin/ra.filtering-select'
|
12
|
-
//= require 'rails_admin/ra.remote-form'
|
13
|
-
//= require 'rails_admin/jquery.pjax'
|
14
|
-
//= require 'jquery_nested_form'
|
15
|
-
//= require 'rails_admin/ra.nested-form-hooks'
|
16
|
-
//= require 'rails_admin/ra.i18n'
|
17
|
-
//= require 'rails_admin/bootstrap/bootstrap'
|
18
|
-
//= require 'rails_admin/ra.widgets'
|
19
|
-
//= require 'rails_admin/ra.sidescroll'
|
20
|
-
//= require 'rails_admin/ui'
|
21
|
-
//= require 'rails_admin/custom/ui'
|
@@ -1,135 +0,0 @@
|
|
1
|
-
(function($) {
|
2
|
-
$(document).on("click", "#list input.toggle", function() {
|
3
|
-
$("#list [name='bulk_ids[]']").prop("checked", $(this).is(":checked"));
|
4
|
-
});
|
5
|
-
|
6
|
-
$(document).on('click', '.pjax', function(event) {
|
7
|
-
if (event.which > 1 || event.metaKey || event.ctrlKey) {
|
8
|
-
return;
|
9
|
-
}
|
10
|
-
|
11
|
-
if ($.support.pjax) {
|
12
|
-
event.preventDefault();
|
13
|
-
$.pjax({
|
14
|
-
container: $(this).data('pjax-container') || '[data-pjax-container]',
|
15
|
-
url: $(this).data('href') || $(this).attr('href'),
|
16
|
-
timeout: 2000
|
17
|
-
});
|
18
|
-
return;
|
19
|
-
}
|
20
|
-
|
21
|
-
if ($(this).data('href')) {
|
22
|
-
window.location = $(this).data('href');
|
23
|
-
}
|
24
|
-
});
|
25
|
-
|
26
|
-
$(document).on('submit', '.pjax-form', function(event) {
|
27
|
-
if ($.support.pjax) {
|
28
|
-
event.preventDefault();
|
29
|
-
$.pjax({
|
30
|
-
container: $(this).data('pjax-container') || '[data-pjax-container]',
|
31
|
-
url: this.action + (this.action.indexOf('?') !== -1 ? '&' : '?') + $(this).serialize(),
|
32
|
-
timeout: 2000
|
33
|
-
});
|
34
|
-
}
|
35
|
-
});
|
36
|
-
|
37
|
-
$(document).on('pjax:start', function() {
|
38
|
-
return $('#loading').show();
|
39
|
-
}).on('pjax:end', function() {
|
40
|
-
return $('#loading').hide();
|
41
|
-
});
|
42
|
-
|
43
|
-
$(document).on('click', '[data-target]', function() {
|
44
|
-
if (!$(this).hasClass('disabled')) {
|
45
|
-
if ($(this).has('i.icon-chevron-down').length) {
|
46
|
-
$(this).removeClass('active').children('i').toggleClass('icon-chevron-down icon-chevron-right');
|
47
|
-
$($(this).data('target')).filter(':visible').hide('slow');
|
48
|
-
} else {
|
49
|
-
if ($(this).has('i.icon-chevron-right').length) {
|
50
|
-
$(this).addClass('active').children('i').toggleClass('icon-chevron-down icon-chevron-right');
|
51
|
-
$($(this).data('target')).filter(':hidden').show('slow');
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
});
|
56
|
-
|
57
|
-
$(document).on('click', '.form-horizontal legend', function() {
|
58
|
-
if ($(this).has('i.icon-chevron-down').length) {
|
59
|
-
$(this).siblings('.control-group:visible').hide('slow');
|
60
|
-
$(this).children('i').toggleClass('icon-chevron-down icon-chevron-right');
|
61
|
-
} else {
|
62
|
-
if ($(this).has('i.icon-chevron-right').length) {
|
63
|
-
$(this).siblings('.control-group:hidden').show('slow');
|
64
|
-
$(this).children('i').toggleClass('icon-chevron-down icon-chevron-right');
|
65
|
-
}
|
66
|
-
}
|
67
|
-
});
|
68
|
-
|
69
|
-
$(document).on('click', 'form .tab-content .tab-pane a.remove_nested_one_fields', function() {
|
70
|
-
$(this).children('input[type="hidden"]').val($(this).hasClass('active')).siblings('i').toggleClass('icon-check icon-trash');
|
71
|
-
});
|
72
|
-
|
73
|
-
$(document).ready(function() {
|
74
|
-
RailsAdmin.I18n.init($('html').attr('lang'), $("#admin-js").data('i18nOptions'));
|
75
|
-
$(document).trigger('rails_admin.dom_ready');
|
76
|
-
});
|
77
|
-
|
78
|
-
$(document).on('pjax:end', function() {
|
79
|
-
$(document).trigger('rails_admin.dom_ready');
|
80
|
-
});
|
81
|
-
|
82
|
-
$(document).on('rails_admin.dom_ready', function() {
|
83
|
-
$('.nav.nav-pills li.active').removeClass('active');
|
84
|
-
$(".nav.nav-pills li[data-model=\"" + ($('.page-header').data('model')) + "\"]").addClass('active');
|
85
|
-
$('.animate-width-to').each(function() {
|
86
|
-
var length, width;
|
87
|
-
length = $(this).data("animate-length");
|
88
|
-
width = $(this).data("animate-width-to");
|
89
|
-
$(this).animate({
|
90
|
-
width: width
|
91
|
-
}, length, 'easeOutQuad');
|
92
|
-
});
|
93
|
-
$('.form-horizontal legend').has('i.icon-chevron-right').each(function() {
|
94
|
-
$(this).siblings('.control-group').hide();
|
95
|
-
});
|
96
|
-
$(".table").tooltip({
|
97
|
-
selector: "th[rel=tooltip]"
|
98
|
-
});
|
99
|
-
$('[formnovalidate]').on('click', function() {
|
100
|
-
$(this).closest('form').attr('novalidate', true);
|
101
|
-
});
|
102
|
-
$.each($('#filters_box').data('options'), function() {
|
103
|
-
$.filters.append(this);
|
104
|
-
});
|
105
|
-
});
|
106
|
-
|
107
|
-
$(document).on('click', ".bulk-link", function(event) {
|
108
|
-
event.preventDefault();
|
109
|
-
$('#bulk_action').val($(this).data('action'));
|
110
|
-
$('#bulk_form').submit();
|
111
|
-
});
|
112
|
-
|
113
|
-
$(document).on('click', "#remove_filter", function(event) {
|
114
|
-
event.preventDefault();
|
115
|
-
$("#filters_box").html("");
|
116
|
-
$("hr.filters_box").hide();
|
117
|
-
$(this).parent().siblings("input[type='search']").val("");
|
118
|
-
$(this).parents("form").submit();
|
119
|
-
});
|
120
|
-
|
121
|
-
$(document).on('click', '#fields_to_export label input#check_all', function() {
|
122
|
-
var elems;
|
123
|
-
elems = $('#fields_to_export label input');
|
124
|
-
if ($('#fields_to_export label input#check_all').is(':checked')) {
|
125
|
-
$(elems).prop('checked', true);
|
126
|
-
} else {
|
127
|
-
$(elems).prop('checked', false);
|
128
|
-
}
|
129
|
-
});
|
130
|
-
|
131
|
-
$(document).on('click', '#fields_to_export .reverse-selection', function() {
|
132
|
-
$(this).closest(".control-group").find(".controls").find("input").click();
|
133
|
-
});
|
134
|
-
|
135
|
-
}(jQuery));
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|