Sha256: b5068e942f1c6af8af129d0783842fb7f94d8494401c82229010577cf27ea008

Contents?: true

Size: 1.21 KB

Versions: 24

Compression:

Stored size: 1.21 KB

Contents

I"Ï(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)");
        selected.each(function() {
          var column_index, th_id;
          th_id = $(this).attr('value');
          column_index = $(table_selector + " tbody tr:first th").index(th_id) + 1;
          $(table_selector + " th:nth-child(" + column_index + ")").show();
          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) + 1;
          $(table_selector + " th:nth-child(" + column_index + ")").hide();
          return $(table_selector + " td:nth-child(" + column_index + ")").hide();
        });
      });
    });
  });

}).call(this);
:ET

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
itsf_backend-2.0.2 spec/dummy/tmp/cache/assets/sprockets/v3.0/1Zz7coM_XBKoqWTVR-zNTMlIm-qxANtntWXHFBV36FE.cache
itsf_backend-2.0.1 spec/dummy/tmp/cache/assets/sprockets/v3.0/1Zz7coM_XBKoqWTVR-zNTMlIm-qxANtntWXHFBV36FE.cache
itsf_backend-1.2.8 spec/dummy/tmp/cache/assets/sprockets/v3.0/1Zz7coM_XBKoqWTVR-zNTMlIm-qxANtntWXHFBV36FE.cache
itsf_backend-1.1.9 spec/dummy/tmp/cache/assets/sprockets/v3.0/1Zz7coM_XBKoqWTVR-zNTMlIm-qxANtntWXHFBV36FE.cache