Skip to content

Commit

Permalink
regen dist
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoryak committed Oct 3, 2016
1 parent c02e1ec commit 548d367
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 28 deletions.
21 changes: 9 additions & 12 deletions dist/jquery.floatThead-slim.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @preserve jQuery.floatThead 1.4.4dev - http://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2016 Misha Koryak
// @preserve jQuery.floatThead 1.4.4 - http://mkoryak.github.io/floatThead/ - Copyright (c) 2012 - 2016 Misha Koryak
// @license MIT

/* @author Misha Koryak
Expand Down Expand Up @@ -88,7 +88,6 @@
var $window = $(window);

if(!window.matchMedia) {
//these will be used by the plugin to go into print mode (destroy and remake itself)
var _beforePrint = window.onbeforeprint;
var _afterPrint = window.onafterprint;
window.onbeforeprint = function () {
Expand Down Expand Up @@ -809,7 +808,7 @@
var oldScrollLeft = null;
return function(pos, setWidth, setHeight){
if(pos != null && (oldTop != pos.top || oldLeft != pos.left)){
if(ieVersion === 8){
if(ieVersion === 8){
$floatContainer.css({
top: pos.top,
left: pos.left
Expand Down Expand Up @@ -924,10 +923,10 @@

/////// printing stuff
var beforePrint = function(){
$table.floatThead('destroy', true);
unfloat();
};
var afterPrint = function(){
$table.floatThead(opts);
refloat();
};
var printEvent = function(mql){
//make printing the table work properly on IE10+
Expand Down Expand Up @@ -1004,7 +1003,7 @@

//attach some useful functions to the table.
$table.data('floatThead-attached', {
destroy: function(isPrintEvent){
destroy: function(){
var ns = '.fth-'+floatTheadId;
unfloat();
$table.css(layoutAuto);
Expand Down Expand Up @@ -1038,12 +1037,10 @@
$floatContainer.remove();
$table.data('floatThead-attached', false);
$window.off(ns);
if(!isPrintEvent){
//if we are in the middle of printing, we want this event to re-create the plugin
window.matchMedia && window.matchMedia("print").removeListener
&& window.matchMedia("print").removeListener(printEvent);
beforePrint = afterPrint = function(){};
}
window.matchMedia && window.matchMedia("print").removeListener
&& window.matchMedia("print").removeListener(printEvent);
beforePrint = afterPrint = function(){};

return function reinit(){
return $table.floatThead(opts);
}
Expand Down
Loading

0 comments on commit 548d367

Please sign in to comment.