Skip to content

Commit

Permalink
moved javascript to app/assets/javascripts/rails_admin/ui.coffee
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Kiessling committed Apr 2, 2013
1 parent 1071a0a commit 85fe0a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions app/assets/javascripts/rails_admin/ui.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,10 @@ $(document).on 'rails_admin.dom_ready', ->
$(this).siblings('.control-group').hide()

$(".table").tooltip selector: "th[rel=tooltip]"

$(document).on 'click', '#fields_to_export label input#check_all', () ->
elems = $('#fields_to_export label input')
if $('#fields_to_export label input#check_all').is ':checked'
$(elems).prop('checked', true)
else
$(elems).prop('checked',false)
2 changes: 1 addition & 1 deletion app/views/rails_admin/main/export.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
%div.controls
%label.checkbox{:for => 'check_all'}
= 'Select All Fields'
= check_box_tag 'all', 'all', true, { :id => 'check_all', :onclick => "var is_checked = jQuery('#check_all').prop('checked');var elems = jQuery('#fields_to_export label input');is_checked ? jQuery(elems).prop('checked', true) : jQuery(elems).prop('checked',false);"}
= check_box_tag 'all', 'all', true, { :id => 'check_all' }
%legend
%i.icon-chevron-down
= t('admin.export.select')
Expand Down

0 comments on commit 85fe0a4

Please sign in to comment.