Sha256: d9f1d06e2b0c592786e371911380b1e421127fcb361e002d1ad6c44da807b232

Contents?: true

Size: 1.54 KB

Versions: 4

Compression:

Stored size: 1.54 KB

Contents

{I"
class:ETI"BundledAsset;FI"logical_path;TI"responsive-tables.js;FI"
pathname;TI"p/usr/local/rvm/gems/ruby-2.0.0-p481/gems/spree_backend-2.2.4/vendor/assets/javascripts/responsive-tables.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+ƑTI"length;TiCI"digest;TI"%874d74a7c2690cb4214e9125f33df0c7;FI"source;TI"C$(document).ready(function() {
  var switched = false;
  var updateTables = function() {
    if (($(window).width() < 767) && !switched ){
      switched = true;
      $("table.responsive").each(function(i, element) {
        splitTable($(element));
      });
      return true;
    }
    else if (switched && ($(window).width() > 767)) {
      switched = false;
      $("table.responsive").each(function(i, element) {
        unsplitTable($(element));
      });
    }
  };
   
  $(window).load(updateTables);
  $(window).bind("resize", updateTables);
   
	
	function splitTable(original)
	{
		original.wrap("<div class='table-wrapper' />");
		
		var copy = original.clone();
		copy.find("td:not(:first-child), th:not(:first-child)").css("display", "none");
		copy.removeClass("responsive");
		
		original.closest(".table-wrapper").append(copy);
		copy.wrap("<div class='pinned' />");
		original.wrap("<div class='scrollable' />");
	}
	
	function unsplitTable(original) {
    original.closest(".table-wrapper").find(".pinned").remove();
    original.unwrap();
    original.unwrap();
	}

});
;TI"required_assets_digest;TI"%0e88ce3ecf02bf8e1beb6a9232ae9678;FI"
_version;TI"%5ef14a844324cba3e114bd0123f88a5e;F

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/182290593b8a866b51696ae64cc875df
bcms_spree-0.0.2 test/dummy/tmp/cache/assets/development/sprockets/eb500ae8bebafe5e04721a7a746770c1
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/182290593b8a866b51696ae64cc875df
bcms_spree-0.0.1 test/dummy/tmp/cache/assets/development/sprockets/eb500ae8bebafe5e04721a7a746770c1