Sha256: cf8ff1539878328817313ce1a173718e9fb7d95c71a16a0823b0ebd4c3357a3f

Contents?: true

Size: 1.4 KB

Versions: 12

Compression:

Stored size: 1.4 KB

Contents

// Generated by CoffeeScript 1.4.0
/*
 *
 *  jQuery ResponsiveTables by Gary Hepting - https://github.com/ghepting/responsiveTables
 *  
 *  Open source under the BSD License. 
 *
 *  Copyright © 2013 Gary Hepting. All rights reserved.
 *
*/(function(){(function(e){var t;t=[];e.fn.responsiveTable=function(n){var r;r={compressor:n.compressor||10,minSize:n.minSize||Number.NEGATIVE_INFINITY,maxSize:n.maxSize||Number.POSITIVE_INFINITY,padding:2,height:"auto",adjust_parents:!0};return this.each(function(){var n,i,s,o;i=e(this);i.attr("data-compression",r.compressor);i.attr("data-min",r.minSize);i.attr("data-max",r.maxSize);i.attr("data-padding",r.padding);n=e("tr",i).first().children("th, td").length;o=e("tr",i).length;if(r.height!=="auto"){$this.css("height",r.height);r.adjust_parents&&$this.parents().each(function(){return e(this).css("height","100%")})}e("tr th, tr td",i).css("width",Math.floor(100/n)+"%");e("tr th, tr td",i).css("height",Math.floor(100/o)+"%");s=Math.floor(Math.max(Math.min(i.width()/r.compressor,parseFloat(r.maxSize)),parseFloat(r.minSize)));e("tr th, tr td",i).css("font-size",s+"px");return t.push(i)})};return e(window).on("resize",function(){return e(t).each(function(){var t,n;t=e(this);n=Math.floor(Math.max(Math.min(t.width()/t.attr("data-compression"),parseFloat(t.attr("data-max"))),parseFloat(t.attr("data-min"))));return e("tr th, tr td",t).css("font-size",n+"px")})})})(jQuery)}).call(this);

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
table_beet2-0.0.5 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
table_beet2-0.0.4 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
table_beet-0.0.4 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.2.4 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.2.3 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.2.2 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js
table_beet-0.0.3 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.2.1 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.2 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js
table_beet-0.0.2 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
table_beet-0.0.1 lib/table_beet/formatters/html_template/data/js/plugins/coffee/jquery.responsiveTables.js
groundworkcss-rails-0.1 vendor/assets/javascripts/groundworkcss/plugins/coffee/jquery.responsiveTables.js