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

Commit 051d516

Browse files
committed
v3.0.7
1 parent 2ba5fc6 commit 051d516

9 files changed

+89
-73
lines changed

dist/stackonly/tablesaw.stackonly.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44

55
.tablesaw {
66
width: 100%;

dist/stackonly/tablesaw.stackonly.jquery.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44
(function (root, factory) {
55
if (typeof define === 'function' && define.amd) {
66
define(["jquery"], function (jQuery) {
77
return (root.Tablesaw = factory(jQuery, root));
88
});
99
} else if (typeof exports === 'object') {
10-
module.exports = factory(require('jquery')(root), root);
10+
if( "document" in root ) {
11+
module.exports = factory(require('jquery'), root);
12+
} else {
13+
// special jQuery case for CommonJS (pass in a window)
14+
module.exports = factory(require('jquery')(root), root);
15+
}
1116
} else {
1217
root.Tablesaw = factory(jQuery, root);
1318
}
14-
}(typeof window !== "undefined" ? window : this, function ($, win) {
19+
}(typeof window !== "undefined" ? window : this, function ($, window) {
1520
"use strict";
1621

22+
var document = window.document;
23+
1724
var domContentLoadedTriggered = false;
1825
document.addEventListener("DOMContentLoaded", function() {
1926
domContentLoadedTriggered = true;
@@ -55,7 +62,7 @@ var Tablesaw = {
5562
}
5663
};
5764

58-
$(win.document).on("enhance.tablesaw", function() {
65+
$(document).on("enhance.tablesaw", function() {
5966
// Extend i18n config, if one exists.
6067
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
6168
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
@@ -480,7 +487,7 @@ if (Tablesaw.mustard) {
480487
});
481488
};
482489

483-
var $doc = $(win.document);
490+
var $doc = $(document);
484491
$doc.on("enhance.tablesaw", function(e) {
485492
// Cut the mustard
486493
if (Tablesaw.mustard) {
@@ -500,17 +507,17 @@ if (Tablesaw.mustard) {
500507
$doc.on("scroll.tablesaw", function() {
501508
isScrolling = true;
502509

503-
win.clearTimeout(scrollTimeout);
504-
scrollTimeout = win.setTimeout(function() {
510+
window.clearTimeout(scrollTimeout);
511+
scrollTimeout = window.setTimeout(function() {
505512
isScrolling = false;
506513
}, 300); // must be greater than the resize timeout below
507514
});
508515

509516
var resizeTimeout;
510-
$(win).on("resize", function() {
517+
$(window).on("resize", function() {
511518
if (!isScrolling) {
512-
win.clearTimeout(resizeTimeout);
513-
resizeTimeout = win.setTimeout(function() {
519+
window.clearTimeout(resizeTimeout);
520+
resizeTimeout = window.setTimeout(function() {
514521
$doc.trigger(events.resize);
515522
}, 150); // must be less than the scrolling timeout above.
516523
}

dist/stackonly/tablesaw.stackonly.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44
/*! Shoestring - v2.0.0 - 2017-02-14
55
* http://github.com/filamentgroup/shoestring/
66
* Copyright (c) 2017 Scott Jehl, Filament Group, Inc; Licensed MIT & GPLv2 */
@@ -1718,9 +1718,10 @@
17181718
} else {
17191719
root.Tablesaw = factory(shoestring, root);
17201720
}
1721-
}(typeof window !== "undefined" ? window : this, function ($, win) {
1721+
}(typeof window !== "undefined" ? window : this, function ($, window) {
17221722
"use strict";
17231723

1724+
var document = window.document;
17241725
var domContentLoadedTriggered = false;
17251726
document.addEventListener("DOMContentLoaded", function() {
17261727
domContentLoadedTriggered = true;
@@ -1762,7 +1763,7 @@ var Tablesaw = {
17621763
}
17631764
};
17641765

1765-
$(win.document).on("enhance.tablesaw", function() {
1766+
$(document).on("enhance.tablesaw", function() {
17661767
// Extend i18n config, if one exists.
17671768
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
17681769
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
@@ -2187,7 +2188,7 @@ if (Tablesaw.mustard) {
21872188
});
21882189
};
21892190

2190-
var $doc = $(win.document);
2191+
var $doc = $(document);
21912192
$doc.on("enhance.tablesaw", function(e) {
21922193
// Cut the mustard
21932194
if (Tablesaw.mustard) {
@@ -2207,17 +2208,17 @@ if (Tablesaw.mustard) {
22072208
$doc.on("scroll.tablesaw", function() {
22082209
isScrolling = true;
22092210

2210-
win.clearTimeout(scrollTimeout);
2211-
scrollTimeout = win.setTimeout(function() {
2211+
window.clearTimeout(scrollTimeout);
2212+
scrollTimeout = window.setTimeout(function() {
22122213
isScrolling = false;
22132214
}, 300); // must be greater than the resize timeout below
22142215
});
22152216

22162217
var resizeTimeout;
2217-
$(win).on("resize", function() {
2218+
$(window).on("resize", function() {
22182219
if (!isScrolling) {
2219-
win.clearTimeout(resizeTimeout);
2220-
resizeTimeout = win.setTimeout(function() {
2220+
window.clearTimeout(resizeTimeout);
2221+
resizeTimeout = window.setTimeout(function() {
22212222
$doc.trigger(events.resize);
22222223
}, 150); // must be less than the scrolling timeout above.
22232224
}

dist/stackonly/tablesaw.stackonly.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
4-
/*! Tablesaw - v3.0.6 - 2017-11-20
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
4+
/*! Tablesaw - v3.0.7 - 2018-01-24
55
* https://github.com/filamentgroup/tablesaw
6-
* Copyright (c) 2017 Filament Group; Licensed MIT */
6+
* Copyright (c) 2018 Filament Group; Licensed MIT */
77

88
.tablesaw {
99
width: 100%;

dist/tablesaw-init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44
(function(win) {
55
"use strict";
66

dist/tablesaw.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44

55
.tablesaw {
66
width: 100%;

dist/tablesaw.jquery.js

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
/*! Tablesaw - v3.0.6 - 2017-11-20
1+
/*! Tablesaw - v3.0.7 - 2018-01-24
22
* https://github.com/filamentgroup/tablesaw
3-
* Copyright (c) 2017 Filament Group; Licensed MIT */
3+
* Copyright (c) 2018 Filament Group; Licensed MIT */
44
(function (root, factory) {
55
if (typeof define === 'function' && define.amd) {
66
define(["jquery"], function (jQuery) {
77
return (root.Tablesaw = factory(jQuery, root));
88
});
99
} else if (typeof exports === 'object') {
10-
module.exports = factory(require('jquery')(root), root);
10+
if( "document" in root ) {
11+
module.exports = factory(require('jquery'), root);
12+
} else {
13+
// special jQuery case for CommonJS (pass in a window)
14+
module.exports = factory(require('jquery')(root), root);
15+
}
1116
} else {
1217
root.Tablesaw = factory(jQuery, root);
1318
}
14-
}(typeof window !== "undefined" ? window : this, function ($, win) {
19+
}(typeof window !== "undefined" ? window : this, function ($, window) {
1520
"use strict";
1621

22+
var document = window.document;
23+
1724
var domContentLoadedTriggered = false;
1825
document.addEventListener("DOMContentLoaded", function() {
1926
domContentLoadedTriggered = true;
@@ -55,7 +62,7 @@ var Tablesaw = {
5562
}
5663
};
5764

58-
$(win.document).on("enhance.tablesaw", function() {
65+
$(document).on("enhance.tablesaw", function() {
5966
// Extend i18n config, if one exists.
6067
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
6168
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
@@ -480,7 +487,7 @@ if (Tablesaw.mustard) {
480487
});
481488
};
482489

483-
var $doc = $(win.document);
490+
var $doc = $(document);
484491
$doc.on("enhance.tablesaw", function(e) {
485492
// Cut the mustard
486493
if (Tablesaw.mustard) {
@@ -500,17 +507,17 @@ if (Tablesaw.mustard) {
500507
$doc.on("scroll.tablesaw", function() {
501508
isScrolling = true;
502509

503-
win.clearTimeout(scrollTimeout);
504-
scrollTimeout = win.setTimeout(function() {
510+
window.clearTimeout(scrollTimeout);
511+
scrollTimeout = window.setTimeout(function() {
505512
isScrolling = false;
506513
}, 300); // must be greater than the resize timeout below
507514
});
508515

509516
var resizeTimeout;
510-
$(win).on("resize", function() {
517+
$(window).on("resize", function() {
511518
if (!isScrolling) {
512-
win.clearTimeout(resizeTimeout);
513-
resizeTimeout = win.setTimeout(function() {
519+
window.clearTimeout(resizeTimeout);
520+
resizeTimeout = window.setTimeout(function() {
514521
$doc.trigger(events.resize);
515522
}, 150); // must be less than the scrolling timeout above.
516523
}
@@ -1577,7 +1584,7 @@ if (Tablesaw.mustard) {
15771584

15781585
function matchesMedia() {
15791586
var matchMedia = $table.attr("data-tablesaw-swipe-media");
1580-
return !matchMedia || ("matchMedia" in win && win.matchMedia(matchMedia).matches);
1587+
return !matchMedia || ("matchMedia" in window && window.matchMedia(matchMedia).matches);
15811588
}
15821589

15831590
function fakeBreakpoints() {
@@ -1674,7 +1681,7 @@ if (Tablesaw.mustard) {
16741681
var y;
16751682
var scrollTop = window.pageYOffset;
16761683

1677-
$(win).off(Tablesaw.events.resize, fakeBreakpoints);
1684+
$(window).off(Tablesaw.events.resize, fakeBreakpoints);
16781685

16791686
$(this)
16801687
.on("touchmove.swipetoggle", function(e) {
@@ -1711,7 +1718,7 @@ if (Tablesaw.mustard) {
17111718
}
17121719

17131720
window.setTimeout(function() {
1714-
$(win).on(Tablesaw.events.resize, fakeBreakpoints);
1721+
$(window).on(Tablesaw.events.resize, fakeBreakpoints);
17151722
}, 300);
17161723

17171724
$(this).off("touchmove.swipetoggle touchend.swipetoggle");
@@ -1741,7 +1748,7 @@ if (Tablesaw.mustard) {
17411748

17421749
$t.removeClass("tablesaw-swipe");
17431750
tblsaw.$toolbar.find(".tablesaw-advance").remove();
1744-
$(win).off(Tablesaw.events.resize, fakeBreakpoints);
1751+
$(window).off(Tablesaw.events.resize, fakeBreakpoints);
17451752

17461753
$t.off(".swipetoggle");
17471754
})
@@ -1752,7 +1759,7 @@ if (Tablesaw.mustard) {
17521759
});
17531760

17541761
fakeBreakpoints();
1755-
$(win).on(Tablesaw.events.resize, fakeBreakpoints);
1762+
$(window).on(Tablesaw.events.resize, fakeBreakpoints);
17561763
}
17571764

17581765
// on tablecreate, init
@@ -1776,9 +1783,9 @@ if (Tablesaw.mustard) {
17761783
if (mq === "") {
17771784
// value-less but exists
17781785
return true;
1779-
} else if (mq && "matchMedia" in win) {
1786+
} else if (mq && "matchMedia" in window) {
17801787
// has a mq value
1781-
return win.matchMedia(mq).matches;
1788+
return window.matchMedia(mq).matches;
17821789
}
17831790

17841791
return false;
@@ -1817,7 +1824,7 @@ if (Tablesaw.mustard) {
18171824

18181825
// run on init and resize
18191826
showHideNav();
1820-
$(win).on(Tablesaw.events.resize, showHideNav);
1827+
$(window).on(Tablesaw.events.resize, showHideNav);
18211828

18221829
$table
18231830
.on("tablesawcolumns.minimap", function() {
@@ -1827,7 +1834,7 @@ if (Tablesaw.mustard) {
18271834
var $t = $(this);
18281835

18291836
tblsaw.$toolbar.find(".tablesaw-advance").remove();
1830-
$(win).off(Tablesaw.events.resize, showHideNav);
1837+
$(window).off(Tablesaw.events.resize, showHideNav);
18311838

18321839
$t.off(".minimap");
18331840
});
@@ -1925,7 +1932,7 @@ if (Tablesaw.mustard) {
19251932
}
19261933
};
19271934

1928-
$(win.document).on(Tablesaw.events.create, function(e, Tablesaw) {
1935+
$(document).on(Tablesaw.events.create, function(e, Tablesaw) {
19291936
if (Tablesaw.$table.is(S.selectors.init)) {
19301937
S.init(Tablesaw.table);
19311938
}

0 commit comments

Comments
 (0)