wice_grid 3.6.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +41 -0
- data/.circleci/run-build-locally.sh +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- data/.gitignore +5 -2
- data/Appraisals +11 -0
- data/CHANGELOG.md +38 -1
- data/Gemfile.lock +299 -0
- data/README.md +77 -34
- data/config/locales/ja.yml +3 -3
- data/gemfiles/rails_5.0.gemfile +7 -0
- data/gemfiles/rails_5.0.gemfile.lock +291 -0
- data/gemfiles/rails_5.1.gemfile +7 -0
- data/gemfiles/rails_5.1.gemfile.lock +291 -0
- data/gemfiles/rails_5.2.gemfile +7 -0
- data/gemfiles/rails_5.2.gemfile.lock +299 -0
- data/lib/wice/columns.rb +13 -6
- data/lib/wice/columns/column_integer.rb +11 -1
- data/lib/wice/columns/column_rails_datetime_helper.rb +3 -2
- data/lib/wice/columns/column_range.rb +6 -4
- data/lib/wice/grid_renderer.rb +23 -7
- data/lib/wice/helpers/bs_calendar_helpers.rb +9 -1
- data/lib/wice/helpers/wice_grid_view_helpers.rb +6 -6
- data/lib/wice/wice_grid_controller.rb +7 -5
- data/lib/wice/wice_grid_core_ext.rb +5 -1
- data/lib/wice/wice_grid_misc.rb +1 -1
- data/lib/wice_grid.rb +86 -59
- data/spec/acceptance_helper.rb +58 -0
- data/spec/features/action_column_request_spec.rb +280 -0
- data/spec/features/adding_rows_request_spec.rb +21 -0
- data/spec/features/all_records_request_spec.rb +18 -0
- data/spec/features/auto_reloads2_request_spec.rb +349 -0
- data/spec/features/auto_reloads3_request_spec.rb +130 -0
- data/spec/features/auto_reloads_request_spec.rb +348 -0
- data/spec/features/basics1_request_spec.rb +11 -0
- data/spec/features/basics2_request_spec.rb +10 -0
- data/spec/features/basics3_request_spec.rb +29 -0
- data/spec/features/basics4_request_spec.rb +19 -0
- data/spec/features/basics5_request_spec.rb +13 -0
- data/spec/features/basics6_request_spec.rb +22 -0
- data/spec/features/blockless_column_definition_spec.rb +27 -0
- data/spec/features/buttons_request_spec.rb +172 -0
- data/spec/features/csv_and_detached_filters_spec.rb +10 -0
- data/spec/features/csv_export_request_spec.rb +13 -0
- data/spec/features/custom_filter_params_request_spec.rb +29 -0
- data/spec/features/custom_filters1_request_spec.rb +155 -0
- data/spec/features/custom_filters2_request_spec.rb +53 -0
- data/spec/features/custom_filters3_request_spec.rb +50 -0
- data/spec/features/custom_filters4_request_spec.rb +13 -0
- data/spec/features/custom_ordering_on_calculated_request_spec.rb +30 -0
- data/spec/features/custom_ordering_request_spec.rb +36 -0
- data/spec/features/custom_ordering_with_arel_request_spec.rb +36 -0
- data/spec/features/custom_ordering_with_proc_request_spec.rb +44 -0
- data/spec/features/custom_ordering_with_ruby_request_spec.rb +30 -0
- data/spec/features/dates_request_spec.rb +56 -0
- data/spec/features/detached_filters_spec.rb +10 -0
- data/spec/features/detached_filters_two_grids_spec.rb +127 -0
- data/spec/features/disable_all_filters_spec.rb +22 -0
- data/spec/features/hiding_checkboxes_in_action_column_request_spec.rb +294 -0
- data/spec/features/integration_with_application_view_request_spec.rb +43 -0
- data/spec/features/integration_with_forms_request_spec.rb +141 -0
- data/spec/features/joining_tables_spec.rb +40 -0
- data/spec/features/localization_request_spec.rb +24 -0
- data/spec/features/many_grids_on_page_request_spec.rb +104 -0
- data/spec/features/negation_request_spec.rb +25 -0
- data/spec/features/no_records_request_spec.rb +26 -0
- data/spec/features/numeric_filters_request_spec.rb +10 -0
- data/spec/features/resultset_processings2_request_spec.rb +27 -0
- data/spec/features/resultset_processings_request_spec.rb +30 -0
- data/spec/features/saved_queries_request_spec.rb +120 -0
- data/spec/features/shared.rb +1005 -0
- data/spec/features/shared_detached_filters.rb +158 -0
- data/spec/features/styling_spec.rb +15 -0
- data/spec/features/two_associations_spec.rb +48 -0
- data/spec/features/upper_pagination_panel_request_spec.rb +23 -0
- data/spec/features/when_filtered_spec.rb +209 -0
- data/spec/fixtures/.gitkeep +0 -0
- data/spec/fixtures/companies.yml +21 -0
- data/spec/fixtures/priorities.yml +31 -0
- data/spec/fixtures/project_roles.yml +25 -0
- data/spec/fixtures/projects.yml +22 -0
- data/spec/fixtures/statuses.yml +55 -0
- data/spec/fixtures/tasks.yml +751 -0
- data/spec/fixtures/tasks_users.yml +2089 -0
- data/spec/fixtures/users.yml +61 -0
- data/spec/fixtures/versions.yml +78 -0
- data/spec/models/company_spec.rb +6 -0
- data/spec/models/priority_spec.rb +6 -0
- data/spec/models/project_spec.rb +11 -0
- data/spec/models/status_spec.rb +6 -0
- data/spec/models/task_spec.rb +12 -0
- data/spec/models/user_project_participation_spec.rb +7 -0
- data/spec/models/user_spec.rb +12 -0
- data/spec/models/version_spec.rb +5 -0
- data/spec/rails_helper.rb +15 -0
- data/spec/spec_helper.rb +10 -9
- data/spec/support/test_app/Rakefile +3 -0
- data/spec/support/test_app/app/assets/javascripts/application.js +20 -0
- data/spec/support/test_app/app/assets/javascripts/common.js.coffee +6 -0
- data/spec/support/test_app/app/assets/javascripts/jquery.ui.datepicker.locales.js +56 -0
- data/spec/support/test_app/app/assets/stylesheets/adding_rows.scss +3 -0
- data/spec/support/test_app/app/assets/stylesheets/application.scss +46 -0
- data/spec/support/test_app/app/assets/stylesheets/csv_and_detached_filters.scss +3 -0
- data/spec/support/test_app/app/assets/stylesheets/many_grids_on_page.scss +3 -0
- data/spec/support/test_app/app/controllers/action_column_controller.rb +15 -0
- data/spec/support/test_app/app/controllers/adding_rows_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/all_records_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/application_controller.rb +99 -0
- data/spec/support/test_app/app/controllers/auto_reloads2_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/auto_reloads3_controller.rb +20 -0
- data/spec/support/test_app/app/controllers/auto_reloads_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/basics1_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics2_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics3_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics4_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics5_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics6_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/blockless_column_definition_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/buttons_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/csv_and_detached_filters_controller.rb +13 -0
- data/spec/support/test_app/app/controllers/csv_export_controller.rb +28 -0
- data/spec/support/test_app/app/controllers/custom_filter_params_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/custom_filters1_controller.rb +9 -0
- data/spec/support/test_app/app/controllers/custom_filters2_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/custom_filters3_controller.rb +12 -0
- data/spec/support/test_app/app/controllers/custom_filters4_controller.rb +12 -0
- data/spec/support/test_app/app/controllers/custom_ordering_controller.rb +18 -0
- data/spec/support/test_app/app/controllers/custom_ordering_on_calculated_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_arel_controller.rb +18 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_proc_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_ruby_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/dates_controller.rb +8 -0
- data/spec/support/test_app/app/controllers/detached_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/detached_filters_two_grids_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/disable_all_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/hiding_checkboxes_in_action_column_controller.rb +13 -0
- data/spec/support/test_app/app/controllers/home_controller.rb +3 -0
- data/spec/support/test_app/app/controllers/integration_with_application_view_controller.rb +16 -0
- data/spec/support/test_app/app/controllers/integration_with_forms_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/joining_tables_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/localization_controller.rb +26 -0
- data/spec/support/test_app/app/controllers/many_grids_on_page_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/negation_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/no_records_controller.rb +8 -0
- data/spec/support/test_app/app/controllers/null_values_controller.rb +10 -0
- data/spec/support/test_app/app/controllers/numeric_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/queries_controller.rb +4 -0
- data/spec/support/test_app/app/controllers/resultset_processings2_controller.rb +29 -0
- data/spec/support/test_app/app/controllers/resultset_processings_controller.rb +30 -0
- data/spec/support/test_app/app/controllers/saved_queries_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/styling_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/tasks_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/two_associations_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/upper_pagination_panel_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/when_filtered_controller.rb +6 -0
- data/spec/support/test_app/app/helpers/application_helper.rb +82 -0
- data/spec/support/test_app/app/mailers/.gitkeep +0 -0
- data/spec/support/test_app/app/models/.gitkeep +0 -0
- data/spec/support/test_app/app/models/company.rb +5 -0
- data/spec/support/test_app/app/models/populate.rb +84 -0
- data/spec/support/test_app/app/models/priority.rb +10 -0
- data/spec/support/test_app/app/models/project.rb +14 -0
- data/spec/support/test_app/app/models/project_role.rb +3 -0
- data/spec/support/test_app/app/models/status.rb +10 -0
- data/spec/support/test_app/app/models/task.rb +11 -0
- data/spec/support/test_app/app/models/to_dropdown_mixin.rb +16 -0
- data/spec/support/test_app/app/models/user.rb +8 -0
- data/spec/support/test_app/app/models/user_project_participation.rb +6 -0
- data/spec/support/test_app/app/models/version.rb +6 -0
- data/spec/support/test_app/app/views/action_column/_grid.html.erb +35 -0
- data/spec/support/test_app/app/views/action_column/index.html.haml +45 -0
- data/spec/support/test_app/app/views/adding_rows/_grid.html.erb +58 -0
- data/spec/support/test_app/app/views/adding_rows/index.html.haml +37 -0
- data/spec/support/test_app/app/views/all_records/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/all_records/index.html.haml +12 -0
- data/spec/support/test_app/app/views/auto_reloads/_grid.html.erb +32 -0
- data/spec/support/test_app/app/views/auto_reloads/index.html.haml +15 -0
- data/spec/support/test_app/app/views/auto_reloads2/_grid.html.erb +32 -0
- data/spec/support/test_app/app/views/auto_reloads2/index.html.haml +65 -0
- data/spec/support/test_app/app/views/auto_reloads3/_grid.html.erb +25 -0
- data/spec/support/test_app/app/views/auto_reloads3/index.html.haml +78 -0
- data/spec/support/test_app/app/views/basics1/_grid.html.erb +26 -0
- data/spec/support/test_app/app/views/basics1/index.html.haml +13 -0
- data/spec/support/test_app/app/views/basics2/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/basics2/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics3/_grid.html.erb +28 -0
- data/spec/support/test_app/app/views/basics3/index.html.haml +13 -0
- data/spec/support/test_app/app/views/basics4/_grid.html.erb +21 -0
- data/spec/support/test_app/app/views/basics4/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics5/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/basics5/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics6/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/basics6/index.html.haml +23 -0
- data/spec/support/test_app/app/views/blockless_column_definition/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/blockless_column_definition/index.html.haml +15 -0
- data/spec/support/test_app/app/views/buttons/_grid.html.erb +20 -0
- data/spec/support/test_app/app/views/buttons/index.html.haml +30 -0
- data/spec/support/test_app/app/views/csv_and_detached_filters/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/csv_and_detached_filters/index.html.haml +58 -0
- data/spec/support/test_app/app/views/csv_export/_projects_grid.html.erb +17 -0
- data/spec/support/test_app/app/views/csv_export/_tasks_grid.html.erb +43 -0
- data/spec/support/test_app/app/views/csv_export/index.html.haml +90 -0
- data/spec/support/test_app/app/views/custom_filter_params/_grid.html.erb +12 -0
- data/spec/support/test_app/app/views/custom_filter_params/index.html.haml +12 -0
- data/spec/support/test_app/app/views/custom_filters1/_g1.html.erb +8 -0
- data/spec/support/test_app/app/views/custom_filters1/_g2.html.erb +9 -0
- data/spec/support/test_app/app/views/custom_filters1/_g3.html.erb +9 -0
- data/spec/support/test_app/app/views/custom_filters1/_g4.html.erb +8 -0
- data/spec/support/test_app/app/views/custom_filters1/index.html.haml +30 -0
- data/spec/support/test_app/app/views/custom_filters2/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/custom_filters2/index.html.haml +41 -0
- data/spec/support/test_app/app/views/custom_filters3/_grid.html.erb +18 -0
- data/spec/support/test_app/app/views/custom_filters3/index.html.haml +16 -0
- data/spec/support/test_app/app/views/custom_filters4/_grid.html.erb +20 -0
- data/spec/support/test_app/app/views/custom_filters4/index.html.haml +12 -0
- data/spec/support/test_app/app/views/custom_ordering/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering/index.html.haml +24 -0
- data/spec/support/test_app/app/views/custom_ordering_on_calculated/_grid.html.erb +14 -0
- data/spec/support/test_app/app/views/custom_ordering_on_calculated/index.html.haml +23 -0
- data/spec/support/test_app/app/views/custom_ordering_with_arel/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_arel/index.html.haml +24 -0
- data/spec/support/test_app/app/views/custom_ordering_with_proc/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_proc/index.html.haml +21 -0
- data/spec/support/test_app/app/views/custom_ordering_with_ruby/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_ruby/index.html.haml +23 -0
- data/spec/support/test_app/app/views/dates/_grid.html.erb +25 -0
- data/spec/support/test_app/app/views/dates/index.html.haml +52 -0
- data/spec/support/test_app/app/views/detached_filters/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/detached_filters/index.html.haml +79 -0
- data/spec/support/test_app/app/views/detached_filters_two_grids/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/detached_filters_two_grids/index.html.haml +85 -0
- data/spec/support/test_app/app/views/disable_all_filters/_grid.html.erb +21 -0
- data/spec/support/test_app/app/views/disable_all_filters/index.html.haml +14 -0
- data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/_grid.html.erb +34 -0
- data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/index.html.haml +32 -0
- data/spec/support/test_app/app/views/integration_with_application_view/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/integration_with_application_view/index.html.haml +33 -0
- data/spec/support/test_app/app/views/integration_with_forms/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/integration_with_forms/index.html.haml +18 -0
- data/spec/support/test_app/app/views/joining_tables/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/joining_tables/index.html.haml +26 -0
- data/spec/support/test_app/app/views/layouts/application.html.haml +61 -0
- data/spec/support/test_app/app/views/localization/_grid.html.erb +36 -0
- data/spec/support/test_app/app/views/localization/index.html.haml +20 -0
- data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid1.html.erb +12 -0
- data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid2.html.erb +12 -0
- data/spec/support/test_app/app/views/many_grids_on_page/index.html.haml +26 -0
- data/spec/support/test_app/app/views/negation/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/negation/index.html.haml +15 -0
- data/spec/support/test_app/app/views/no_records/_empty_grid.html.haml +1 -0
- data/spec/support/test_app/app/views/no_records/_grid1.html.erb +11 -0
- data/spec/support/test_app/app/views/no_records/_grid2.html.erb +9 -0
- data/spec/support/test_app/app/views/no_records/_grid3.html.erb +9 -0
- data/spec/support/test_app/app/views/no_records/index.html.haml +24 -0
- data/spec/support/test_app/app/views/null_values/_grid.html.erb +17 -0
- data/spec/support/test_app/app/views/null_values/index.html.haml +21 -0
- data/spec/support/test_app/app/views/numeric_filters/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/numeric_filters/index.html.haml +12 -0
- data/spec/support/test_app/app/views/resultset_processings/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/resultset_processings/index.html.haml +50 -0
- data/spec/support/test_app/app/views/resultset_processings2/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/resultset_processings2/index.html.haml +48 -0
- data/spec/support/test_app/app/views/saved_queries/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/saved_queries/index.html.haml +15 -0
- data/spec/support/test_app/app/views/styling/_grid1.html.erb +12 -0
- data/spec/support/test_app/app/views/styling/_grid2.html.erb +31 -0
- data/spec/support/test_app/app/views/styling/index.html.haml +65 -0
- data/spec/support/test_app/app/views/tasks/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/tasks/index.html.haml +1 -0
- data/spec/support/test_app/app/views/two_associations/_grid.html.erb +13 -0
- data/spec/support/test_app/app/views/two_associations/index.html.haml +13 -0
- data/spec/support/test_app/app/views/upper_pagination_panel/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/upper_pagination_panel/index.html.haml +14 -0
- data/spec/support/test_app/app/views/when_filtered/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/when_filtered/index.html.haml +15 -0
- data/spec/support/test_app/bin/rails +4 -0
- data/spec/support/test_app/bin/rake +4 -0
- data/spec/support/test_app/config.ru +5 -0
- data/spec/support/test_app/config/application.rb +70 -0
- data/spec/support/test_app/config/boot.rb +7 -0
- data/spec/support/test_app/config/database.travis.yml +27 -0
- data/spec/support/test_app/config/database.yml +16 -0
- data/spec/support/test_app/config/database.yml.mysql +19 -0
- data/spec/support/test_app/config/database.yml.postgresql +18 -0
- data/spec/support/test_app/config/environment.rb +6 -0
- data/spec/support/test_app/config/environments/development.rb +34 -0
- data/spec/support/test_app/config/environments/production.rb +66 -0
- data/spec/support/test_app/config/environments/test.rb +34 -0
- data/spec/support/test_app/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/support/test_app/config/initializers/inflections.rb +16 -0
- data/spec/support/test_app/config/initializers/mime_types.rb +6 -0
- data/spec/support/test_app/config/initializers/secret_token.rb +12 -0
- data/spec/support/test_app/config/initializers/session_store.rb +9 -0
- data/spec/support/test_app/config/initializers/wice_grid_config.rb +163 -0
- data/spec/support/test_app/config/initializers/wrap_parameters.rb +15 -0
- data/spec/support/test_app/config/locales/en.yml +5 -0
- data/spec/support/test_app/config/locales/wice_grid.yml +550 -0
- data/spec/support/test_app/config/puma.rb +15 -0
- data/spec/support/test_app/config/routes.rb +125 -0
- data/spec/support/test_app/db/migrate/20120224193505_create_tasks.rb +27 -0
- data/spec/support/test_app/db/migrate/20120224193517_create_users.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224193522_create_projects.rb +14 -0
- data/spec/support/test_app/db/migrate/20120224193529_create_priorities.rb +13 -0
- data/spec/support/test_app/db/migrate/20120224193537_create_statuses.rb +13 -0
- data/spec/support/test_app/db/migrate/20120224193543_create_versions.rb +15 -0
- data/spec/support/test_app/db/migrate/20120224193550_create_project_roles.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224193610_create_companies.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224195351_create_user_project_participations.rb +16 -0
- data/spec/support/test_app/db/migrate/20120224195521_add_tasks_users.rb +11 -0
- data/spec/support/test_app/db/migrate/20120610091944_create_wice_grid_serialized_queries.rb +14 -0
- data/spec/support/test_app/db/schema.rb +139 -0
- data/spec/support/test_app/db/seeds.rb +10 -0
- data/spec/support/test_app/lib/ar_fixtures.rb +100 -0
- data/spec/support/test_app/lib/assets/.gitkeep +0 -0
- data/spec/support/test_app/lib/tasks/.gitkeep +0 -0
- data/spec/support/test_app/lib/tasks/ar_fixtures.rake +45 -0
- data/spec/support/test_app/public/404.html +26 -0
- data/spec/support/test_app/public/422.html +26 -0
- data/spec/support/test_app/public/500.html +25 -0
- data/spec/support/test_app/public/favicon.ico +0 -0
- data/spec/support/test_app/public/robots.txt +5 -0
- data/spec/wice/grid_output_buffer_spec.rb +2 -2
- data/spec/wice/table_column_matrix_spec.rb +1 -1
- data/vendor/assets/javascripts/wice_grid_init.js.coffee +16 -4
- data/vendor/assets/javascripts/wice_grid_saved_queries_init.js.coffee +1 -0
- data/wice_grid.gemspec +29 -9
- metadata +606 -62
- data/release_notes/RELEASE_NOTES_3.2.pre1.rdoc +0 -81
- data/release_notes/RELEASE_NOTES_3.2.pre2.rdoc +0 -6
- data/release_notes/RELEASE_NOTES_3.3.0.rdoc +0 -21
- data/spec/support/wice_grid_test_config.rb +0 -173
- data/test/readme.txt +0 -1
@@ -1,81 +0,0 @@
|
|
1
|
-
1. Support for Prototype has been dropped. No hard feelings, Prototype, no matter what
|
2
|
-
others say, I liked you :)
|
3
|
-
|
4
|
-
2. All assets are in the asset pipeline. All javascript is now coffeescript. No more Rails
|
5
|
-
2 legacy in the form of obtrusive javascript in the HTML page. The styles file is copied
|
6
|
-
to the application asset directory by a generate task so that is it easy to modify it to
|
7
|
-
the application needs. The javascript and images are loaded from the plugin. Read the
|
8
|
-
Installation section in README for details. Thanks to the asset pipeline taking care of
|
9
|
-
loading assets for us, methods +include_wice_grid_assets+, +names_of_wice_grid_stylesheets+,
|
10
|
-
and +names_of_wice_grid_javascripts+ have been removed
|
11
|
-
|
12
|
-
3. ERB mode has been removed. It had never been used by anyone and is bad style anyway. In
|
13
|
-
case you have no idea what it was, here's what it was:
|
14
|
-
|
15
|
-
<% grid(@countries_grid, :erb_mode => true) do |g| %>
|
16
|
-
<% g.column :column_name => 'Name', :attribute_name => 'name' do |country| %>
|
17
|
-
<b>Name: <%= link_to(country.name, country_path(country)) %></b>
|
18
|
-
<% end %>
|
19
|
-
<% end -%>
|
20
|
-
|
21
|
-
4. WiceGrid is compatible with Twitter Bootstrap out of the box.
|
22
|
-
|
23
|
-
5. Paths to various images used by WiceGrid have been removed from the configuration file
|
24
|
-
and are now defined only in the css file. Developers are encouraged to modify
|
25
|
-
<tt>wice_grid.scss</tt> to use other images and to change the styles in general.
|
26
|
-
|
27
|
-
6. The markup and css classes that WiceGrid generates have changed, and CSS for older versions
|
28
|
-
of WiceGrid might not work. Inspect the source code.
|
29
|
-
|
30
|
-
7. Parameter names in the grid helper have been renamed:
|
31
|
-
* <tt>:table_html_attrs</tt> becomes <tt>:html</tt>
|
32
|
-
* <tt>:header_tr_html_attrs</tt> becomes <tt>:header_tr_html</tt>
|
33
|
-
|
34
|
-
8. Parameter names in column definitions have been renamed:
|
35
|
-
* <tt>:column_name</tt> becomes <tt>:name</tt>
|
36
|
-
* <tt>:attribute_name</tt> becomes <tt>:attribute</tt>
|
37
|
-
* <tt>:model_class</tt> becomes <tt>:model</tt>
|
38
|
-
* <tt>:allow_ordering</tt> becomes <tt>:ordering</tt>
|
39
|
-
* <tt>:td_html_attrs</tt> becomes <tt>:html</tt>
|
40
|
-
* Negation in the parameter name does not contribute to the simplicity of an API, so
|
41
|
-
<tt>:no_filter</tt> in becomes <tt>:filter</tt>. Consequently, <tt>:no_filter => true</tt>
|
42
|
-
becomes <tt>:filter => false</tt>
|
43
|
-
* <tt>:negation_in_filter</tt> becomes <tt>:negation</tt>
|
44
|
-
|
45
|
-
|
46
|
-
9. New configuration parameter <tt>DEFAULT_TABLE_CLASSES</tt> contains CSS classes added to
|
47
|
-
all WiceGrid tables by default.
|
48
|
-
|
49
|
-
10. In previous versions of WiceGrid in the jQuery mode DateTime filters used to automatically
|
50
|
-
fall back on Rails DateTime helpers due to absence of time controls in jQuery DatePicker.
|
51
|
-
In version 3.2 this behavior has been changed to always use jQuery DatePicker, even with
|
52
|
-
DateTime filters. Of course it is possible to force Rails DateTime with
|
53
|
-
<tt>:helper_style => :standard</tt> in the column definition.
|
54
|
-
|
55
|
-
11. The second variable injected into to <tt>before_row</tt> and <tt>after_row</tt> block,
|
56
|
-
and the first parameter injected into the <tt>last_row</tt> is the number of columns in
|
57
|
-
the current grid.
|
58
|
-
|
59
|
-
12. <tt>:csv_field_separator</tt> is a new parameter for +initialize_grid+ defining the field
|
60
|
-
separator in CSV files. The default separator is defined by +CSV_FIELD_SEPARATOR+ in the
|
61
|
-
config file.
|
62
|
-
|
63
|
-
13. New parameter +:confirm+ for +saved_queries_panel+ which turns on or off the JS confirm
|
64
|
-
dialogs when deleting saved queries.
|
65
|
-
|
66
|
-
14. Instead of the old rake task creating a table for serialized queries a generator has been
|
67
|
-
added which adds a migration file to +db/migrations+.
|
68
|
-
|
69
|
-
15. Instead of using helpers +submit_grid_javascript+ and +reset_grid_javascript+ to create
|
70
|
-
external Submit and Reset buttons all you have to do is add a button or any other
|
71
|
-
clickable HTML element with class +wg-external-submit-button+ or +wg-external-reset-button+,
|
72
|
-
and attribute +data-grid-name+ whose value is the name of the grid:
|
73
|
-
|
74
|
-
<button class="wg-external-submit-button" data-grid-name="grid">Submit</button>
|
75
|
-
<button class="wg-external-reset-button" data-grid-name="grid">Reset</button>
|
76
|
-
|
77
|
-
|
78
|
-
The same goes for the external CSV export button, only the CSS class is
|
79
|
-
+wg-external-csv-export-button+:
|
80
|
-
|
81
|
-
<button class="wg-external-csv-export-button" data-grid-name="grid">Export To CSV</button>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
1. +will_paginate+ is replaced by +kaminari+.
|
2
|
-
2. The detached filter API has changed. No more magical invocation of the +grid+ helper two times.
|
3
|
-
First, +define_grid+ is used in the same way as +grid+, then +grid_filter+,
|
4
|
-
and then <tt>render_grid(@grid)</tt> to actually output the grid table .
|
5
|
-
3. No more polluting core Ruby classes like Hash and Array with methods. All such methods
|
6
|
-
are now private to the plugin.
|
@@ -1,21 +0,0 @@
|
|
1
|
-
the with_paginated_resultset callback receives an ActiveRelation object, not a lambda
|
2
|
-
|
3
|
-
Wice::Defaults::DATEPICKER_YEAR_RANGE added to the config to define the default year range in Datepicker (https://github.com/leikind/wice_grid/issues/61)
|
4
|
-
|
5
|
-
improvement of the javascript calendar control: if the FROM field is set to a value after TO, TO is set to the value of FROM. Vice versa: if the TO field is set to a value before FROM, FROM is set to the value of TO
|
6
|
-
|
7
|
-
New view helpers filter_and_order_state_as_hash(grid) and filter_state_as_hash(grid)
|
8
|
-
|
9
|
-
<caption> supported
|
10
|
-
|
11
|
-
support for Ruby 2.0
|
12
|
-
|
13
|
-
2 errors fixed in the Saved Queries UI ( https://github.com/leikind/wice_grid/issues/89 )
|
14
|
-
|
15
|
-
bug fixed: extra_request_parameters not propagating to the pagination panel
|
16
|
-
|
17
|
-
README: made it clear that Datepicker has to be installed separately
|
18
|
-
|
19
|
-
README: made it clear that css is basis and that Twitter Bootstrap is supported
|
20
|
-
|
21
|
-
|
@@ -1,173 +0,0 @@
|
|
1
|
-
# Default number of rows to show per page.
|
2
|
-
Wice::Defaults::PER_PAGE = 20
|
3
|
-
|
4
|
-
# Default order direction
|
5
|
-
Wice::Defaults::ORDER_DIRECTION = 'asc'
|
6
|
-
|
7
|
-
# Default name for a grid. A grid name is the basis for a lot of
|
8
|
-
# names including parameter names, DOM IDs, etc
|
9
|
-
# The shorter the name is the shorter the request URI will be.
|
10
|
-
Wice::Defaults::GRID_NAME = 'grid'
|
11
|
-
|
12
|
-
# If REUSE_LAST_COLUMN_FOR_FILTER_ICONS is true and the last column doesn't have any filter and column name, it will be used
|
13
|
-
# for filter related icons (filter icon, reset icon, show/hide icon), otherwise an additional table column is added.
|
14
|
-
Wice::Defaults::REUSE_LAST_COLUMN_FOR_FILTER_ICONS = true
|
15
|
-
|
16
|
-
# The label of the first option of a custom dropdown list meaning 'All items'
|
17
|
-
Wice::Defaults::CUSTOM_FILTER_ALL_LABEL = '--'
|
18
|
-
|
19
|
-
# A list of classes for the table tag of the grid
|
20
|
-
Wice::Defaults::DEFAULT_TABLE_CLASSES = ['table', 'table-bordered', 'table-striped']
|
21
|
-
|
22
|
-
# Allow switching between a single and multiple selection modes in custom filters (dropdown boxes)
|
23
|
-
Wice::Defaults::ALLOW_MULTIPLE_SELECTION = true
|
24
|
-
|
25
|
-
# Show the upper pagination panel by default or not
|
26
|
-
Wice::Defaults::SHOW_UPPER_PAGINATION_PANEL = false
|
27
|
-
|
28
|
-
# Disabling CSV export by default
|
29
|
-
Wice::Defaults::ENABLE_EXPORT_TO_CSV = false
|
30
|
-
|
31
|
-
# Default CSV field separator
|
32
|
-
Wice::Defaults::CSV_FIELD_SEPARATOR = ','
|
33
|
-
|
34
|
-
# Default CSV encoding
|
35
|
-
Wice::Defaults::CSV_ENCODING = nil
|
36
|
-
|
37
|
-
# The strategy when to show the filter.
|
38
|
-
# * <tt>:when_filtered</tt> - when the table is the result of filtering
|
39
|
-
# * <tt>:always</tt> - show the filter always
|
40
|
-
# * <tt>:no</tt> - never show the filter
|
41
|
-
Wice::Defaults::SHOW_FILTER = :always
|
42
|
-
|
43
|
-
# A boolean value specifying if a change in a filter triggers reloading of the grid.
|
44
|
-
Wice::Defaults::AUTO_RELOAD = false
|
45
|
-
|
46
|
-
# SQL operator used for matching strings in string filters.
|
47
|
-
Wice::Defaults::STRING_MATCHING_OPERATOR = 'LIKE'
|
48
|
-
# STRING_MATCHING_OPERATOR = 'ILIKE' # Use this for Postgresql case-insensitive matching.
|
49
|
-
|
50
|
-
# Defining one string matching operator globally for the whole application turns is not enough
|
51
|
-
# when you connect to two databases one of which is MySQL and the other is Postgresql.
|
52
|
-
# If the key for an adapter is missing it will fall back to Wice::Defaults::STRING_MATCHING_OPERATOR
|
53
|
-
Wice::Defaults::STRING_MATCHING_OPERATORS = {
|
54
|
-
'ActiveRecord::ConnectionAdapters::MysqlAdapter' => 'LIKE',
|
55
|
-
'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' => 'ILIKE'
|
56
|
-
}
|
57
|
-
|
58
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
59
|
-
# Advanced Filters #
|
60
|
-
|
61
|
-
# Switch of the negation checkbox in all text filters
|
62
|
-
Wice::Defaults::NEGATION_IN_STRING_FILTERS = false
|
63
|
-
|
64
|
-
# Each WiceGrid filter column is defined in two classes, one used for rendering the filter, the other
|
65
|
-
# for generating query conditions. All these columns are in lib/wice/columns/*.rb .
|
66
|
-
# File lib/wice/columns/column_processor_index.rb lists all predefined processors.
|
67
|
-
# In most cases a processor is chosen automatically based on the DB column type,
|
68
|
-
# for example, integer columns
|
69
|
-
# can have two of processors, the default one with one input field, and a processor called "range",
|
70
|
-
# with 2 input fields. In this case it is possible to specify a processor in the column definition:
|
71
|
-
#
|
72
|
-
# g.column filter_type: :range
|
73
|
-
#
|
74
|
-
# It is also possible to define you own processors:
|
75
|
-
#
|
76
|
-
# Wice::Defaults::ADDITIONAL_COLUMN_PROCESSORS = {
|
77
|
-
# some_key_identifying_new_column_type: ['AViewColumnProcessorClass', 'ConditionsGeneratorClass'],
|
78
|
-
# another_key_identifying_new_column_type: ['AnotherViewColumnProcessorClass', 'AnotherConditionsGeneratorClass']
|
79
|
-
# }
|
80
|
-
#
|
81
|
-
# Column processor keys/names should not coincide with the existing keys/names (see lib/wice/columns/column_processor_index.rb)
|
82
|
-
# the value is a 2-element array with 2 strings, the first should be a name of view processor class inherited from
|
83
|
-
# Wice::Columns::ViewColumn, the second should be a name of conditions generator class inherited from
|
84
|
-
# Wice::Columns::ConditionsGeneratorColumn .
|
85
|
-
|
86
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
87
|
-
# Showing All Records #
|
88
|
-
|
89
|
-
# Enable or disable showing all records (non-paginated table)
|
90
|
-
Wice::Defaults::ALLOW_SHOWING_ALL_RECORDS = true
|
91
|
-
|
92
|
-
# If number of all queries is more than this value, the user will be given a warning message
|
93
|
-
Wice::Defaults::START_SHOWING_WARNING_FROM = 100
|
94
|
-
|
95
|
-
# Hide the "show all" link if the number of all records is more than...
|
96
|
-
# Force-resets back to pagination starting from this value.
|
97
|
-
# Set to nil to always show it
|
98
|
-
Wice::Defaults::SHOW_ALL_ALLOWED_UP_TO = nil
|
99
|
-
|
100
|
-
#
|
101
|
-
# set to nil to skip the check
|
102
|
-
Wice::Defaults::SWITCH_BACK_TO_PAGINATION_FROM = nil
|
103
|
-
|
104
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
105
|
-
# Saving Queries #
|
106
|
-
|
107
|
-
# ActiveRecord model to store queries. Read the documentation for details
|
108
|
-
# QUERY_STORE_MODEL = 'WiceGridSerializedQuery'
|
109
|
-
Wice::Defaults::QUERY_STORE_MODEL = 'WiceGridSerializedQuery'
|
110
|
-
|
111
|
-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
|
112
|
-
# Here go settings related to the calendar helpers #
|
113
|
-
|
114
|
-
# The default style of the date and datetime helper
|
115
|
-
# * <tt>:calendar</tt> - JS calendar
|
116
|
-
# * <tt>:html5</tt> - HTML5 date input field
|
117
|
-
# * <tt>:standard</tt> - standard Rails date and datetime helpers
|
118
|
-
# * <tt>:bootstrap</tt> - Bootstrap datepicker helper
|
119
|
-
Wice::Defaults::HELPER_STYLE = :calendar
|
120
|
-
|
121
|
-
# Format of the datetime displayed.
|
122
|
-
# If you change the format, make sure to check if +DATETIME_PARSER+ can still parse this string.
|
123
|
-
Wice::Defaults::DATETIME_FORMAT = '%Y-%m-%d %H:%M'
|
124
|
-
|
125
|
-
# Format of the date displayed.
|
126
|
-
# If you change the format, make sure to check if +DATE_PARSER+ can still parse this string.
|
127
|
-
Wice::Defaults::DATE_FORMAT = '%Y-%m-%d'
|
128
|
-
|
129
|
-
# Format of the date displayed in jQuery's Datepicker
|
130
|
-
# If you change the format, make sure to check if +DATE_PARSER+ can still parse this string.
|
131
|
-
Wice::Defaults::DATE_FORMAT_JQUERY = 'yy-mm-dd'
|
132
|
-
|
133
|
-
# Format of the date displayed in Bootstrap's Datepicker
|
134
|
-
# If you change the format, make sure to check if +DATE_PARSER+ can still parse this string.
|
135
|
-
Wice::Defaults::DATE_FORMAT_BOOTSTRAP = 'yyyy-mm-dd'
|
136
|
-
|
137
|
-
# With Calendar helpers enabled the parameter sent is the string displayed. This lambda will be given a date string in the
|
138
|
-
# format defined by +DATETIME_FORMAT+ and must generate a DateTime object.
|
139
|
-
# In many cases <tt>Time.zone.parse</tt> is enough, for instance, <tt>%Y-%m-%d</tt>. If you change the format, make sure to check this code
|
140
|
-
# and modify it if needed.
|
141
|
-
Wice::Defaults::DATETIME_PARSER = lambda do |datetime_string|
|
142
|
-
if datetime_string.blank?
|
143
|
-
nil
|
144
|
-
elsif Time.zone
|
145
|
-
Time.zone.parse(datetime_string)
|
146
|
-
else
|
147
|
-
Time.parse(datetime_string)
|
148
|
-
end
|
149
|
-
end
|
150
|
-
|
151
|
-
# The range of years to display in jQuery Datepicker.
|
152
|
-
# It can always be changed dynamically with the following javascript:
|
153
|
-
# $( ".hasDatepicker" ).datepicker( "option", "yearRange", "2000:2042" );
|
154
|
-
Wice::Defaults::DATEPICKER_YEAR_RANGE = (from = Date.current.year - 10).to_s + ':' + (from + 15).to_s
|
155
|
-
|
156
|
-
# With Calendar helpers enabled the parameter sent is the string displayed. This lambda will be given a date string in the
|
157
|
-
# format defined by +DATETIME+ and must generate a Date object.
|
158
|
-
# In many cases <tt>Date.parse</tt> is enough, for instance, <tt>%Y-%m-%d</tt>. If you change the format, make sure to check this code
|
159
|
-
# and modify it if needed.
|
160
|
-
Wice::Defaults::DATE_PARSER = lambda do |date_string|
|
161
|
-
if date_string.blank?
|
162
|
-
nil
|
163
|
-
else
|
164
|
-
begin
|
165
|
-
Date.parse(date_string)
|
166
|
-
rescue ArgumentError
|
167
|
-
nil
|
168
|
-
end
|
169
|
-
end
|
170
|
-
end
|
171
|
-
|
172
|
-
# The name of the page method (should correspond to Kaminari.config.page_method_name)
|
173
|
-
Wice::Defaults::PAGE_METHOD_NAME = :page
|
data/test/readme.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
integration tests are in a separate application: https://github.com/leikind/wice_grid_testbed
|