{:uriI"file:///home/vagrant/rails/itsf/itsf_backend/app/assets/javascripts/itsf/backend/application/select-columns.coffee?type=application/javascript&pipeline=self&id=16fe53b27f165a8fad9ffba4f1e08e2a64ea38a725fb0e39f97e05831cd9b8b1:ET:load_pathI"A/home/vagrant/rails/itsf/itsf_backend/app/assets/javascripts;T: filenameI"p/home/vagrant/rails/itsf/itsf_backend/app/assets/javascripts/itsf/backend/application/select-columns.coffee;T: nameI",itsf/backend/application/select-columns;T:logical_pathI"4itsf/backend/application/select-columns.self.js;T:content_typeI"application/javascript;T: sourceI"(function() { $(function() { return $("[data-select-columns]").each(function() { return $(this).on('change', function() { var headers, not_selected, selected, table, table_selector; table_selector = $(this).data('select-columns-target'); table = $(table_selector); headers = $(table_selector + " th"); selected = $(this).find(":selected"); not_selected = $(this).find(":not(:selected)"); console.log(headers); console.log(selected); console.log(not_selected); selected.each(function() { var column_index, th_id; th_id = $(this).attr('value'); column_index = $(table_selector + " tbody tr:first th").index(th_id); return $(table_selector + " td:nth-child(column_index)").show(); }); return not_selected.each(function() { var column_index, th_id; th_id = $(this).attr('value'); column_index = $(table_selector + " tbody tr:first th").index(th_id); return $(table_selector + " td:nth-child(column_index)").hide(); }); }); }); }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"~file-digest:///home/vagrant/rails/itsf/itsf_backend/app/assets/javascripts/itsf/backend/application/select-columns.coffee;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%I!S6ޔ$1J: lengthi:dependencies_digest"%Nr;fS4d}wJ$}7:idI"E16fe53b27f165a8fad9ffba4f1e08e2a64ea38a725fb0e39f97e05831cd9b8b1;F: mtimel+V