{I" class:ETI"ProcessedAsset;FI"logical_path;TI"!rails_admin/ra.filter-box.js;FI" pathname;TI"w/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.1/app/assets/javascripts/rails_admin/ra.filter-box.js;FI"content_type;TI"application/javascript;TI" mtime;Tl+¬ñSI" length;Ti¬)I" digest;TI"%c948f8a9c6971dbad2e2f46556bb80b4;FI" source;TI"¬)(function($) { var filters; $.filters = filters = { options: { regional: { datePicker: { dateFormat: 'mm/dd/yy' } } }, append: function(field_label, field_name, field_type, field_value, field_operator, field_options, index) { var value_name = 'f[' + field_name + '][' + index + '][v]'; var operator_name = 'f[' + field_name + '][' + index + '][o]'; switch(field_type) { case 'boolean': var control = ''; break; case 'date': case 'datetime': case 'timestamp': var control = '' var additional_control = ' ' + ' ' + ''; break; case 'enum': var multiple_values = ((field_value instanceof Array) ? true : false) var control = '' + ' ' + ''; break; case 'string': case 'text': case 'belongs_to_association': var control = '' var additional_control = ' '; break; case 'integer': case 'decimal': case 'float': var control = '' var additional_control = ' ' + ' ' + ''; break; default: var control = ' '; break; } var content = ' '; $('#filters_box').append(content); $('#filters_box .date').datepicker(this.options.regional.datePicker); $("hr.filters_box:hidden").show('slow'); } } $(document).on('click', "#filters a", function(e) { e.preventDefault(); $.filters.append( $(this).data('field-label'), $(this).data('field-name'), $(this).data('field-type'), $(this).data('field-value'), $(this).data('field-operator'), $(this).data('field-options'), $.now().toString().slice(6,11) ); }); $(document).on('click', "#filters_box .delete", function(e) { e.preventDefault(); form = $(this).parents('form'); $(this).parents('.filter').remove(); !$("#filters_box").children().length && $("hr.filters_box:visible").hide('slow'); }); $(document).on('click', "#filters_box .switch-select", function(e) { e.preventDefault(); var selected_select = $(this).siblings('select:visible'); var not_selected_select = $(this).siblings('select:hidden'); not_selected_select.attr('name', not_selected_select.data('name')).show('slow'); selected_select.attr('name', null).hide('slow'); $(this).find('i').toggleClass("icon-plus icon-minus") }); $(document).on('change', "#filters_box .switch-additionnal-fieldsets", function(e) { var selected_option = $(this).find('option:selected'); if(klass = $(selected_option).data('additional-fieldset')) { $(this).siblings('.additional-fieldset:not(.' + klass + ')').hide('slow'); $(this).siblings('.' + klass).show('slow'); } else { $(this).siblings('.additional-fieldset').hide('slow'); } }); })( jQuery ); ;TI"dependency_digest;TI"%83eaba221bf94d9c3ee43aa6fe5a0f97;FI"required_paths;T[I"w/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.1/app/assets/javascripts/rails_admin/ra.filter-box.js;FI"dependency_paths;T[{I" path;TI"w/Users/jirikolarik/.rvm/gems/ruby-2.1.1/gems/rails_admin-0.6.1/app/assets/javascripts/rails_admin/ra.filter-box.js;FI" mtime;TI"2014-03-03T22:18:36+01:00;TI" digest;TI"%c948f8a9c6971dbad2e2f46556bb80b4;FI" _version;TI"%a56df69ef97ba4d9f1a23bf9b0add58a;F