rails_admin 0.8.1 → 2.2.1
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 +5 -5
- data/Gemfile +17 -34
- data/LICENSE.md +1 -1
- data/README.md +34 -26
- data/app/assets/images/rails_admin/aristo/images/bg_fallback.png +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/magnifier.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-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/custom/ui.js +1 -0
- data/app/assets/javascripts/rails_admin/jquery-ui.js.erb +8 -0
- data/app/assets/javascripts/rails_admin/jquery.migrate.js +3 -0
- data/app/assets/javascripts/rails_admin/ra.filter-box.js +148 -60
- data/app/assets/javascripts/rails_admin/ra.filtering-multiselect.js +31 -26
- data/app/assets/javascripts/rails_admin/ra.filtering-select.js +211 -110
- data/app/assets/javascripts/rails_admin/ra.i18n.js +28 -0
- data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.js +59 -0
- data/app/assets/javascripts/rails_admin/ra.sidescroll.js +31 -0
- data/app/assets/javascripts/rails_admin/ra.widgets.js +379 -0
- data/app/assets/javascripts/rails_admin/rails_admin.js +5 -5
- data/app/assets/javascripts/rails_admin/ui.js +135 -0
- data/app/assets/stylesheets/rails_admin/aristo/images/bg_fallback.png +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 +5 -5
- data/app/assets/stylesheets/rails_admin/ra.sidescroll.scss +29 -0
- data/app/assets/stylesheets/rails_admin/ra.widgets.scss +9 -1
- data/app/assets/stylesheets/rails_admin/rails_admin.scss.erb +2 -1
- data/app/controllers/rails_admin/application_controller.rb +14 -8
- data/app/controllers/rails_admin/main_controller.rb +9 -9
- data/app/helpers/rails_admin/application_helper.rb +26 -11
- data/app/helpers/rails_admin/form_builder.rb +20 -12
- data/app/helpers/rails_admin/main_helper.rb +8 -7
- data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_gap.html.haml +0 -0
- data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_next_page.html.haml +0 -0
- data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_page.html.haml +0 -0
- data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_paginator.html.haml +0 -0
- data/app/views/kaminari/{twitter-bootstrap → ra-twitter-bootstrap}/_prev_page.html.haml +0 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_next_page.html.haml +4 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_paginator.html.haml +4 -0
- data/app/views/kaminari/ra-twitter-bootstrap/without_count/_prev_page.html.haml +4 -0
- data/app/views/layouts/rails_admin/_head.html.haml +7 -0
- data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +2 -2
- data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +2 -1
- data/app/views/layouts/rails_admin/application.html.haml +4 -10
- data/app/views/layouts/rails_admin/pjax.html.haml +1 -5
- data/app/views/rails_admin/main/_delete_notice.html.haml +14 -9
- data/app/views/rails_admin/main/_form_action_text.html.haml +7 -0
- data/app/views/rails_admin/main/_form_colorpicker.html.haml +1 -1
- data/app/views/rails_admin/main/_form_enumeration.html.haml +4 -3
- data/app/views/rails_admin/main/_form_file_upload.html.haml +5 -5
- data/app/views/rails_admin/main/_form_filtering_multiselect.html.haml +7 -6
- data/app/views/rails_admin/main/_form_filtering_select.html.haml +1 -1
- data/app/views/rails_admin/main/_form_multiple_file_upload.html.haml +16 -0
- data/app/views/rails_admin/main/_form_polymorphic_association.html.haml +18 -3
- data/app/views/rails_admin/main/_form_simple_mde.haml +8 -0
- data/app/views/rails_admin/main/dashboard.html.haml +5 -6
- data/app/views/rails_admin/main/export.html.haml +45 -36
- data/app/views/rails_admin/main/history.html.haml +3 -3
- data/app/views/rails_admin/main/index.html.haml +37 -26
- data/app/views/rails_admin/main/show.html.haml +6 -7
- data/config/initializers/active_record_extensions.rb +3 -3
- data/config/initializers/haml.rb +4 -1
- data/config/locales/rails_admin.en.yml +5 -2
- data/lib/generators/rails_admin/templates/initializer.erb +6 -2
- data/lib/rails_admin/abstract_model.rb +9 -10
- data/lib/rails_admin/adapters/active_record/abstract_object.rb +9 -3
- data/lib/rails_admin/adapters/active_record/property.rb +1 -5
- data/lib/rails_admin/adapters/active_record.rb +83 -28
- data/lib/rails_admin/adapters/mongoid/abstract_object.rb +3 -3
- data/lib/rails_admin/adapters/mongoid/association.rb +18 -6
- data/lib/rails_admin/adapters/mongoid/bson.rb +29 -0
- data/lib/rails_admin/adapters/mongoid/extension.rb +4 -2
- data/lib/rails_admin/adapters/mongoid/property.rb +3 -3
- data/lib/rails_admin/adapters/mongoid.rb +40 -26
- data/lib/rails_admin/bootstrap-sass/compass_functions.rb +1 -1
- data/lib/rails_admin/bootstrap-sass/sass_functions.rb +1 -3
- data/lib/rails_admin/bootstrap-sass.rb +8 -6
- data/lib/rails_admin/config/actions/base.rb +20 -5
- data/lib/rails_admin/config/actions/bulk_delete.rb +2 -4
- data/lib/rails_admin/config/actions/dashboard.rb +9 -5
- data/lib/rails_admin/config/actions/edit.rb +1 -3
- data/lib/rails_admin/config/actions/export.rb +1 -1
- data/lib/rails_admin/config/actions/index.rb +5 -3
- data/lib/rails_admin/config/actions/new.rb +4 -5
- data/lib/rails_admin/config/actions.rb +1 -1
- data/lib/rails_admin/config/configurable.rb +25 -18
- data/lib/rails_admin/config/fields/association.rb +11 -3
- data/lib/rails_admin/config/fields/base.rb +20 -27
- data/lib/rails_admin/config/fields/factories/action_text.rb +12 -0
- data/lib/rails_admin/config/fields/factories/active_storage.rb +30 -0
- data/lib/rails_admin/config/fields/factories/carrierwave.rb +4 -2
- data/lib/rails_admin/config/fields/factories/dragonfly.rb +1 -1
- data/lib/rails_admin/config/fields/factories/shrine.rb +27 -0
- data/lib/rails_admin/config/fields/types/action_text.rb +30 -0
- data/lib/rails_admin/config/fields/types/active_record_enum.rb +19 -2
- data/lib/rails_admin/config/fields/types/active_storage.rb +49 -0
- data/lib/rails_admin/config/fields/types/all.rb +7 -1
- data/lib/rails_admin/config/fields/types/belongs_to_association.rb +8 -0
- data/lib/rails_admin/config/fields/types/bson_object_id.rb +1 -15
- data/lib/rails_admin/config/fields/types/ck_editor.rb +7 -7
- data/lib/rails_admin/config/fields/types/code_mirror.rb +10 -12
- data/lib/rails_admin/config/fields/types/color.rb +2 -2
- data/lib/rails_admin/config/fields/types/datetime.rb +6 -3
- data/lib/rails_admin/config/fields/types/file_upload.rb +12 -4
- data/lib/rails_admin/config/fields/types/froala.rb +9 -11
- data/lib/rails_admin/config/fields/types/has_many_association.rb +1 -1
- data/lib/rails_admin/config/fields/types/hidden.rb +2 -2
- data/lib/rails_admin/config/fields/types/json.rb +9 -1
- data/lib/rails_admin/config/fields/types/multiple_active_storage.rb +53 -0
- data/lib/rails_admin/config/fields/types/multiple_carrierwave.rb +56 -0
- data/lib/rails_admin/config/fields/types/multiple_file_upload.rb +125 -0
- data/lib/rails_admin/config/fields/types/password.rb +5 -1
- data/lib/rails_admin/config/fields/types/polymorphic_association.rb +12 -1
- data/lib/rails_admin/config/fields/types/serialized.rb +2 -2
- data/lib/rails_admin/config/fields/types/shrine.rb +54 -0
- data/lib/rails_admin/config/fields/types/simple_mde.rb +36 -0
- data/lib/rails_admin/config/fields/types/string.rb +8 -7
- data/lib/rails_admin/config/fields/types/string_like.rb +19 -0
- data/lib/rails_admin/config/fields/types/text.rb +2 -20
- data/lib/rails_admin/config/fields/types/wysihtml5.rb +14 -10
- 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 +1 -1
- data/lib/rails_admin/config/has_groups.rb +1 -1
- data/lib/rails_admin/config/hideable.rb +1 -1
- data/lib/rails_admin/config/inspectable.rb +39 -0
- data/lib/rails_admin/config/lazy_model.rb +48 -8
- data/lib/rails_admin/config/model.rb +10 -22
- data/lib/rails_admin/config/proxyable/proxy.rb +7 -9
- data/lib/rails_admin/config/proxyable.rb +13 -1
- data/lib/rails_admin/config/sections/base.rb +4 -17
- data/lib/rails_admin/config/sections/list.rb +37 -0
- data/lib/rails_admin/config.rb +46 -25
- data/lib/rails_admin/engine.rb +37 -4
- data/lib/rails_admin/extension.rb +16 -4
- data/lib/rails_admin/extensions/cancancan/authorization_adapter.rb +23 -7
- data/lib/rails_admin/extensions/cancancan.rb +1 -1
- data/lib/rails_admin/extensions/controller_extension.rb +6 -0
- data/lib/rails_admin/extensions/history/auditing_adapter.rb +2 -2
- data/lib/rails_admin/extensions/history/history.rb +2 -2
- data/lib/rails_admin/extensions/paper_trail/auditing_adapter.rb +59 -17
- data/lib/rails_admin/extensions/pundit/authorization_adapter.rb +11 -3
- data/lib/rails_admin/support/csv_converter.rb +20 -14
- data/lib/rails_admin/support/datetime.rb +7 -6
- data/lib/rails_admin/support/i18n.rb +7 -5
- data/lib/rails_admin/version.rb +2 -2
- data/lib/rails_admin.rb +23 -1
- data/lib/tasks/rails_admin.rake +16 -7
- 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 +2671 -0
- 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/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/rails_admin/bootstrap/glyphicons-halflings.png +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/{app → vendor}/assets/images/rails_admin/colorpicker/colorpicker_rgb_r.png +0 -0
- data/{app → 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/{app → vendor}/assets/images/rails_admin/colorpicker/custom_rgb_b.png +0 -0
- data/{app → vendor}/assets/images/rails_admin/colorpicker/custom_rgb_g.png +0 -0
- data/{app → 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/{app → vendor}/assets/images/rails_admin/colorpicker/select2.png +0 -0
- data/vendor/assets/images/rails_admin/colorpicker/slider.png +0 -0
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-affix.js +50 -28
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-alert.js +10 -7
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-button.js +35 -20
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-carousel.js +48 -25
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-collapse.js +70 -28
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-dropdown.js +56 -42
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-modal.js +118 -40
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-popover.js +26 -16
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-scrollspy.js +29 -27
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-tab.js +46 -19
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-tooltip.js +280 -60
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-transition.js +5 -5
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap-typeahead.js +0 -0
- data/{app → vendor}/assets/javascripts/rails_admin/bootstrap/bootstrap.js +0 -0
- data/vendor/assets/javascripts/rails_admin/bootstrap-datetimepicker.js +317 -150
- data/{app → vendor}/assets/javascripts/rails_admin/jquery.colorpicker.js +0 -0
- data/{app → vendor}/assets/javascripts/rails_admin/jquery.pjax.js +316 -161
- data/vendor/assets/javascripts/rails_admin/moment-with-locales.js +16528 -8420
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_alerts.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_badges.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_breadcrumbs.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_button-groups.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_buttons.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_carousel.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_close.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_code.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_component-animations.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_dropdowns.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_forms.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_glyphicons.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_grid.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_input-groups.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_jumbotron.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_labels.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_list-group.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_media.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_mixins.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_modals.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_navbar.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_navs.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_normalize.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_pager.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_pagination.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_panels.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_popovers.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_print.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_progress-bars.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_responsive-embed.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_responsive-utilities.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_scaffolding.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_tables.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_theme.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_thumbnails.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_tooltip.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_type.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_utilities.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_variables.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/_wells.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/bootstrap.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_alerts.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_background-variant.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_border-radius.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_buttons.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_center-block.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_clearfix.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_forms.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_gradients.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_grid-framework.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_grid.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_hide-text.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_image.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_labels.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_list-group.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-divider.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_nav-vertical-align.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_opacity.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_pagination.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_panels.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_progress-bar.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_reset-filter.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_resize.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_responsive-visibility.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_size.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_tab-focus.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_table-row.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_text-emphasis.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_text-overflow.scss +0 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/bootstrap/mixins/_vendor-prefixes.scss +0 -0
- data/vendor/assets/stylesheets/rails_admin/font-awesome.scss +2342 -0
- data/{app → vendor}/assets/stylesheets/rails_admin/jquery.colorpicker.scss +0 -0
- metadata +214 -199
- data/app/assets/images/rails_admin/bootstrap/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/rails_admin/bootstrap/glyphicons-halflings.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_background.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_hex.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_b.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_h.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_hsb_s.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_indic.gif +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_overlay.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_rgb_b.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_rgb_g.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/colorpicker_submit.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_background.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_hex.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_hsb_b.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_hsb_h.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_hsb_s.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_indic.gif +0 -0
- data/app/assets/images/rails_admin/colorpicker/custom_submit.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/select.png +0 -0
- data/app/assets/images/rails_admin/colorpicker/slider.png +0 -0
- data/app/assets/javascripts/rails_admin/custom/ui.coffee +0 -1
- data/app/assets/javascripts/rails_admin/jquery.remotipart.fixed.js +0 -72
- data/app/assets/javascripts/rails_admin/ra.i18n.coffee +0 -8
- data/app/assets/javascripts/rails_admin/ra.nested-form-hooks.coffee +0 -52
- data/app/assets/javascripts/rails_admin/ra.widgets.coffee +0 -308
- data/app/assets/javascripts/rails_admin/ui.coffee +0 -102
- data/config/initializers/devise_patch.rb +0 -9
- data/lib/rails_admin/config/fields/factories/refile.rb +0 -25
- data/lib/rails_admin/config/fields/types/refile.rb +0 -27
- data/lib/rails_admin/extensions/cancan/authorization_adapter.rb +0 -57
- data/lib/rails_admin/extensions/cancan.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f7dc936446d63b1ecdd6f711d291c25d8c69222a8b4694edc248c9930e67983
|
4
|
+
data.tar.gz: 4e89905db9dac3f8e7336e025fea98a7e03a5bd3d085406fa043f452999efc3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71faff5dae3bc4102bc8fb00a4deb42c601e49c5295fb17f88444f57409ab346d466dfd02b66a8998d9394cc270a6760c3586bc8fd7df83d4a6e078b830f93ce
|
7
|
+
data.tar.gz: fc96ebe4813b3621dea3eadde119932e7fd4ebcca303100cbdfc3172c7d8fa2f15f93c489554b581bcd2fe10ab4f636a5927536d94081eb75ae4f867a34b3d17
|
data/Gemfile
CHANGED
@@ -1,32 +1,17 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
gem 'appraisal', '>= 2.0'
|
4
|
+
gem 'rails'
|
5
|
+
gem 'haml'
|
4
6
|
gem 'devise'
|
5
7
|
|
6
|
-
group :mongoid do
|
7
|
-
gem 'mongoid', '~> 4.0.0'
|
8
|
-
gem 'mongoid-paperclip', '>= 0.0.8', require: 'mongoid_paperclip'
|
9
|
-
gem 'carrierwave-mongoid', '>= 0.6.3', require: 'carrierwave/mongoid'
|
10
|
-
gem 'refile-mongoid', '>= 0.0.1', platforms: [:ruby_21, :ruby_22]
|
11
|
-
end
|
12
|
-
|
13
8
|
group :active_record do
|
14
|
-
|
15
|
-
gem 'activerecord-jdbcmysql-adapter', '>= 1.2'
|
16
|
-
gem 'jdbc-mysql', '>= 5.1'
|
17
|
-
gem 'activerecord-jdbcpostgresql-adapter', '>= 1.2'
|
18
|
-
gem 'jdbc-postgres', '>= 9.2'
|
19
|
-
gem 'activerecord-jdbcsqlite3-adapter', '>= 1.3.0.beta1'
|
20
|
-
gem 'jdbc-sqlite3', '>= 3.7'
|
21
|
-
end
|
9
|
+
gem 'paper_trail'
|
22
10
|
|
23
|
-
platforms :ruby, :mswin, :mingw do
|
24
|
-
gem 'mysql2', '
|
25
|
-
gem 'pg', '>= 0.14'
|
11
|
+
platforms :ruby, :mswin, :mingw, :x64_mingw do
|
12
|
+
gem 'mysql2', '>= 0.3.14'
|
26
13
|
gem 'sqlite3', '>= 1.3'
|
27
14
|
end
|
28
|
-
|
29
|
-
gem 'paper_trail', '~> 3.0'
|
30
15
|
end
|
31
16
|
|
32
17
|
group :development, :test do
|
@@ -34,34 +19,32 @@ group :development, :test do
|
|
34
19
|
end
|
35
20
|
|
36
21
|
group :test do
|
37
|
-
gem '
|
38
|
-
gem '
|
39
|
-
gem '
|
40
|
-
gem 'carrierwave', '>= 0.8'
|
41
|
-
gem 'coveralls'
|
42
|
-
gem 'database_cleaner', ['>= 1.2', '!= 1.4.0', '!= 1.5.0']
|
22
|
+
gem 'cancancan', '~> 3.0'
|
23
|
+
gem 'carrierwave', ['>= 2.0.0.rc', '< 3']
|
24
|
+
gem 'database_cleaner', ['>= 1.2', '!= 1.4.0', '!= 1.5.0', '< 2.0']
|
43
25
|
gem 'dragonfly', '~> 1.0'
|
44
|
-
gem '
|
26
|
+
gem 'factory_bot', '>= 4.2'
|
45
27
|
gem 'generator_spec', '>= 0.8'
|
46
28
|
gem 'launchy', '>= 2.2'
|
47
29
|
gem 'mini_magick', '>= 3.4'
|
48
|
-
gem 'paperclip', ['>= 3.4', '!= 4.3.0']
|
49
30
|
gem 'poltergeist', '~> 1.5'
|
50
31
|
gem 'pundit'
|
51
32
|
gem 'rack-cache', require: 'rack/cache'
|
52
33
|
gem 'rspec-rails', '>= 2.14'
|
53
|
-
gem '
|
34
|
+
gem 'rspec-expectations', '!= 3.8.3'
|
35
|
+
gem 'rspec-retry'
|
36
|
+
gem 'rubocop', '~> 0.68.1', require: false
|
37
|
+
gem 'rubocop-performance', require: false
|
54
38
|
gem 'simplecov', '>= 0.9', require: false
|
39
|
+
gem 'simplecov-lcov', require: false
|
55
40
|
gem 'timecop', '>= 0.5'
|
56
41
|
|
57
42
|
platforms :ruby_19 do
|
58
|
-
gem 'tins', '~> 1.6.0'
|
43
|
+
gem 'tins', '~> 1.6.0', require: false
|
59
44
|
end
|
60
45
|
|
61
|
-
|
62
|
-
|
63
|
-
gem 'refile-mini_magick', '>= 0.1.0'
|
64
|
-
end
|
46
|
+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
47
|
+
gem 'tzinfo-data', platforms: %i(mingw mswin x64_mingw jruby)
|
65
48
|
end
|
66
49
|
|
67
50
|
gemspec
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,21 +1,36 @@
|
|
1
1
|
# RailsAdmin
|
2
2
|
|
3
3
|
[![Gem Version](https://img.shields.io/gem/v/rails_admin.svg)][gem]
|
4
|
-
[![Build Status](https://img.shields.io/
|
5
|
-
[![Dependency Status](https://img.shields.io/gemnasium/sferik/rails_admin.svg)][gemnasium]
|
6
|
-
[![Code Climate](https://img.shields.io/codeclimate/github/sferik/rails_admin.svg)][codeclimate]
|
4
|
+
[![Build Status](https://img.shields.io/github/workflow/status/sferik/rails_admin/Test)][ghactions]
|
7
5
|
[![Coverage Status](https://img.shields.io/coveralls/sferik/rails_admin.svg)][coveralls]
|
8
6
|
[![Inline docs](http://inch-ci.org/github/sferik/rails_admin.svg)][inch]
|
7
|
+
[![Code Climate](https://codeclimate.com/github/sferik/rails_admin.svg)][codeclimate]
|
8
|
+
[![SemVer](https://api.dependabot.com/badges/compatibility_score?dependency-name=rails_admin&package-manager=bundler&version-scheme=semver)][semver]
|
9
9
|
|
10
10
|
[gem]: https://rubygems.org/gems/rails_admin
|
11
|
-
[
|
12
|
-
[gemnasium]: https://gemnasium.com/sferik/rails_admin
|
13
|
-
[codeclimate]: https://codeclimate.com/github/sferik/rails_admin
|
11
|
+
[ghactions]: https://github.com/sferik/rails_admin/actions
|
14
12
|
[coveralls]: https://coveralls.io/r/sferik/rails_admin
|
15
13
|
[inch]: http://inch-ci.org/github/sferik/rails_admin
|
14
|
+
[codeclimate]: https://codeclimate.com/github/sferik/rails_admin
|
15
|
+
[semver]: https://dependabot.com/compatibility-score.html?dependency-name=rails_admin&package-manager=bundler&version-scheme=semver
|
16
16
|
|
17
17
|
RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.
|
18
18
|
|
19
|
+
## Announcements
|
20
|
+
|
21
|
+
### [Action required] Security issue
|
22
|
+
|
23
|
+
**RailsAdmin 2.0.1, 2.0.0 and up to 1.4.2 have been reported to have XSS vulnerability.** We strongly recommend that you upgrade RailsAdmin to 2.0.2 (and higher) or 1.4.3 as soon as possible, if you are on those versions. See [d72090ec](https://github.com/sferik/rails_admin/commit/d72090ec6a07c3b9b7b48ab50f3d405f91ff4375) for the detail.
|
24
|
+
|
25
|
+
## Getting started
|
26
|
+
|
27
|
+
* Check out [the docs][docs].
|
28
|
+
* Try the [live demo][demo]. ([Source code][dummy_app])
|
29
|
+
|
30
|
+
[demo]: http://rails-admin-tb.herokuapp.com/
|
31
|
+
[dummy_app]: https://github.com/bbenezech/dummy_app
|
32
|
+
[docs]: https://github.com/sferik/rails_admin/wiki
|
33
|
+
|
19
34
|
## Features
|
20
35
|
* CRUD any data with ease
|
21
36
|
* Custom actions
|
@@ -33,14 +48,15 @@ RailsAdmin is a Rails engine that provides an easy-to-use interface for managing
|
|
33
48
|
|
34
49
|
## Installation
|
35
50
|
|
36
|
-
1.
|
37
|
-
2. Run `
|
38
|
-
3.
|
39
|
-
4.
|
51
|
+
1. On your gemfile: `gem 'rails_admin', '~> 2.0'`
|
52
|
+
2. Run `bundle install`
|
53
|
+
3. Run `rails g rails_admin:install`
|
54
|
+
4. Provide a namespace for the routes when asked
|
55
|
+
5. Start a server `rails s` and administer your data at [/admin](http://localhost:3000/admin). (if you chose default namespace: /admin)
|
40
56
|
|
41
57
|
## Configuration
|
42
58
|
### Global
|
43
|
-
In `config/initializers/rails_admin`:
|
59
|
+
In `config/initializers/rails_admin.rb`:
|
44
60
|
|
45
61
|
[Details](https://github.com/sferik/rails_admin/wiki/Base-configuration)
|
46
62
|
|
@@ -62,15 +78,6 @@ end
|
|
62
78
|
|
63
79
|
Details: [Models](https://github.com/sferik/rails_admin/wiki/Models), [Groups](https://github.com/sferik/rails_admin/wiki/Groups), [Fields](https://github.com/sferik/rails_admin/wiki/Fields)
|
64
80
|
|
65
|
-
## Documentation
|
66
|
-
https://github.com/sferik/rails_admin/wiki
|
67
|
-
|
68
|
-
## Demo
|
69
|
-
Take RailsAdmin for a [test drive][demo] with sample data. ([Source code.][dummy_app])
|
70
|
-
|
71
|
-
[demo]: http://rails-admin-tb.herokuapp.com/
|
72
|
-
[dummy_app]: https://github.com/bbenezech/dummy_app
|
73
|
-
|
74
81
|
## Support
|
75
82
|
If you have a question, please check this README, the wiki, and the [list of
|
76
83
|
known issues][troubleshoot].
|
@@ -85,14 +92,15 @@ list][list].
|
|
85
92
|
If you think you found a bug in RailsAdmin, you can [submit an issue](https://github.com/sferik/rails_admin/issues/new).
|
86
93
|
|
87
94
|
## Supported Ruby Versions
|
88
|
-
This library aims to support and is [tested against][
|
95
|
+
This library aims to support and is [tested against][ghactions] the following Ruby implementations:
|
89
96
|
|
90
|
-
* Ruby 1.9.3
|
91
|
-
* Ruby 2.0.0
|
92
|
-
* Ruby 2.1
|
93
97
|
* Ruby 2.2
|
94
|
-
*
|
98
|
+
* Ruby 2.3
|
99
|
+
* Ruby 2.4
|
100
|
+
* Ruby 2.5
|
101
|
+
* Ruby 2.6
|
102
|
+
* Ruby 2.7
|
103
|
+
* Ruby 3.0
|
95
104
|
* [JRuby][]
|
96
105
|
|
97
|
-
[rubinius]: http://rubini.us/
|
98
106
|
[jruby]: http://jruby.org/
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
// override this file in your application to add custom behaviour
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<% require_asset "jquery-ui/effect" %>
|
2
|
+
<% if Jquery::Ui::Rails::JQUERY_UI_VERSION >= '1.12' %>
|
3
|
+
<% require_asset "jquery-ui/widgets/sortable" %>
|
4
|
+
<% require_asset "jquery-ui/widgets/autocomplete" %>
|
5
|
+
<% else %>
|
6
|
+
<% require_asset "jquery-ui/sortable" %>
|
7
|
+
<% require_asset "jquery-ui/autocomplete" %>
|
8
|
+
<% end %>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
/*! jQuery Migrate v3.3.3-pre | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
2
|
+
"undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return t(e,window)}):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),window):t(jQuery,window)}(function(s,n){"use strict";function e(e){return 0<=function(e,t){for(var r=/^(\d+)\.(\d+)\.(\d+)/,n=r.exec(e)||[],o=r.exec(t)||[],i=1;i<=3;i++){if(+o[i]<+n[i])return 1;if(+n[i]<+o[i])return-1}return 0}(s.fn.jquery,e)}s.migrateVersion="3.3.3-pre",n.console&&n.console.log&&(s&&e("3.0.0")||n.console.log("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),s.migrateWarnings&&n.console.log("JQMIGRATE: Migrate plugin loaded multiple times"),n.console.log("JQMIGRATE: Migrate is installed"+(s.migrateMute?"":" with logging active")+", version "+s.migrateVersion));var r={};function u(e){var t=n.console;s.migrateDeduplicateWarnings&&r[e]||(r[e]=!0,s.migrateWarnings.push(e),t&&t.warn&&!s.migrateMute&&(t.warn("JQMIGRATE: "+e),s.migrateTrace&&t.trace&&t.trace()))}function t(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return u(n),r},set:function(e){u(n),r=e}})}function o(e,t,r,n){e[t]=function(){return u(n),r.apply(this,arguments)}}s.migrateDeduplicateWarnings=!0,s.migrateWarnings=[],void 0===s.migrateTrace&&(s.migrateTrace=!0),s.migrateReset=function(){r={},s.migrateWarnings.length=0},"BackCompat"===n.document.compatMode&&u("jQuery is not compatible with Quirks Mode");var i,a,c,d={},l=s.fn.init,p=s.find,f=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,y=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g,m=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;for(i in s.fn.init=function(e){var t=Array.prototype.slice.call(arguments);return"string"==typeof e&&"#"===e&&(u("jQuery( '#' ) is not a valid selector"),t[0]=[]),l.apply(this,t)},s.fn.init.prototype=s.fn,s.find=function(t){var r=Array.prototype.slice.call(arguments);if("string"==typeof t&&f.test(t))try{n.document.querySelector(t)}catch(e){t=t.replace(y,function(e,t,r,n){return"["+t+r+'"'+n+'"]'});try{n.document.querySelector(t),u("Attribute selector with '#' must be quoted: "+r[0]),r[0]=t}catch(e){u("Attribute selector with '#' was not fixed: "+r[0])}}return p.apply(this,r)},p)Object.prototype.hasOwnProperty.call(p,i)&&(s.find[i]=p[i]);o(s.fn,"size",function(){return this.length},"jQuery.fn.size() is deprecated and removed; use the .length property"),o(s,"parseJSON",function(){return JSON.parse.apply(null,arguments)},"jQuery.parseJSON is deprecated; use JSON.parse"),o(s,"holdReady",s.holdReady,"jQuery.holdReady is deprecated"),o(s,"unique",s.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort"),t(s.expr,"filters",s.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos"),t(s.expr,":",s.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos"),e("3.1.1")&&o(s,"trim",function(e){return null==e?"":(e+"").replace(m,"")},"jQuery.trim is deprecated; use String.prototype.trim"),e("3.2.0")&&(o(s,"nodeName",function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},"jQuery.nodeName is deprecated"),o(s,"isArray",Array.isArray,"jQuery.isArray is deprecated; use Array.isArray")),e("3.3.0")&&(o(s,"isNumeric",function(e){var t=typeof e;return("number"==t||"string"==t)&&!isNaN(e-parseFloat(e))},"jQuery.isNumeric() is deprecated"),s.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){d["[object "+t+"]"]=t.toLowerCase()}),o(s,"type",function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[Object.prototype.toString.call(e)]||"object":typeof e},"jQuery.type is deprecated"),o(s,"isFunction",function(e){return"function"==typeof e},"jQuery.isFunction() is deprecated"),o(s,"isWindow",function(e){return null!=e&&e===e.window},"jQuery.isWindow() is deprecated")),s.ajax&&(a=s.ajax,c=/(=)\?(?=&|$)|\?\?/,s.ajax=function(){var e=a.apply(this,arguments);return e.promise&&(o(e,"success",e.done,"jQXHR.success is deprecated and removed"),o(e,"error",e.fail,"jQXHR.error is deprecated and removed"),o(e,"complete",e.always,"jQXHR.complete is deprecated and removed")),e},e("4.0.0")||s.ajaxPrefilter("+json",function(e){!1!==e.jsonp&&(c.test(e.url)||"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&c.test(e.data))&&u("JSON-to-JSONP auto-promotion is deprecated")}));var g=s.fn.removeAttr,h=s.fn.toggleClass,v=/\S+/g;function j(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()})}s.fn.removeAttr=function(e){var r=this;return s.each(e.match(v),function(e,t){s.expr.match.bool.test(t)&&(u("jQuery.fn.removeAttr no longer sets boolean properties: "+t),r.prop(t,!1))}),g.apply(this,arguments)};var Q,b=!(s.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?h.apply(this,arguments):(u("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var e=this.getAttribute&&this.getAttribute("class")||"";e&&s.data(this,"__className__",e),this.setAttribute&&this.setAttribute("class",!e&&!1!==t&&s.data(this,"__className__")||"")}))}),w=/^[a-z]/,x=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;s.swap&&s.each(["height","width","reliableMarginRight"],function(e,t){var r=s.cssHooks[t]&&s.cssHooks[t].get;r&&(s.cssHooks[t].get=function(){var e;return b=!0,e=r.apply(this,arguments),b=!1,e})}),s.swap=function(e,t,r,n){var o,i,a={};for(i in b||u("jQuery.swap() is undocumented and deprecated"),t)a[i]=e.style[i],e.style[i]=t[i];for(i in o=r.apply(e,n||[]),t)e.style[i]=a[i];return o},e("3.4.0")&&"undefined"!=typeof Proxy&&(s.cssProps=new Proxy(s.cssProps||{},{set:function(){return u("JQMIGRATE: jQuery.cssProps is deprecated"),Reflect.set.apply(this,arguments)}})),s.cssNumber||(s.cssNumber={}),Q=s.fn.css,s.fn.css=function(e,t){var r,n,o=this;return e&&"object"==typeof e&&!Array.isArray(e)?(s.each(e,function(e,t){s.fn.css.call(o,e,t)}),this):("number"==typeof t&&(r=j(e),n=r,w.test(n)&&x.test(n[0].toUpperCase()+n.slice(1))||s.cssNumber[r]||u('Number-typed values are deprecated for jQuery.fn.css( "'+e+'", value )')),Q.apply(this,arguments))};var A,k,S,M,N=s.data;s.data=function(e,t,r){var n,o,i;if(t&&"object"==typeof t&&2===arguments.length){for(i in n=s.hasData(e)&&N.call(this,e),o={},t)i!==j(i)?(u("jQuery.data() always sets/gets camelCased names: "+i),n[i]=t[i]):o[i]=t[i];return N.call(this,e,o),t}return t&&"string"==typeof t&&t!==j(t)&&(n=s.hasData(e)&&N.call(this,e))&&t in n?(u("jQuery.data() always sets/gets camelCased names: "+t),2<arguments.length&&(n[t]=r),n[t]):N.apply(this,arguments)},s.fx&&(S=s.Tween.prototype.run,M=function(e){return e},s.Tween.prototype.run=function(){1<s.easing[this.easing].length&&(u("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),s.easing[this.easing]=M),S.apply(this,arguments)},A=s.fx.interval||13,k="jQuery.fx.interval is deprecated",n.requestAnimationFrame&&Object.defineProperty(s.fx,"interval",{configurable:!0,enumerable:!0,get:function(){return n.document.hidden||u(k),A},set:function(e){u(k),A=e}}));var R=s.fn.load,H=s.event.add,C=s.event.fix;s.event.props=[],s.event.fixHooks={},t(s.event.props,"concat",s.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),s.event.fix=function(e){var t,r=e.type,n=this.fixHooks[r],o=s.event.props;if(o.length){u("jQuery.event.props are deprecated and removed: "+o.join());while(o.length)s.event.addProp(o.pop())}if(n&&!n._migrated_&&(n._migrated_=!0,u("jQuery.event.fixHooks are deprecated and removed: "+r),(o=n.props)&&o.length))while(o.length)s.event.addProp(o.pop());return t=C.call(this,e),n&&n.filter?n.filter(t,e):t},s.event.add=function(e,t){return e===n&&"load"===t&&"complete"===n.document.readyState&&u("jQuery(window).on('load'...) called after load event occurred"),H.apply(this,arguments)},s.each(["load","unload","error"],function(e,t){s.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?R.apply(this,e):(u("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.on.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),s.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,r){s.fn[r]=function(e,t){return u("jQuery.fn."+r+"() event shorthand is deprecated"),0<arguments.length?this.on(r,null,e,t):this.trigger(r)}}),s(function(){s(n.document).triggerHandler("ready")}),s.event.special.ready={setup:function(){this===n.document&&u("'ready' event is deprecated")}},s.fn.extend({bind:function(e,t,r){return u("jQuery.fn.bind() is deprecated"),this.on(e,null,t,r)},unbind:function(e,t){return u("jQuery.fn.unbind() is deprecated"),this.off(e,null,t)},delegate:function(e,t,r,n){return u("jQuery.fn.delegate() is deprecated"),this.on(t,e,r,n)},undelegate:function(e,t,r){return u("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)},hover:function(e,t){return u("jQuery.fn.hover() is deprecated"),this.on("mouseenter",e).on("mouseleave",t||e)}});function T(e){var t=n.document.implementation.createHTMLDocument("");return t.body.innerHTML=e,t.body&&t.body.innerHTML}function P(e){var t=e.replace(O,"<$1></$2>");t!==e&&T(e)!==T(t)&&u("HTML tags must be properly nested and closed: "+e)}var O=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,q=s.htmlPrefilter;s.UNSAFE_restoreLegacyHtmlPrefilter=function(){s.htmlPrefilter=function(e){return P(e),e.replace(O,"<$1></$2>")}},s.htmlPrefilter=function(e){return P(e),q(e)};var D,_=s.fn.offset;s.fn.offset=function(){var e=this[0];return!e||e.nodeType&&e.getBoundingClientRect?_.apply(this,arguments):(u("jQuery.fn.offset() requires a valid DOM element"),arguments.length?this:void 0)},s.ajax&&(D=s.param,s.param=function(e,t){var r=s.ajaxSettings&&s.ajaxSettings.traditional;return void 0===t&&r&&(u("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),t=r),D.call(this,e,t)});var E,F,J=s.fn.andSelf||s.fn.addBack;return s.fn.andSelf=function(){return u("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),J.apply(this,arguments)},s.Deferred&&(E=s.Deferred,F=[["resolve","done",s.Callbacks("once memory"),s.Callbacks("once memory"),"resolved"],["reject","fail",s.Callbacks("once memory"),s.Callbacks("once memory"),"rejected"],["notify","progress",s.Callbacks("memory"),s.Callbacks("memory")]],s.Deferred=function(e){var i=E(),a=i.promise();return i.pipe=a.pipe=function(){var o=arguments;return u("deferred.pipe() is deprecated"),s.Deferred(function(n){s.each(F,function(e,t){var r="function"==typeof o[e]&&o[e];i[t[1]](function(){var e=r&&r.apply(this,arguments);e&&"function"==typeof e.promise?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===a?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},e&&e.call(i,i),i},s.Deferred.exceptionHook=E.exceptionHook),s});
|
3
|
+
//# sourceMappingURL=jquery-migrate.min.map
|
@@ -11,6 +11,7 @@
|
|
11
11
|
var field_value = options['value'];
|
12
12
|
var field_operator = options['operator'];
|
13
13
|
var select_options = options['select_options'];
|
14
|
+
var required = options['required'];
|
14
15
|
var index = options['index'];
|
15
16
|
var value_name = 'f[' + field_name + '][' + index + '][v]';
|
16
17
|
var operator_name = 'f[' + field_name + '][' + index + '][o]';
|
@@ -19,90 +20,176 @@
|
|
19
20
|
|
20
21
|
switch(field_type) {
|
21
22
|
case 'boolean':
|
22
|
-
|
23
|
-
'
|
24
|
-
'<option value="
|
25
|
-
'<option value="
|
26
|
-
'<option
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
control = $('<select class="input-sm form-control"></select>')
|
24
|
+
.prop('name', value_name)
|
25
|
+
.append('<option value="_discard">...</option>')
|
26
|
+
.append($('<option value="true"></option>').prop('selected', field_value == "true").text(RailsAdmin.I18n.t("true")))
|
27
|
+
.append($('<option value="false"></option>').prop('selected', field_value == "false").text(RailsAdmin.I18n.t("false")))
|
28
|
+
if (!required) {
|
29
|
+
control.append([
|
30
|
+
'<option disabled="disabled">---------</option>',
|
31
|
+
$('<option value="_present"></option>').prop('selected', field_value == "_present").text(RailsAdmin.I18n.t("is_present")),
|
32
|
+
$('<option value="_blank"></option>').prop('selected', field_value == "_blank").text(RailsAdmin.I18n.t("is_blank"))
|
33
|
+
])
|
34
|
+
}
|
30
35
|
break;
|
31
36
|
case 'date':
|
32
37
|
additional_control =
|
33
|
-
|
34
|
-
|
35
|
-
|
38
|
+
$('<input size="20" class="date additional-fieldset default input-sm form-control" type="text" />')
|
39
|
+
.css('display', (!field_operator || field_operator == "default") ? 'inline-block' : 'none')
|
40
|
+
.prop('name', value_name + '[]')
|
41
|
+
.prop('value', field_value[0] || '')
|
42
|
+
.add(
|
43
|
+
$('<input size="20" placeholder="-∞" class="date additional-fieldset between input-sm form-control" type="text" />')
|
44
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
45
|
+
.prop('name', value_name + '[]')
|
46
|
+
.prop('value', field_value[1] || '')
|
47
|
+
)
|
48
|
+
.add(
|
49
|
+
$('<input size="20" placeholder="∞" class="date additional-fieldset between input-sm form-control" type="text" />')
|
50
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
51
|
+
.prop('name', value_name + '[]')
|
52
|
+
.prop('value', field_value[2] || '')
|
53
|
+
);
|
36
54
|
case 'datetime':
|
37
55
|
case 'timestamp':
|
38
|
-
control = control || '<select class="switch-
|
39
|
-
|
40
|
-
'<option
|
41
|
-
'<option
|
42
|
-
'<option
|
43
|
-
'<option
|
44
|
-
'<option
|
45
|
-
'<option
|
46
|
-
|
47
|
-
|
48
|
-
|
56
|
+
control = control || $('<select class="switch-additional-fieldsets input-sm form-control"></select>')
|
57
|
+
.prop('name', operator_name)
|
58
|
+
.append($('<option data-additional-fieldset="default" value="default"></option>').prop('selected', field_operator == "default").text(RailsAdmin.I18n.t("date")))
|
59
|
+
.append($('<option data-additional-fieldset="between" value="between"></option>').prop('selected', field_operator == "between").text(RailsAdmin.I18n.t("between_and_")))
|
60
|
+
.append($('<option value="today"></option>').prop('selected', field_operator == "today").text(RailsAdmin.I18n.t("today")))
|
61
|
+
.append($('<option value="yesterday"></option>').prop('selected', field_operator == "yesterday").text(RailsAdmin.I18n.t("yesterday")))
|
62
|
+
.append($('<option value="this_week"></option>').prop('selected', field_operator == "this_week").text(RailsAdmin.I18n.t("this_week")))
|
63
|
+
.append($('<option value="last_week"></option>').prop('selected', field_operator == "last_week").text(RailsAdmin.I18n.t("last_week")))
|
64
|
+
if (!required) {
|
65
|
+
control.append([
|
66
|
+
'<option disabled="disabled">---------</option>',
|
67
|
+
$('<option value="_not_null"></option>').prop('selected', field_operator == "_not_null").text(RailsAdmin.I18n.t("is_present")),
|
68
|
+
$('<option value="_null"></option>').prop('selected', field_operator == "_null").text(RailsAdmin.I18n.t("is_blank"))
|
69
|
+
])
|
70
|
+
}
|
49
71
|
additional_control = additional_control ||
|
50
|
-
|
51
|
-
|
52
|
-
|
72
|
+
$('<input size="25" class="datetime additional-fieldset default input-sm form-control" type="text" />')
|
73
|
+
.css('display', (!field_operator || field_operator == "default") ? 'inline-block' : 'none')
|
74
|
+
.prop('name', value_name + '[]')
|
75
|
+
.prop('value', field_value[0] || '')
|
76
|
+
.add(
|
77
|
+
$('<input size="25" placeholder="-∞" class="datetime additional-fieldset between input-sm form-control" type="text" />')
|
78
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
79
|
+
.prop('name', value_name + '[]')
|
80
|
+
.prop('value', field_value[1] || '')
|
81
|
+
)
|
82
|
+
.add(
|
83
|
+
$('<input size="25" placeholder="∞" class="datetime additional-fieldset between input-sm form-control" type="text" />')
|
84
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
85
|
+
.prop('name', value_name + '[]')
|
86
|
+
.prop('value', field_value[2] || '')
|
87
|
+
);
|
53
88
|
break;
|
54
89
|
case 'enum':
|
55
90
|
var multiple_values = ((field_value instanceof Array) ? true : false)
|
56
|
-
control = '<select
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
91
|
+
control = $('<select class="select-single input-sm form-control"></select>')
|
92
|
+
.css('display', multiple_values ? 'none' : 'inline-block')
|
93
|
+
.prop('name', multiple_values ? undefined : value_name)
|
94
|
+
.data('name', value_name)
|
95
|
+
.append('<option value="_discard">...</option>')
|
96
|
+
.append(required ? [] : [
|
97
|
+
$('<option value="_present"></option>').prop('selected', field_value == "_present").text(RailsAdmin.I18n.t("is_present")),
|
98
|
+
$('<option value="_blank"></option>').prop('selected', field_value == "_blank").text(RailsAdmin.I18n.t("is_blank")),
|
99
|
+
'<option disabled="disabled">---------</option>'
|
100
|
+
])
|
101
|
+
.append(select_options)
|
102
|
+
.add(
|
103
|
+
$('<select multiple="multiple" class="select-multiple input-sm form-control"></select>')
|
104
|
+
.css('display', multiple_values ? 'inline-block' : 'none')
|
105
|
+
.prop('name', multiple_values ? value_name + '[]' : undefined)
|
106
|
+
.data('name', value_name + '[]')
|
107
|
+
.append(select_options)
|
108
|
+
)
|
109
|
+
.add(
|
110
|
+
$('<a href="#" class="switch-select"></a>')
|
111
|
+
.append($('<i></i>').addClass('icon-' + (multiple_values ? 'minus' : 'plus')))
|
112
|
+
);
|
67
113
|
break;
|
68
114
|
case 'string':
|
69
115
|
case 'text':
|
70
116
|
case 'belongs_to_association':
|
71
|
-
control = '<select class="switch-
|
72
|
-
|
73
|
-
|
74
|
-
'<option
|
75
|
-
'<option data-additional-fieldset="additional-fieldset"
|
76
|
-
'<option
|
77
|
-
'<option
|
78
|
-
'<option
|
79
|
-
|
80
|
-
|
117
|
+
control = $('<select class="switch-additional-fieldsets input-sm form-control"></select>')
|
118
|
+
.prop('value', field_operator)
|
119
|
+
.prop('name', operator_name)
|
120
|
+
.append('<option value="_discard">...</option>')
|
121
|
+
.append($('<option data-additional-fieldset="additional-fieldset" value="like"></option>').prop('selected', field_operator == "like").text(RailsAdmin.I18n.t("contains")))
|
122
|
+
.append($('<option data-additional-fieldset="additional-fieldset" value="is"></option>').prop('selected', field_operator == "is").text(RailsAdmin.I18n.t("is_exactly")))
|
123
|
+
.append($('<option data-additional-fieldset="additional-fieldset" value="starts_with"></option>').prop('selected', field_operator == "starts_with").text(RailsAdmin.I18n.t("starts_with")))
|
124
|
+
.append($('<option data-additional-fieldset="additional-fieldset" value="ends_with"></option>').prop('selected', field_operator == "ends_with").text(RailsAdmin.I18n.t("ends_with")))
|
125
|
+
if (!required) {
|
126
|
+
control.append([
|
127
|
+
'<option disabled="disabled">---------</option>',
|
128
|
+
$('<option value="_present"></option>').prop('selected', field_operator == "_present").text(RailsAdmin.I18n.t("is_present")),
|
129
|
+
$('<option value="_blank"></option>').prop('selected', field_operator == "_blank").text(RailsAdmin.I18n.t("is_blank"))
|
130
|
+
])
|
131
|
+
}
|
132
|
+
additional_control = $('<input class="additional-fieldset input-sm form-control" type="text" />')
|
133
|
+
.css('display', field_operator == "_present" || field_operator == "_blank" ? 'none' : 'inline-block')
|
134
|
+
.prop('name', value_name)
|
135
|
+
.prop('value', field_value);
|
81
136
|
break;
|
82
137
|
case 'integer':
|
83
138
|
case 'decimal':
|
84
139
|
case 'float':
|
85
|
-
control = '<select class="switch-
|
86
|
-
|
87
|
-
'<option
|
88
|
-
'<option
|
89
|
-
|
90
|
-
|
91
|
-
|
140
|
+
control = $('<select class="switch-additional-fieldsets input-sm form-control"></select>')
|
141
|
+
.prop('name', operator_name)
|
142
|
+
.append($('<option data-additional-fieldset="default" value="default"></option>').prop('selected', field_operator == "default").text(RailsAdmin.I18n.t("number")))
|
143
|
+
.append($('<option data-additional-fieldset="between" value="between"></option>').prop('selected', field_operator == "between").text(RailsAdmin.I18n.t("between_and_")))
|
144
|
+
if (!required) {
|
145
|
+
control.append([
|
146
|
+
'<option disabled="disabled">---------</option>',
|
147
|
+
$('<option value="_not_null"></option>').prop('selected', field_operator == "_not_null").text(RailsAdmin.I18n.t("is_present")),
|
148
|
+
$('<option value="_null"></option>').prop('selected', field_operator == "_null").text(RailsAdmin.I18n.t("is_blank"))
|
149
|
+
])
|
150
|
+
}
|
92
151
|
additional_control =
|
93
|
-
|
94
|
-
|
95
|
-
|
152
|
+
$('<input class="additional-fieldset default input-sm form-control" type="text" />')
|
153
|
+
.css('display', (!field_operator || field_operator == "default") ? 'inline-block' : 'none')
|
154
|
+
.prop('type', field_type)
|
155
|
+
.prop('name', value_name + '[]')
|
156
|
+
.prop('value', field_value[0] || '')
|
157
|
+
.add(
|
158
|
+
$('<input placeholder="-∞" class="additional-fieldset between input-sm form-control" />')
|
159
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
160
|
+
.prop('type', field_type)
|
161
|
+
.prop('name', value_name + '[]')
|
162
|
+
.prop('value', field_value[1] || '')
|
163
|
+
)
|
164
|
+
.add(
|
165
|
+
$('<input placeholder="∞" class="additional-fieldset between input-sm form-control" />')
|
166
|
+
.css('display', (field_operator == "between") ? 'inline-block' : 'none')
|
167
|
+
.prop('type', field_type)
|
168
|
+
.prop('name', value_name + '[]')
|
169
|
+
.prop('value', field_value[2] || '')
|
170
|
+
);
|
96
171
|
break;
|
97
172
|
default:
|
98
|
-
control = '<input type="text" class="input-sm form-control"
|
173
|
+
control = $('<input type="text" class="input-sm form-control" />')
|
174
|
+
.prop('name', value_name)
|
175
|
+
.prop('value', field_value);
|
99
176
|
break;
|
100
177
|
}
|
101
178
|
|
179
|
+
var filterContainerId = field_name + '-' + index + '-filter-container';
|
180
|
+
$('p#' + filterContainerId).remove();
|
181
|
+
|
102
182
|
var $content = $('<p>')
|
183
|
+
.attr('id', filterContainerId)
|
103
184
|
.addClass('filter form-search')
|
104
|
-
.append(
|
105
|
-
|
185
|
+
.append(
|
186
|
+
$('<span class="label label-info form-label"></span>')
|
187
|
+
.append($('<a href="#delete" class="delete"></a>').append('<i class="fa fa-trash-o fa-fw icon-white"></i>').append(document.createTextNode(field_label)))
|
188
|
+
)
|
189
|
+
.append(' ')
|
190
|
+
.append(control)
|
191
|
+
.append(' ')
|
192
|
+
.append(additional_control);
|
106
193
|
|
107
194
|
$('#filters_box').append($content);
|
108
195
|
|
@@ -125,6 +212,7 @@
|
|
125
212
|
value: $(this).data('field-value'),
|
126
213
|
operator: $(this).data('field-operator'),
|
127
214
|
select_options: $(this).data('field-options'),
|
215
|
+
required: $(this).data('field-required'),
|
128
216
|
index: $.now().toString().slice(6,11),
|
129
217
|
datetimepicker_format: $(this).data('field-datetimepicker-format')
|
130
218
|
});
|
@@ -146,7 +234,7 @@
|
|
146
234
|
$(this).find('i').toggleClass("icon-plus icon-minus")
|
147
235
|
});
|
148
236
|
|
149
|
-
$(document).on('change', "#filters_box .switch-
|
237
|
+
$(document).on('change', "#filters_box .switch-additional-fieldsets", function(e) {
|
150
238
|
var selected_option = $(this).find('option:selected');
|
151
239
|
if(klass = $(selected_option).data('additional-fieldset')) {
|
152
240
|
$(this).siblings('.additional-fieldset:not(.' + klass + ')').hide('slow');
|