Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
Version 1.0.2 dist files.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jan 27, 2015
1 parent 6cc664c commit 04bd837
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/bare/tablesaw.bare.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */

Expand Down
2 changes: 1 addition & 1 deletion dist/stackonly/tablesaw.stackonly.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */

Expand Down
2 changes: 1 addition & 1 deletion dist/stackonly/tablesaw.stackonly.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */
;(function( $ ) {
Expand Down
4 changes: 2 additions & 2 deletions dist/stackonly/tablesaw.stackonly.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */

Expand Down
2 changes: 1 addition & 1 deletion dist/tablesaw.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */

Expand Down
15 changes: 9 additions & 6 deletions dist/tablesaw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Tablesaw - v1.0.2 - 2015-01-26
/*! Tablesaw - v1.0.2 - 2015-01-27
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2015 Filament Group; Licensed MIT */
;(function( $ ) {
Expand Down Expand Up @@ -562,11 +562,12 @@ if( !Tablesaw.config ) {
}

// Calculate initial widths
var initialWidth = $table.css( 'width' );
$table.css('width', 'auto');
$headerCells.each(function() {
headerWidths.push( $( this ).outerWidth() );
});
$table.css( 'width', '' );
$table.css( 'width', initialWidth );

$btns.appendTo( $table.prev( '.tablesaw-bar' ) );

Expand Down Expand Up @@ -669,7 +670,7 @@ if( !Tablesaw.config ) {
}

var extraPaddingPixels = 20,
containerWidth = $table.parent().width(),
tableWidth = $table.width(),
persist = [],
sum = 0,
sums = [],
Expand All @@ -685,7 +686,7 @@ if( !Tablesaw.config ) {
sums.push( sum );

// is persistent or is hidden
if( isPersist || sum > containerWidth ) {
if( isPersist || sum > tableWidth ) {
visibleNonPersistantCount--;
}
});
Expand All @@ -700,7 +701,7 @@ if( !Tablesaw.config ) {
return;
}

if( sums[ index ] <= containerWidth || needsNonPersistentColumn ) {
if( sums[ index ] <= tableWidth || needsNonPersistentColumn ) {
needsNonPersistentColumn = false;
showColumn( this );
} else {
Expand Down Expand Up @@ -1030,7 +1031,9 @@ if( !Tablesaw.config ) {
};

cells = getCells( rows );
fn = getSortFxn( ascending, $( col ).is( '[data-sortable-numeric]' ) );
var customFn = $( col ).data( 'tablesaw-sort' );
fn = ( customFn && typeof customFn === "function" ? customFn( ascending ) : false ) ||
getSortFxn( ascending, $( col ).is( '[data-sortable-numeric]' ) );
sorted = cells.sort( fn );
rows = applyToRows( sorted , rows );
return rows;
Expand Down

0 comments on commit 04bd837

Please sign in to comment.