datatables.net-fixedcolumns
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -1,2 +0,2 @@ | ||
/*! FixedColumns 3.1.0 | ||
/*! FixedColumns 3.2.0 | ||
* ©2010-2014 SpryMedia Ltd - datatables.net/license | ||
@@ -8,3 +8,3 @@ */ | ||
* @description Freeze columns in place on a scrolling DataTable | ||
* @version 3.1.0 | ||
* @version 3.2.0 | ||
* @file dataTables.fixedColumns.js | ||
@@ -24,10 +24,32 @@ * @author SpryMedia Ltd (www.sprymedia.co.uk) | ||
*/ | ||
(function( factory ){ | ||
if ( typeof define === 'function' && define.amd ) { | ||
// AMD | ||
define( ['jquery', 'datatables.net'], function ( $ ) { | ||
return factory( $, window, document ); | ||
} ); | ||
} | ||
else if ( typeof exports === 'object' ) { | ||
// CommonJS | ||
module.exports = function (root, $) { | ||
if ( ! root ) { | ||
root = window; | ||
} | ||
if ( ! $ || ! $.fn.dataTable ) { | ||
$ = require('datatables.net')(root, $).$; | ||
} | ||
(function(window, document, undefined) { | ||
return factory( $, root, root.document ); | ||
}; | ||
} | ||
else { | ||
// Browser | ||
factory( jQuery, window, document ); | ||
} | ||
}(function( $, window, document, undefined ) { | ||
'use strict'; | ||
var DataTable = $.fn.dataTable; | ||
var factory = function( $, DataTable ) { | ||
"use strict"; | ||
/** | ||
@@ -288,3 +310,3 @@ * When making use of DataTables' x-axis scrolling feature, you may wish to | ||
FixedColumns.prototype = /** @lends FixedColumns.prototype */{ | ||
$.extend( FixedColumns.prototype , { | ||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
@@ -569,6 +591,8 @@ * Public methods | ||
} ) | ||
.on( 'column-visibility.dt.DTFC', function () { | ||
that._fnColCalc(); | ||
that._fnGridLayout( that ); | ||
that._fnDraw( true ); | ||
.on( 'column-visibility.dt.DTFC', function ( e, settings, column, vis, recalc ) { | ||
if ( recalc === undefined || recalc ) { | ||
that._fnColCalc(); | ||
that._fnGridLayout( that ); | ||
that._fnDraw( true ); | ||
} | ||
} ) | ||
@@ -1298,3 +1322,3 @@ .on( 'destroy.dt.DTFC', function () { | ||
} | ||
}; | ||
} ); | ||
@@ -1395,3 +1419,3 @@ | ||
*/ | ||
FixedColumns.version = "3.1.0"; | ||
FixedColumns.version = "3.2.0"; | ||
@@ -1500,20 +1524,2 @@ | ||
return FixedColumns; | ||
}; // /factory | ||
// Define as an AMD module if possible | ||
if ( typeof define === 'function' && define.amd ) { | ||
define( ['jquery', 'datatables'], factory ); | ||
} | ||
else if ( typeof exports === 'object' ) { | ||
// Node/CommonJS | ||
factory( require('jquery'), require('datatables') ); | ||
} | ||
else if ( jQuery && !jQuery.fn.dataTable.FixedColumns ) { | ||
// Otherwise simply initialise as normal, stopping multiple evaluation | ||
factory( jQuery, jQuery.fn.dataTable ); | ||
} | ||
})(window, document); | ||
})); |
{ | ||
"name": "datatables.net-fixedcolumns", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "FixedColumns for DataTables ", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -22,3 +22,3 @@ # FixedColumns for DataTables | ||
var $ = require( 'jquery' ); | ||
require( 'datatables.net-fixedcolumns' )( $ ); | ||
require( 'datatables.net-fixedcolumns' )( window, $ ); | ||
``` | ||
@@ -25,0 +25,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46113
1308