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

Commit

Permalink
v3.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jan 24, 2018
1 parent 2ba5fc6 commit 051d516
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 73 deletions.
4 changes: 2 additions & 2 deletions dist/stackonly/tablesaw.stackonly.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */

.tablesaw {
width: 100%;
Expand Down
29 changes: 18 additions & 11 deletions dist/stackonly/tablesaw.stackonly.jquery.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(["jquery"], function (jQuery) {
return (root.Tablesaw = factory(jQuery, root));
});
} else if (typeof exports === 'object') {
module.exports = factory(require('jquery')(root), root);
if( "document" in root ) {
module.exports = factory(require('jquery'), root);
} else {
// special jQuery case for CommonJS (pass in a window)
module.exports = factory(require('jquery')(root), root);
}
} else {
root.Tablesaw = factory(jQuery, root);
}
}(typeof window !== "undefined" ? window : this, function ($, win) {
}(typeof window !== "undefined" ? window : this, function ($, window) {
"use strict";

var document = window.document;

var domContentLoadedTriggered = false;
document.addEventListener("DOMContentLoaded", function() {
domContentLoadedTriggered = true;
Expand Down Expand Up @@ -55,7 +62,7 @@ var Tablesaw = {
}
};

$(win.document).on("enhance.tablesaw", function() {
$(document).on("enhance.tablesaw", function() {
// Extend i18n config, if one exists.
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
Expand Down Expand Up @@ -480,7 +487,7 @@ if (Tablesaw.mustard) {
});
};

var $doc = $(win.document);
var $doc = $(document);
$doc.on("enhance.tablesaw", function(e) {
// Cut the mustard
if (Tablesaw.mustard) {
Expand All @@ -500,17 +507,17 @@ if (Tablesaw.mustard) {
$doc.on("scroll.tablesaw", function() {
isScrolling = true;

win.clearTimeout(scrollTimeout);
scrollTimeout = win.setTimeout(function() {
window.clearTimeout(scrollTimeout);
scrollTimeout = window.setTimeout(function() {
isScrolling = false;
}, 300); // must be greater than the resize timeout below
});

var resizeTimeout;
$(win).on("resize", function() {
$(window).on("resize", function() {
if (!isScrolling) {
win.clearTimeout(resizeTimeout);
resizeTimeout = win.setTimeout(function() {
window.clearTimeout(resizeTimeout);
resizeTimeout = window.setTimeout(function() {
$doc.trigger(events.resize);
}, 150); // must be less than the scrolling timeout above.
}
Expand Down
21 changes: 11 additions & 10 deletions dist/stackonly/tablesaw.stackonly.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */
/*! Shoestring - v2.0.0 - 2017-02-14
* http://github.com/filamentgroup/shoestring/
* Copyright (c) 2017 Scott Jehl, Filament Group, Inc; Licensed MIT & GPLv2 */
Expand Down Expand Up @@ -1718,9 +1718,10 @@
} else {
root.Tablesaw = factory(shoestring, root);
}
}(typeof window !== "undefined" ? window : this, function ($, win) {
}(typeof window !== "undefined" ? window : this, function ($, window) {
"use strict";

var document = window.document;
var domContentLoadedTriggered = false;
document.addEventListener("DOMContentLoaded", function() {
domContentLoadedTriggered = true;
Expand Down Expand Up @@ -1762,7 +1763,7 @@ var Tablesaw = {
}
};

$(win.document).on("enhance.tablesaw", function() {
$(document).on("enhance.tablesaw", function() {
// Extend i18n config, if one exists.
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
Expand Down Expand Up @@ -2187,7 +2188,7 @@ if (Tablesaw.mustard) {
});
};

var $doc = $(win.document);
var $doc = $(document);
$doc.on("enhance.tablesaw", function(e) {
// Cut the mustard
if (Tablesaw.mustard) {
Expand All @@ -2207,17 +2208,17 @@ if (Tablesaw.mustard) {
$doc.on("scroll.tablesaw", function() {
isScrolling = true;

win.clearTimeout(scrollTimeout);
scrollTimeout = win.setTimeout(function() {
window.clearTimeout(scrollTimeout);
scrollTimeout = window.setTimeout(function() {
isScrolling = false;
}, 300); // must be greater than the resize timeout below
});

var resizeTimeout;
$(win).on("resize", function() {
$(window).on("resize", function() {
if (!isScrolling) {
win.clearTimeout(resizeTimeout);
resizeTimeout = win.setTimeout(function() {
window.clearTimeout(resizeTimeout);
resizeTimeout = window.setTimeout(function() {
$doc.trigger(events.resize);
}, 150); // must be less than the scrolling timeout above.
}
Expand Down
8 changes: 4 additions & 4 deletions dist/stackonly/tablesaw.stackonly.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
/*! Tablesaw - v3.0.6 - 2017-11-20
* Copyright (c) 2018 Filament Group; Licensed MIT */
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */

.tablesaw {
width: 100%;
Expand Down
4 changes: 2 additions & 2 deletions dist/tablesaw-init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */
(function(win) {
"use strict";

Expand Down
4 changes: 2 additions & 2 deletions dist/tablesaw.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */

.tablesaw {
width: 100%;
Expand Down
49 changes: 28 additions & 21 deletions dist/tablesaw.jquery.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
/*! Tablesaw - v3.0.6 - 2017-11-20
/*! Tablesaw - v3.0.7 - 2018-01-24
* https://github.com/filamentgroup/tablesaw
* Copyright (c) 2017 Filament Group; Licensed MIT */
* Copyright (c) 2018 Filament Group; Licensed MIT */
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
define(["jquery"], function (jQuery) {
return (root.Tablesaw = factory(jQuery, root));
});
} else if (typeof exports === 'object') {
module.exports = factory(require('jquery')(root), root);
if( "document" in root ) {
module.exports = factory(require('jquery'), root);
} else {
// special jQuery case for CommonJS (pass in a window)
module.exports = factory(require('jquery')(root), root);
}
} else {
root.Tablesaw = factory(jQuery, root);
}
}(typeof window !== "undefined" ? window : this, function ($, win) {
}(typeof window !== "undefined" ? window : this, function ($, window) {
"use strict";

var document = window.document;

var domContentLoadedTriggered = false;
document.addEventListener("DOMContentLoaded", function() {
domContentLoadedTriggered = true;
Expand Down Expand Up @@ -55,7 +62,7 @@ var Tablesaw = {
}
};

$(win.document).on("enhance.tablesaw", function() {
$(document).on("enhance.tablesaw", function() {
// Extend i18n config, if one exists.
if (typeof TablesawConfig !== "undefined" && TablesawConfig.i18n) {
Tablesaw.i18n = $.extend(Tablesaw.i18n, TablesawConfig.i18n || {});
Expand Down Expand Up @@ -480,7 +487,7 @@ if (Tablesaw.mustard) {
});
};

var $doc = $(win.document);
var $doc = $(document);
$doc.on("enhance.tablesaw", function(e) {
// Cut the mustard
if (Tablesaw.mustard) {
Expand All @@ -500,17 +507,17 @@ if (Tablesaw.mustard) {
$doc.on("scroll.tablesaw", function() {
isScrolling = true;

win.clearTimeout(scrollTimeout);
scrollTimeout = win.setTimeout(function() {
window.clearTimeout(scrollTimeout);
scrollTimeout = window.setTimeout(function() {
isScrolling = false;
}, 300); // must be greater than the resize timeout below
});

var resizeTimeout;
$(win).on("resize", function() {
$(window).on("resize", function() {
if (!isScrolling) {
win.clearTimeout(resizeTimeout);
resizeTimeout = win.setTimeout(function() {
window.clearTimeout(resizeTimeout);
resizeTimeout = window.setTimeout(function() {
$doc.trigger(events.resize);
}, 150); // must be less than the scrolling timeout above.
}
Expand Down Expand Up @@ -1577,7 +1584,7 @@ if (Tablesaw.mustard) {

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

function fakeBreakpoints() {
Expand Down Expand Up @@ -1674,7 +1681,7 @@ if (Tablesaw.mustard) {
var y;
var scrollTop = window.pageYOffset;

$(win).off(Tablesaw.events.resize, fakeBreakpoints);
$(window).off(Tablesaw.events.resize, fakeBreakpoints);

$(this)
.on("touchmove.swipetoggle", function(e) {
Expand Down Expand Up @@ -1711,7 +1718,7 @@ if (Tablesaw.mustard) {
}

window.setTimeout(function() {
$(win).on(Tablesaw.events.resize, fakeBreakpoints);
$(window).on(Tablesaw.events.resize, fakeBreakpoints);
}, 300);

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

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

$t.off(".swipetoggle");
})
Expand All @@ -1752,7 +1759,7 @@ if (Tablesaw.mustard) {
});

fakeBreakpoints();
$(win).on(Tablesaw.events.resize, fakeBreakpoints);
$(window).on(Tablesaw.events.resize, fakeBreakpoints);
}

// on tablecreate, init
Expand All @@ -1776,9 +1783,9 @@ if (Tablesaw.mustard) {
if (mq === "") {
// value-less but exists
return true;
} else if (mq && "matchMedia" in win) {
} else if (mq && "matchMedia" in window) {
// has a mq value
return win.matchMedia(mq).matches;
return window.matchMedia(mq).matches;
}

return false;
Expand Down Expand Up @@ -1817,7 +1824,7 @@ if (Tablesaw.mustard) {

// run on init and resize
showHideNav();
$(win).on(Tablesaw.events.resize, showHideNav);
$(window).on(Tablesaw.events.resize, showHideNav);

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

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

$t.off(".minimap");
});
Expand Down Expand Up @@ -1925,7 +1932,7 @@ if (Tablesaw.mustard) {
}
};

$(win.document).on(Tablesaw.events.create, function(e, Tablesaw) {
$(document).on(Tablesaw.events.create, function(e, Tablesaw) {
if (Tablesaw.$table.is(S.selectors.init)) {
S.init(Tablesaw.table);
}
Expand Down
Loading

0 comments on commit 051d516

Please sign in to comment.