WiceGrid version 3.2.0.pre1

WiceGrid version 3.2.0.pre1 has been released, and the WiceGrid testbed application has been updated.

Here is the changelog:

  1. Support for Prototype has been dropped. No hard feelings, Prototype, no matter what others say, I liked you, and I am perhaps the last one to have dumped you :)
  2. All assets are in the asset pipeline. All javascript is now coffeescript. No more Rails 2 legacy in the form of obtrusive javascript in the HTML page. The styles file is copied to the application asset directory by a generate task so that is it easy to modify it to the application needs. The javascript and images are loaded from the plugin. Read the Installation section in README for details. Thanks to the asset pipeline taking care of loading assets for us, methods include_wice_grid_assets, names_of_wice_grid_stylesheets, and names_of_wice_grid_javascripts have been removed
  3. WiceGrid is compatible with Twitter Bootstrap out of the box.
  4. Paths to various images used by WiceGrid have been removed from the configuration file and are now defined only in the css file. Developers are encouraged to modify wice_grid.css.scss to use other images and to change the styles in general.
  5. The markup and css classes that WiceGrid generates have changed, and CSS for older versions of WiceGrid might not work. Inspect the source code.
  6. Parameter names in the grid helper have been renamed:
    • :table_html_attrs becomes :html
    • :header_tr_html_attrs becomes :header_tr_html
  7. Parameter names in column definitions have been renamed:
    • :column_name becomes :name
    • :attribute_name becomes :attribute
    • :model_class becomes :model
    • :allow_ordering becomes :ordering
    • :td_html_attrs becomes :html
    • Negation in the parameter name does not contribute to the simplicity of an API, so :no_filter in becomes :filter. Consequently, :no_filter => true becomes :filter => false
    • :negation_in_filter becomes :negation
  8. ERB mode has been removed. It had never been used by anyone and is bad style anyway. In case you have no idea what it was, here’s what it was:
  9. New configuration parameter DEFAULT_TABLE_CLASSES contains CSS classes added to all WiceGrid tables by default.
  10. In previous versions of WiceGrid in the jQuery mode DateTime filters used to automatically fall back to Rails DateTime helpers due to absence of time controls in jQuery DatePicker. In version 3.2 this behavior has been changed to always use jQuery DatePicker, even with DateTime filters. Of course it is possible to force Rails DateTime with :helper_style => :standard in the column definition.
  11. The second variable injected into to before_row and after_row block, and the first parameter injected into the last_row is the number of columns in the current grid.
  12. :csv_field_separator is a new parameter for initialize_grid defining the field separator in CSV files. The default separator is defined by CSV_FIELD_SEPARATOR in the config file.
  13. New parameter :confirm for saved_queries_panel which turns on or off the JS confirm dialogs when deleting saved queries.
  14. Instead of the old rake task creating a table for serialized queries a generator has been added which adds a migration file to db/migrations.
  15. Instead of using helpers submit_grid_javascript and reset_grid_javascript to create external Submit and Reset buttons all you have to do is add a button or any other clickable HTML element with class wg-external-submit-button or wg-external-reset-button, and attribute data-grid-name whose value is the name of the grid:
    1
    2
    
      <button class="wg-external-submit-button" data-grid-name="grid">Submit</button>
      <button class="wg-external-reset-button" data-grid-name="grid">Reset</button>

    The same goes for the external CSV export button, only the CSS class is wg-external-csv-export-button:
    1
    
      <button class="wg-external-csv-export-button" data-grid-name="grid">Export To CSV</button>