Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add checkbox to select/unselect all fields when exporting (Issue #1241) #1302

wants to merge 1 commit into from

5 participants

Bernardo B. Marques Don't Add Me To Your Organization a.k.a The Travis Bot Benoit Bénézech Stephen Pedrosa Eilert Mitsuhiro Shibuya
Bernardo B. Marques

Add checkbox to select/unselect all fields when exporting (solve issue #1241).

I hope this is right.

I didn't make the test, if it's a need for this feature, please let me know and I'll make it.

Don't Add Me To Your Organization a.k.a The Travis Bot

This pull request passes (merged 832219a into e674017).

Benoit Bénézech


You can't test this yet (no cucumber/webkit or similar stack yet :/ )

About the feature, it already exists, clicking the model/relation name will revert selection of all depending fields.
I think we mostly need a popover to tell users about that :D

Checkbox is ok too, but then you need to make the aforementioned behavior consistent (check all/uncheck all instead of inverse all). Check the coffee files and refactor what you want (onclick is a bit ugly)

Bernardo B. Marques

I notice the model/relation name revert selection. But this is not to invert, and it's for all the checkboxes as the issue 1241 asked.

Stephen Pedrosa Eilert

Is there a reason that this pull request could not be merged yet? A client requested the same feature, and I'll have to implement it anyway, if there are issues with this pull request.

Benoit Bénézech

The feature already exist: when you click on a legend, all boxes get checked/unchecked.

I am not sure we actually need more than this.

What is missing is a tooltip to inform user about the feature.

Bernardo B. Marques

What already exists is not the same feature.

This was referenced
Mitsuhiro Shibuya

This change is already included in #1580.

Mitsuhiro Shibuya mshibuya closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/views/rails_admin/main/export.html.haml
7 app/views/rails_admin/main/export.html.haml
@@ -4,7 +4,12 @@
= form_tag export_path(params.merge(:all => true)), :method => 'post', :class => 'form-horizontal denser' do
%input{:name => "send_data", :type => "hidden", :value => "true"}/
- %fieldset
+ %fieldset{:id => 'fields_to_export'}
+ %div.control-group
+ %div.controls
+ %label.checkbox{:for => 'check_all'}
+ = 'Select All Fields'
+ = check_box_tag 'all', 'all', true, { :id => 'check_all', :onclick => "is_checked = jQuery('#check_all').attr('checked'); elems = jQuery('#fields_to_export label input'); is_checked ? jQuery(elems).attr('checked', 'checked') : jQuery(elems).removeAttr('checked');" }
= t('')
Something went wrong with that request. Please try again.