2
0
forked from Wavyzz/dolibarr

Last version of JQuery 1.12 and DataTables Componenent with working

export Excel,CVS,PDF, etc..
This commit is contained in:
Florian HENRY
2016-03-15 11:57:53 +01:00
parent ed9cd71eac
commit 28391a4e4d
31 changed files with 7292 additions and 6174 deletions

View File

@@ -1,3 +1,5 @@
MIT license
Copyright (c) 2010-2015 SpryMedia Limited
http://datatables.net

View File

@@ -1,20 +1,24 @@
# FixedColumns
When making use of DataTables' x-axis scrolling feature (`scrollX`), you may wish to fix the left or right most columns in place. This plug-in for DataTables provides exactly this option (for non-scrolling tables, please use the FixedHeader plug-in, which can fix headers, footers and columns). Key features include:
* Freezes the left most column to the side of the table
* Option to freeze two or more columns
* Full integration with DataTables' scrolling options
When making use of DataTables' x-axis scrolling feature (`scrollX`), you may wish to fix the left or right most columns in place. This extension for DataTables provides exactly this option (for non-scrolling tables, please use the FixedHeader extension, which can fix the header and footer).
# Installation
To use FixedColumns, first download DataTables ( http://datatables.net/download ) and place the unzipped FixedColumns package into a `extensions` directory in the DataTables package. This will allow the pages in the examples to operate correctly. To see the examples running, open the `examples` directory in your web-browser.
To use FixedColumns the primary way to obtain the software is to use the [DataTables downloader](//datatables.net/download). You can also include the individual files from the [DataTables CDN](//cdn.datatables.net). See the [documentation](http://datatables.net/extensions/fixedcolumns/) for full details.
## NPM and Bower
If you prefer to use a package manager such as NPM or Bower, distribution repositories are available with software built from this repository under the name `datatables.net-fixedcolumns`. Styling packages for Bootstrap, Foundation and other styling libraries are also available by adding a suffix to the package name.
Please see the DataTables [NPM](//datatables.net/download/npm) and [Bower](//datatables.net/download/bower) installation pages for further information. The [DataTables installation manual](//datatables.net/manual/installation) also has details on how to use package managers with DataTables.
# Basic usage
FixedColumns is initialised using the `$.fn.dataTable.FixedColumns()` constructor. For example:
FixedColumns is initialised using the `fixedColumns` option in the DataTables constructor - a simple boolean `true` will enable the feature. Further options can be specified using this option as an object - see the documentation for details. DataTables' scrolling options should also be enabled to use this feature.
Example:
```js
$(document).ready(function() {
@@ -22,21 +26,19 @@ $(document).ready(function() {
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false
paging: false,
fixedColumns: true
} );
new $.fn.dataTable.FixedColumns( table );
} );
```
# Documentation / support
* Documentation: http://datatables.net/extensions/FixedColumns/
* DataTables support forums: http://datatables.net/forums
* [Documentation](https://datatables.net/extensions/fixedcolumns/)
* [DataTables support forums](http://datatables.net/forums)
# GitHub
If you fancy getting involved with the development of FixedColumns and help make it better, please refer to its GitHub repo: https://github.com/DataTables/FixedColumns
If you fancy getting involved with the development of FixedColumns and help make it better, please refer to its [GitHub repo](https://github.com/DataTables/FixedColumns).

View File

@@ -1,15 +1,15 @@
/*! FixedColumns 3.0.4
* ©2010-2014 SpryMedia Ltd - datatables.net/license
/*! FixedColumns 3.2.1
* ©2010-2016 SpryMedia Ltd - datatables.net/license
*/
/**
* @summary FixedColumns
* @description Freeze columns in place on a scrolling DataTable
* @version 3.0.4
* @version 3.2.1
* @file dataTables.fixedColumns.js
* @author SpryMedia Ltd (www.sprymedia.co.uk)
* @contact www.sprymedia.co.uk/contact
* @copyright Copyright 2010-2014 SpryMedia Ltd.
* @copyright Copyright 2010-2016 SpryMedia Ltd.
*
* This source file is free software, available under the following license:
* MIT license - http://datatables.net/license/mit
@@ -20,13 +20,35 @@
*
* For details please refer to: http://www.datatables.net
*/
(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) {
var factory = function( $, DataTable ) {
"use strict";
return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
'use strict';
var DataTable = $.fn.dataTable;
var _firefoxScroll;
/**
* When making use of DataTables' x-axis scrolling feature, you may wish to
@@ -62,14 +84,12 @@ var FixedColumns = function ( dt, init ) {
var that = this;
/* Sanity check - you just know it will happen */
if ( ! ( this instanceof FixedColumns ) )
{
if ( ! ( this instanceof FixedColumns ) ) {
alert( "FixedColumns warning: FixedColumns must be initialised with the 'new' keyword." );
return;
}
if ( typeof init == 'undefined' )
{
if ( init === undefined || init === true ) {
init = {};
}
@@ -82,9 +102,7 @@ var FixedColumns = function ( dt, init ) {
}
// v1.10 allows the settings object to be got form a number of sources
var dtSettings = $.fn.dataTable.Api ?
new $.fn.dataTable.Api( dt ).settings()[0] :
dt.fnSettings();
var dtSettings = new $.fn.dataTable.Api( dt ).settings()[0];
/**
* Settings object which contains customisable information for FixedColumns instance
@@ -265,6 +283,10 @@ var FixedColumns = function ( dt, init ) {
}
};
if ( dtSettings._oFixedColumns ) {
throw 'FixedColumns already initialised on this table';
}
/* Attach the instance to the DataTables instance so it can be accessed easily */
dtSettings._oFixedColumns = this;
@@ -283,7 +305,7 @@ var FixedColumns = function ( dt, init ) {
FixedColumns.prototype = /** @lends FixedColumns.prototype */{
$.extend( FixedColumns.prototype , {
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Public methods
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -468,13 +490,30 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
/* Event handlers */
var mouseController;
var mouseDown = false;
// When the mouse is down (drag scroll) the mouse controller cannot
// change, as the browser keeps the original element as the scrolling one
$(this.s.dt.nTableWrapper).on( 'mousedown.DTFC', function () {
mouseDown = true;
$(document).one( 'mouseup', function () {
mouseDown = false;
} );
} );
// When the body is scrolled - scroll the left and right columns
$(this.dom.scroller)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
mouseController = 'main';
if ( ! mouseDown ) {
mouseController = 'main';
}
} )
.on( 'scroll.DTFC', function () {
.on( 'scroll.DTFC', function (e) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'main';
}
if ( mouseController === 'main' ) {
if ( that.s.iLeftColumns > 0 ) {
that.dom.grid.left.liner.scrollTop = that.dom.scroller.scrollTop;
@@ -493,9 +532,15 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
// When scrolling the left column, scroll the body and right column
$(that.dom.grid.left.liner)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
mouseController = 'left';
if ( ! mouseDown ) {
mouseController = 'left';
}
} )
.on( 'scroll.DTFC', function () {
.on( 'scroll.DTFC', function ( e ) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'left';
}
if ( mouseController === 'left' ) {
that.dom.scroller.scrollTop = that.dom.grid.left.liner.scrollTop;
if ( that.s.iRightColumns > 0 ) {
@@ -503,7 +548,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
}
}
} )
.on( wheelType, function(e) { // xxx update the destroy as well
.on( wheelType, function(e) {
// Pass horizontal scrolling through
var xDelta = e.type === 'wheel' ?
-e.originalEvent.deltaX :
@@ -516,9 +561,15 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
// When scrolling the right column, scroll the body and the left column
$(that.dom.grid.right.liner)
.on( 'mouseover.DTFC touchstart.DTFC', function () {
mouseController = 'right';
if ( ! mouseDown ) {
mouseController = 'right';
}
} )
.on( 'scroll.DTFC', function () {
.on( 'scroll.DTFC', function ( e ) {
if ( ! mouseController && e.originalEvent ) {
mouseController = 'right';
}
if ( mouseController === 'right' ) {
that.dom.scroller.scrollTop = that.dom.grid.right.liner.scrollTop;
if ( that.s.iLeftColumns > 0 ) {
@@ -544,6 +595,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
jqTable
.on( 'draw.dt.DTFC', function () {
that._fnColCalc();
that._fnDraw.call( that, bFirstDraw );
bFirstDraw = false;
} )
@@ -551,21 +603,27 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
that._fnColCalc();
that._fnGridLayout( that );
} )
.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 );
}
} )
.on( 'select.dt.DTFC deselect.dt.DTFC', function ( e, dt, type, indexes ) {
that._fnDraw( false );
} )
.on( 'destroy.dt.DTFC', function () {
jqTable.off( 'column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC' );
jqTable.off( '.DTFC' );
$(that.dom.scroller).off( 'scroll.DTFC mouseover.DTFC' );
$(window).off( 'resize.DTFC' );
$(that.dom.scroller).off( '.DTFC' );
$(window).off( '.DTFC' );
$(this.s.dt.nTableWrapper).off( '.DTFC' );
$(that.dom.grid.left.liner).off( 'scroll.DTFC mouseover.DTFC '+wheelType );
$(that.dom.grid.left.liner).off( '.DTFC '+wheelType );
$(that.dom.grid.left.wrapper).remove();
$(that.dom.grid.right.liner).off( 'scroll.DTFC mouseover.DTFC '+wheelType );
$(that.dom.grid.right.liner).off( '.DTFC '+wheelType );
$(that.dom.grid.right.wrapper).remove();
} );
@@ -667,7 +725,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
'</div>'+
'<div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div>'+
'</div>'+
'<div class="DTFC_RightWrapper" style="position:absolute; top:0; left:0;">'+
'<div class="DTFC_RightWrapper" style="position:absolute; top:0; right:0;">'+
'<div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;">'+
'<div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div>'+
'</div>'+
@@ -704,6 +762,8 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
this.dom.grid.right.body = nRight.childNodes[1];
this.dom.grid.right.liner = $('div.DTFC_RightBodyLiner', nSWrapper)[0];
nRight.style.right = oOverflow.bar+"px";
block = $('div.DTFC_RightHeadBlocker', nSWrapper)[0];
block.style.width = oOverflow.bar+"px";
block.style.right = -oOverflow.bar+"px";
@@ -729,6 +789,24 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
this.dom.grid.right.foot = nRight.childNodes[2];
}
}
// RTL support - swap the position of the left and right columns (#48)
if ( $(this.dom.body).css('direction') === 'rtl' ) {
$(nLeft).css( {
left: '',
right: 0
} );
$(nRight).css( {
left: oOverflow.bar+"px",
right: ''
} );
$('div.DTFC_RightHeadBlocker', nSWrapper).css( {
left: -oOverflow.bar+'px',
right: ''
} );
}
},
@@ -739,6 +817,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
*/
"_fnGridLayout": function ()
{
var that = this;
var oGrid = this.dom.grid;
var iWidth = $(oGrid.wrapper).width();
var iBodyHeight = $(this.s.dt.nTable.parentNode).outerHeight();
@@ -755,6 +834,12 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
node.style.paddingRight = "20px";
node.style.boxSizing = "border-box";
}
else if ( that._firefoxScrollError() ) {
// See the above function for why this is required
if ( $(node).height() > 34 ) {
node.style.width = (width+oOverflow.bar)+"px";
}
}
else {
// Otherwise just overflow by the scrollbar
node.style.width = (width+oOverflow.bar)+"px";
@@ -791,7 +876,6 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
}
oGrid.right.wrapper.style.width = iRightWidth+"px";
oGrid.right.wrapper.style.left = iRight+"px";
oGrid.right.wrapper.style.height = "1px";
oGrid.right.body.style.height = iBodyHeight+"px";
if ( oGrid.right.foot ) {
@@ -922,9 +1006,10 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
* @returns {Array} Copy of the layout array
* @param {Object} aoOriginal Layout array from DataTables (aoHeader or aoFooter)
* @param {Object} aiColumns Columns to copy
* @param {boolean} events Copy cell events or not
* @private
*/
"_fnCopyLayout": function ( aoOriginal, aiColumns )
"_fnCopyLayout": function ( aoOriginal, aiColumns, events )
{
var aReturn = [];
var aClones = [];
@@ -933,7 +1018,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
for ( var i=0, iLen=aoOriginal.length ; i<iLen ; i++ )
{
var aRow = [];
aRow.nTr = $(aoOriginal[i].nTr).clone(true, true)[0];
aRow.nTr = $(aoOriginal[i].nTr).clone(events, false)[0];
for ( var j=0, jLen=this.s.iTableColumns ; j<jLen ; j++ )
{
@@ -945,7 +1030,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
var iCloned = $.inArray( aoOriginal[i][j].cell, aCloned );
if ( iCloned === -1 )
{
var nClone = $(aoOriginal[i][j].cell).clone(true, true)[0];
var nClone = $(aoOriginal[i][j].cell).clone(events, false)[0];
aClones.push( nClone );
aCloned.push( aoOriginal[i][j].cell );
@@ -992,17 +1077,15 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
*/
if ( bAll )
{
if ( oClone.header !== null )
{
oClone.header.parentNode.removeChild( oClone.header );
}
oClone.header = $(this.dom.header).clone(true, true)[0];
$(oClone.header).remove();
oClone.header = $(this.dom.header).clone(true, false)[0];
oClone.header.className += " DTFC_Cloned";
oClone.header.style.width = "100%";
oGrid.head.appendChild( oClone.header );
/* Copy the DataTables layout cache for the header for our floating column */
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns );
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns, true );
jqCloneThead = $('>thead', oClone.header);
jqCloneThead.empty();
@@ -1024,7 +1107,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
* cloned cells, just copy the classes across. To get the matching layout for the
* fixed component, we use the DataTables _fnDetectHeader method, allowing 1:1 mapping
*/
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns );
aoCloneLayout = this._fnCopyLayout( dt.aoHeader, aiColumns, false );
aoFixedHeader=[];
dt.oApi._fnDetectHeader( aoFixedHeader, $('>thead', oClone.header)[0] );
@@ -1055,7 +1138,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
if ( oClone.body !== null )
{
oClone.body.parentNode.removeChild( oClone.body );
$(oClone.body).remove();
oClone.body = null;
}
@@ -1100,12 +1183,14 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
/* Add in the tbody elements, cloning form the master table */
$('>tbody>tr', that.dom.body).each( function (z) {
var n = this.cloneNode(false);
n.removeAttribute('id');
var i = that.s.dt.oFeatures.bServerSide===false ?
that.s.dt.aiDisplay[ that.s.dt._iDisplayStart+z ] : z;
var aTds = that.s.dt.aoData[ i ].anCells || $(this).children('td, th');
var n = this.cloneNode(false);
n.removeAttribute('id');
n.setAttribute( 'data-dt-row', i );
for ( iIndex=0 ; iIndex<aiColumns.length ; iIndex++ )
{
iColumn = aiColumns[iIndex];
@@ -1113,6 +1198,8 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
if ( aTds.length > 0 )
{
nClone = $( aTds[iColumn] ).clone(true, true)[0];
nClone.setAttribute( 'data-dt-row', i );
nClone.setAttribute( 'data-dt-column', iIndex );
n.appendChild( nClone );
}
}
@@ -1169,7 +1256,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
oGrid.foot.appendChild( oClone.footer );
/* Copy the footer just like we do for the header */
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns );
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns, true );
var jqCloneTfoot = $('>tfoot', oClone.footer);
jqCloneTfoot.empty();
@@ -1181,7 +1268,7 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
}
else
{
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns );
aoCloneLayout = this._fnCopyLayout( dt.aoFooter, aiColumns, false );
var aoCurrFooter=[];
dt.oApi._fnDetectHeader( aoCurrFooter, $('>tfoot', oClone.footer)[0] );
@@ -1279,8 +1366,43 @@ FixedColumns.prototype = /** @lends FixedColumns.prototype */{
anClone[i].style.height = heights[i]+"px";
anOriginal[i].style.height = heights[i]+"px";
}
},
/**
* Determine if the UA suffers from Firefox's overflow:scroll scrollbars
* not being shown bug.
*
* Firefox doesn't draw scrollbars, even if it is told to using
* overflow:scroll, if the div is less than 34px height. See bugs 292284 and
* 781885. Using UA detection here since this is particularly hard to detect
* using objects - its a straight up rendering error in Firefox.
*
* @return {boolean} True if Firefox error is present, false otherwise
*/
_firefoxScrollError: function () {
if ( _firefoxScroll === undefined ) {
var test = $('<div/>')
.css( {
position: 'absolute',
top: 0,
left: 0,
height: 10,
width: 50,
overflow: 'scroll'
} )
.appendTo( 'body' );
// Make sure this doesn't apply on Macs with 0 width scrollbars
_firefoxScroll = (
test[0].clientWidth === test[0].offsetWidth && this._fnDTOverflow().bar !== 0
);
test.remove();
}
return _firefoxScroll;
}
};
} );
@@ -1376,48 +1498,108 @@ FixedColumns.defaults = /** @lends FixedColumns.defaults */{
* @default See code
* @static
*/
FixedColumns.version = "3.0.4";
FixedColumns.version = "3.2.1";
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Fired events (for documentation)
* DataTables API integration
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
DataTable.Api.register( 'fixedColumns()', function () {
return this;
} );
DataTable.Api.register( 'fixedColumns().update()', function () {
return this.iterator( 'table', function ( ctx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnUpdate();
}
} );
} );
DataTable.Api.register( 'fixedColumns().relayout()', function () {
return this.iterator( 'table', function ( ctx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnRedrawLayout();
}
} );
} );
DataTable.Api.register( 'rows().recalcHeight()', function () {
return this.iterator( 'row', function ( ctx, idx ) {
if ( ctx._oFixedColumns ) {
ctx._oFixedColumns.fnRecalculateHeight( this.row(idx).node() );
}
} );
} );
DataTable.Api.register( 'fixedColumns().rowIndex()', function ( row ) {
row = $(row);
return row.parents('.DTFC_Cloned').length ?
this.rows( { page: 'current' } ).indexes()[ row.index() ] :
this.row( row ).index();
} );
DataTable.Api.register( 'fixedColumns().cellIndex()', function ( cell ) {
cell = $(cell);
if ( cell.parents('.DTFC_Cloned').length ) {
var rowClonedIdx = cell.parent().index();
var rowIdx = this.rows( { page: 'current' } ).indexes()[ rowClonedIdx ];
var columnIdx;
if ( cell.parents('.DTFC_LeftWrapper').length ) {
columnIdx = cell.index();
}
else {
var columns = this.columns().flatten().length;
columnIdx = columns - this.context[0]._oFixedColumns.s.iRightColumns + cell.index();
}
return {
row: rowIdx,
column: this.column.index( 'toData', columnIdx ),
columnVisible: columnIdx
};
}
else {
return this.cell( cell ).index();
}
} );
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Initialisation
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
// Attach a listener to the document which listens for DataTables initialisation
// events so we can automatically initialise
$(document).on( 'init.dt.fixedColumns', function (e, settings) {
if ( e.namespace !== 'dt' ) {
return;
}
var init = settings.oInit.fixedColumns;
var defaults = DataTable.defaults.fixedColumns;
if ( init || defaults ) {
var opts = $.extend( {}, init, defaults );
if ( init !== false ) {
new FixedColumns( settings, opts );
}
}
} );
/**
* Event fired whenever FixedColumns redraws the fixed columns (i.e. clones the table elements from the main DataTable). This will occur whenever the DataTable that the FixedColumns instance is attached does its own draw.
* @name FixedColumns#draw.dtfc
* @event
* @param {event} e jQuery event object
* @param {object} o Event parameters from FixedColumns
* @param {object} o.leftClone Instance's object dom.clone.left for easy reference. This object contains references to the left fixed clumn column's nodes
* @param {object} o.rightClone Instance's object dom.clone.right for easy reference. This object contains references to the right fixed clumn column's nodes
*/
// Make FixedColumns accessible from the DataTables instance
$.fn.dataTable.FixedColumns = FixedColumns;
$.fn.DataTable.FixedColumns = FixedColumns;
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);
}));

View File

@@ -1,30 +1,35 @@
/*!
FixedColumns 3.0.4
©2010-2014 SpryMedia Ltd - datatables.net/license
FixedColumns 3.2.1
©2010-2016 SpryMedia Ltd - datatables.net/license
*/
(function(r,s,t){var p=function(d){var j=function(a,b){var c=this;if(this instanceof j){"undefined"==typeof b&&(b={});var g=d.fn.dataTable.camelToHungarian;g&&(g(j.defaults,j.defaults,!0),g(j.defaults,b));g=d.fn.dataTable.Api?(new d.fn.dataTable.Api(a)).settings()[0]:a.fnSettings();this.s={dt:g,iTableColumns:g.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,
head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};g._oFixedColumns=this;g._bInitComplete?this._fnConstruct(b):g.oApi._fnCallbackReg(g,"aoInitComplete",function(){c._fnConstruct(b)},"FixedColumns")}else alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.")};j.prototype={fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnColCalc();this._fnGridLayout();this.fnUpdate()},fnRecalculateHeight:function(a){delete a._DTTC_iHeight;
a.style.height="auto"},fnSetRowHeight:function(a,b){a.style.height=b+"px"},fnGetPosition:function(a){var b=this.s.dt.oInstance;if(d(a).parents(".DTFC_Cloned").length){if("tr"===a.nodeName.toLowerCase())return a=d(a).index(),b.fnGetPosition(d("tr",this.s.dt.nTBody)[a]);var c=d(a).index(),a=d(a.parentNode).index();return[b.fnGetPosition(d("tr",this.s.dt.nTBody)[a]),c,b.oApi._fnVisibleToColumnIndex(this.s.dt,c)]}return b.fnGetPosition(a)},_fnConstruct:function(a){var b=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||
!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+j.VERSION+" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else if(""===this.s.dt.oScroll.sX)this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else{this.s=d.extend(!0,this.s,j.defaults,a);a=this.s.dt.oClasses;this.dom.grid.dt=d(this.s.dt.nTable).parents("div."+
a.sScrollWrapper)[0];this.dom.scroller=d("div."+a.sScrollBody,this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var c;d(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",function(){c="main"}).on("scroll.DTFC",function(){if("main"===c&&(0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.scroller.scrollTop),0<b.s.iRightColumns))b.dom.grid.right.liner.scrollTop=b.dom.scroller.scrollTop});var g="onwheel"in s.createElement("div")?"wheel.DTFC":"mousewheel.DTFC";if(0<b.s.iLeftColumns)d(b.dom.grid.left.liner).on("mouseover.DTFC touchstart.DTFC",
function(){c="left"}).on("scroll.DTFC",function(){"left"===c&&(b.dom.scroller.scrollTop=b.dom.grid.left.liner.scrollTop,0<b.s.iRightColumns&&(b.dom.grid.right.liner.scrollTop=b.dom.grid.left.liner.scrollTop))}).on(g,function(a){b.dom.scroller.scrollLeft-="wheel"===a.type?-a.originalEvent.deltaX:a.originalEvent.wheelDeltaX});if(0<b.s.iRightColumns)d(b.dom.grid.right.liner).on("mouseover.DTFC touchstart.DTFC",function(){c="right"}).on("scroll.DTFC",function(){"right"===c&&(b.dom.scroller.scrollTop=
b.dom.grid.right.liner.scrollTop,0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.grid.right.liner.scrollTop))}).on(g,function(a){b.dom.scroller.scrollLeft-="wheel"===a.type?-a.originalEvent.deltaX:a.originalEvent.wheelDeltaX});d(r).on("resize.DTFC",function(){b._fnGridLayout.call(b)});var f=!0,e=d(this.s.dt.nTable);e.on("draw.dt.DTFC",function(){b._fnDraw.call(b,f);f=!1}).on("column-sizing.dt.DTFC",function(){b._fnColCalc();b._fnGridLayout(b)}).on("column-visibility.dt.DTFC",function(){b._fnColCalc();
b._fnGridLayout(b);b._fnDraw(!0)}).on("destroy.dt.DTFC",function(){e.off("column-sizing.dt.DTFC destroy.dt.DTFC draw.dt.DTFC");d(b.dom.scroller).off("scroll.DTFC mouseover.DTFC");d(r).off("resize.DTFC");d(b.dom.grid.left.liner).off("scroll.DTFC mouseover.DTFC "+g);d(b.dom.grid.left.wrapper).remove();d(b.dom.grid.right.liner).off("scroll.DTFC mouseover.DTFC "+g);d(b.dom.grid.right.wrapper).remove()});this._fnGridLayout();this.s.dt.oInstance.fnDraw(!1)}},_fnColCalc:function(){var a=this,b=0,c=0;this.s.aiInnerWidths=
[];this.s.aiOuterWidths=[];d.each(this.s.dt.aoColumns,function(g,f){var e=d(f.nTh),h;if(e.filter(":visible").length){var i=e.outerWidth();0===a.s.aiOuterWidths.length&&(h=d(a.s.dt.nTable).css("border-left-width"),i+="string"===typeof h?1:parseInt(h,10));a.s.aiOuterWidths.length===a.s.dt.aoColumns.length-1&&(h=d(a.s.dt.nTable).css("border-right-width"),i+="string"===typeof h?1:parseInt(h,10));a.s.aiOuterWidths.push(i);a.s.aiInnerWidths.push(e.width());g<a.s.iLeftColumns&&(b+=i);a.s.iTableColumns-a.s.iRightColumns<=
g&&(c+=i)}else a.s.aiInnerWidths.push(0),a.s.aiOuterWidths.push(0)});this.s.iLeftWidth=b;this.s.iRightWidth=c},_fnGridSetup:function(){var a=this._fnDTOverflow(),b;this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position="relative";var c=d('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0],
g=c.childNodes[0],f=c.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(c,this.dom.grid.dt);c.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=c;0<this.s.iLeftColumns&&(this.dom.grid.left.wrapper=g,this.dom.grid.left.head=g.childNodes[0],this.dom.grid.left.body=g.childNodes[1],this.dom.grid.left.liner=d("div.DTFC_LeftBodyLiner",c)[0],c.appendChild(g));0<this.s.iRightColumns&&(this.dom.grid.right.wrapper=f,this.dom.grid.right.head=f.childNodes[0],this.dom.grid.right.body=f.childNodes[1],this.dom.grid.right.liner=
d("div.DTFC_RightBodyLiner",c)[0],b=d("div.DTFC_RightHeadBlocker",c)[0],b.style.width=a.bar+"px",b.style.right=-a.bar+"px",this.dom.grid.right.headBlock=b,b=d("div.DTFC_RightFootBlocker",c)[0],b.style.width=a.bar+"px",b.style.right=-a.bar+"px",this.dom.grid.right.footBlock=b,c.appendChild(f));if(this.s.dt.nTFoot&&(this.dom.footer=this.s.dt.nTFoot.parentNode,0<this.s.iLeftColumns&&(this.dom.grid.left.foot=g.childNodes[2]),0<this.s.iRightColumns))this.dom.grid.right.foot=f.childNodes[2]},_fnGridLayout:function(){var a=
this.dom.grid,b=d(a.wrapper).width(),c=d(this.s.dt.nTable.parentNode).outerHeight(),g=d(this.s.dt.nTable.parentNode.parentNode).outerHeight(),f=this._fnDTOverflow(),e=this.s.iLeftWidth,h=this.s.iRightWidth,i=function(a,b){f.bar?a.style.width=b+f.bar+"px":(a.style.width=b+20+"px",a.style.paddingRight="20px",a.style.boxSizing="border-box")};f.x&&(c-=f.bar);a.wrapper.style.height=g+"px";0<this.s.iLeftColumns&&(a.left.wrapper.style.width=e+"px",a.left.wrapper.style.height="1px",a.left.body.style.height=
c+"px",a.left.foot&&(a.left.foot.style.top=(f.x?f.bar:0)+"px"),i(a.left.liner,e),a.left.liner.style.height=c+"px");0<this.s.iRightColumns&&(b-=h,f.y&&(b-=f.bar),a.right.wrapper.style.width=h+"px",a.right.wrapper.style.left=b+"px",a.right.wrapper.style.height="1px",a.right.body.style.height=c+"px",a.right.foot&&(a.right.foot.style.top=(f.x?f.bar:0)+"px"),i(a.right.liner,h),a.right.liner.style.height=c+"px",a.right.headBlock.style.display=f.y?"block":"none",a.right.footBlock.style.display=f.y?"block":
"none")},_fnDTOverflow:function(){var a=this.s.dt.nTable,b=a.parentNode,c={x:!1,y:!1,bar:this.s.dt.oScroll.iBarWidth};a.offsetWidth>b.clientWidth&&(c.x=!0);a.offsetHeight>b.clientHeight&&(c.y=!0);return c},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);d(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=
this.s.iRightColumns)){var b,c=[];for(b=this.s.iTableColumns-this.s.iRightColumns;b<this.s.iTableColumns;b++)this.s.dt.aoColumns[b].bVisible&&c.push(b);this._fnClone(this.dom.clone.right,this.dom.grid.right,c,a)}},_fnCloneLeft:function(a){if(!(0>=this.s.iLeftColumns)){var b,c=[];for(b=0;b<this.s.iLeftColumns;b++)this.s.dt.aoColumns[b].bVisible&&c.push(b);this._fnClone(this.dom.clone.left,this.dom.grid.left,c,a)}},_fnCopyLayout:function(a,b){for(var c=[],g=[],f=[],e=0,h=a.length;e<h;e++){var i=[];
i.nTr=d(a[e].nTr).clone(!0,!0)[0];for(var k=0,j=this.s.iTableColumns;k<j;k++)if(-1!==d.inArray(k,b)){var m=d.inArray(a[e][k].cell,f);-1===m?(m=d(a[e][k].cell).clone(!0,!0)[0],g.push(m),f.push(a[e][k].cell),i.push({cell:m,unique:a[e][k].unique})):i.push({cell:g[m],unique:a[e][k].unique})}c.push(i)}return c},_fnClone:function(a,b,c,g){var f=this,e,h,i,k,j,m,o,n,q,l=this.s.dt;if(g){null!==a.header&&a.header.parentNode.removeChild(a.header);a.header=d(this.dom.header).clone(!0,!0)[0];a.header.className+=
" DTFC_Cloned";a.header.style.width="100%";b.head.appendChild(a.header);n=this._fnCopyLayout(l.aoHeader,c);k=d(">thead",a.header);k.empty();e=0;for(h=n.length;e<h;e++)k[0].appendChild(n[e].nTr);l.oApi._fnDrawHead(l,n,!0)}else{n=this._fnCopyLayout(l.aoHeader,c);q=[];l.oApi._fnDetectHeader(q,d(">thead",a.header)[0]);e=0;for(h=n.length;e<h;e++){i=0;for(k=n[e].length;i<k;i++)q[e][i].cell.className=n[e][i].cell.className,d("span.DataTables_sort_icon",q[e][i].cell).each(function(){this.className=d("span.DataTables_sort_icon",
n[e][i].cell)[0].className})}}this._fnEqualiseHeights("thead",this.dom.header,a.header);"auto"==this.s.sHeightMatch&&d(">tbody>tr",f.dom.body).css("height","auto");null!==a.body&&(a.body.parentNode.removeChild(a.body),a.body=null);a.body=d(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=l.oScroll.iBarWidth+"px";a.body.style.marginBottom=2*l.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");d(">thead>tr",a.body).empty();d(">tfoot",
a.body).remove();var p=d("tbody",a.body)[0];d(p).empty();if(0<l.aiDisplay.length){h=d(">thead>tr",a.body)[0];for(o=0;o<c.length;o++)j=c[o],m=d(l.aoColumns[j].nTh).clone(!0)[0],m.innerHTML="",k=m.style,k.paddingTop="0",k.paddingBottom="0",k.borderTopWidth="0",k.borderBottomWidth="0",k.height=0,k.width=f.s.aiInnerWidths[j]+"px",h.appendChild(m);d(">tbody>tr",f.dom.body).each(function(a){var b=this.cloneNode(false);b.removeAttribute("id");a=f.s.dt.aoData[f.s.dt.oFeatures.bServerSide===false?f.s.dt.aiDisplay[f.s.dt._iDisplayStart+
a]:a].anCells||d(this).children("td, th");for(o=0;o<c.length;o++){j=c[o];if(a.length>0){m=d(a[j]).clone(true,true)[0];b.appendChild(m)}}p.appendChild(b)})}else d(">tbody>tr",f.dom.body).each(function(){m=this.cloneNode(true);m.className=m.className+" DTFC_NoData";d("td",m).html("");p.appendChild(m)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";l.oScroller!==t&&(h=l.oScroller.dom.force,b.forcer?b.forcer.style.height=h.style.height:(b.forcer=h.cloneNode(!0),b.liner.appendChild(b.forcer)));
b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody",f.dom.body,a.body);if(null!==l.nTFoot){if(g){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=d(this.dom.footer).clone(!0,!0)[0];a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);n=this._fnCopyLayout(l.aoFooter,c);b=d(">tfoot",a.footer);b.empty();e=0;for(h=n.length;e<h;e++)b[0].appendChild(n[e].nTr);l.oApi._fnDrawHead(l,n,!0)}else{n=this._fnCopyLayout(l.aoFooter,c);b=[];l.oApi._fnDetectHeader(b,
d(">tfoot",a.footer)[0]);e=0;for(h=n.length;e<h;e++){i=0;for(k=n[e].length;i<k;i++)b[e][i].cell.className=n[e][i].cell.className}}this._fnEqualiseHeights("tfoot",this.dom.footer,a.footer)}b=l.oApi._fnGetUniqueThs(l,d(">thead",a.header)[0]);d(b).each(function(a){j=c[a];this.style.width=f.s.aiInnerWidths[j]+"px"});null!==f.s.dt.nTFoot&&(b=l.oApi._fnGetUniqueThs(l,d(">tfoot",a.footer)[0]),d(b).each(function(a){j=c[a];this.style.width=f.s.aiInnerWidths[j]+"px"}))},_fnGetTrNodes:function(a){for(var b=
[],c=0,d=a.childNodes.length;c<d;c++)"TR"==a.childNodes[c].nodeName.toUpperCase()&&b.push(a.childNodes[c]);return b},_fnEqualiseHeights:function(a,b,c){if(!("none"==this.s.sHeightMatch&&"thead"!==a&&"tfoot"!==a)){var g,f,e=b.getElementsByTagName(a)[0],c=c.getElementsByTagName(a)[0],a=d(">"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();for(var e=this._fnGetTrNodes(e),b=this._fnGetTrNodes(c),h=[],c=0,a=b.length;c<a;c++)g=e[c].offsetHeight,f=b[c].offsetHeight,g=f>g?f:g,"semiauto"==this.s.sHeightMatch&&
(e[c]._DTTC_iHeight=g),h.push(g);c=0;for(a=b.length;c<a;c++)b[c].style.height=h[c]+"px",e[c].style.height=h[c]+"px"}}};j.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};j.version="3.0.4";d.fn.dataTable.FixedColumns=j;return d.fn.DataTable.FixedColumns=j};"function"===typeof define&&define.amd?define(["jquery","datatables"],p):"object"===typeof exports?p(require("jquery"),require("datatables")):jQuery&&!jQuery.fn.dataTable.FixedColumns&&p(jQuery,jQuery.fn.dataTable)})(window,
document);
(function(d){"function"===typeof define&&define.amd?define(["jquery","datatables.net"],function(q){return d(q,window,document)}):"object"===typeof exports?module.exports=function(q,r){q||(q=window);if(!r||!r.fn.dataTable)r=require("datatables.net")(q,r).$;return d(r,q,q.document)}:d(jQuery,window,document)})(function(d,q,r,t){var s=d.fn.dataTable,u,m=function(a,b){var c=this;if(this instanceof m){if(b===t||!0===b)b={};var e=d.fn.dataTable.camelToHungarian;e&&(e(m.defaults,m.defaults,!0),e(m.defaults,
b));e=(new d.fn.dataTable.Api(a)).settings()[0];this.s={dt:e,iTableColumns:e.aoColumns.length,aiOuterWidths:[],aiInnerWidths:[]};this.dom={scroller:null,header:null,body:null,footer:null,grid:{wrapper:null,dt:null,left:{wrapper:null,head:null,body:null,foot:null},right:{wrapper:null,head:null,body:null,foot:null}},clone:{left:{header:null,body:null,footer:null},right:{header:null,body:null,footer:null}}};if(e._oFixedColumns)throw"FixedColumns already initialised on this table";e._oFixedColumns=this;
e._bInitComplete?this._fnConstruct(b):e.oApi._fnCallbackReg(e,"aoInitComplete",function(){c._fnConstruct(b)},"FixedColumns")}else alert("FixedColumns warning: FixedColumns must be initialised with the 'new' keyword.")};d.extend(m.prototype,{fnUpdate:function(){this._fnDraw(!0)},fnRedrawLayout:function(){this._fnColCalc();this._fnGridLayout();this.fnUpdate()},fnRecalculateHeight:function(a){delete a._DTTC_iHeight;a.style.height="auto"},fnSetRowHeight:function(a,b){a.style.height=b+"px"},fnGetPosition:function(a){var b=
this.s.dt.oInstance;if(d(a).parents(".DTFC_Cloned").length){if("tr"===a.nodeName.toLowerCase())return a=d(a).index(),b.fnGetPosition(d("tr",this.s.dt.nTBody)[a]);var c=d(a).index(),a=d(a.parentNode).index();return[b.fnGetPosition(d("tr",this.s.dt.nTBody)[a]),c,b.oApi._fnVisibleToColumnIndex(this.s.dt,c)]}return b.fnGetPosition(a)},_fnConstruct:function(a){var b=this;if("function"!=typeof this.s.dt.oInstance.fnVersionCheck||!0!==this.s.dt.oInstance.fnVersionCheck("1.8.0"))alert("FixedColumns "+m.VERSION+
" required DataTables 1.8.0 or later. Please upgrade your DataTables installation");else if(""===this.s.dt.oScroll.sX)this.s.dt.oInstance.oApi._fnLog(this.s.dt,1,"FixedColumns is not needed (no x-scrolling in DataTables enabled), so no action will be taken. Use 'FixedHeader' for column fixing when scrolling is not enabled");else{this.s=d.extend(!0,this.s,m.defaults,a);a=this.s.dt.oClasses;this.dom.grid.dt=d(this.s.dt.nTable).parents("div."+a.sScrollWrapper)[0];this.dom.scroller=d("div."+a.sScrollBody,
this.dom.grid.dt)[0];this._fnColCalc();this._fnGridSetup();var c,e=!1;d(this.s.dt.nTableWrapper).on("mousedown.DTFC",function(){e=!0;d(r).one("mouseup",function(){e=!1})});d(this.dom.scroller).on("mouseover.DTFC touchstart.DTFC",function(){e||(c="main")}).on("scroll.DTFC",function(a){!c&&a.originalEvent&&(c="main");if("main"===c&&(0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.scroller.scrollTop),0<b.s.iRightColumns))b.dom.grid.right.liner.scrollTop=b.dom.scroller.scrollTop});var f="onwheel"in
r.createElement("div")?"wheel.DTFC":"mousewheel.DTFC";if(0<b.s.iLeftColumns)d(b.dom.grid.left.liner).on("mouseover.DTFC touchstart.DTFC",function(){e||(c="left")}).on("scroll.DTFC",function(a){!c&&a.originalEvent&&(c="left");"left"===c&&(b.dom.scroller.scrollTop=b.dom.grid.left.liner.scrollTop,0<b.s.iRightColumns&&(b.dom.grid.right.liner.scrollTop=b.dom.grid.left.liner.scrollTop))}).on(f,function(a){b.dom.scroller.scrollLeft-="wheel"===a.type?-a.originalEvent.deltaX:a.originalEvent.wheelDeltaX});
if(0<b.s.iRightColumns)d(b.dom.grid.right.liner).on("mouseover.DTFC touchstart.DTFC",function(){e||(c="right")}).on("scroll.DTFC",function(a){!c&&a.originalEvent&&(c="right");"right"===c&&(b.dom.scroller.scrollTop=b.dom.grid.right.liner.scrollTop,0<b.s.iLeftColumns&&(b.dom.grid.left.liner.scrollTop=b.dom.grid.right.liner.scrollTop))}).on(f,function(a){b.dom.scroller.scrollLeft-="wheel"===a.type?-a.originalEvent.deltaX:a.originalEvent.wheelDeltaX});d(q).on("resize.DTFC",function(){b._fnGridLayout.call(b)});
var g=!0,h=d(this.s.dt.nTable);h.on("draw.dt.DTFC",function(){b._fnColCalc();b._fnDraw.call(b,g);g=!1}).on("column-sizing.dt.DTFC",function(){b._fnColCalc();b._fnGridLayout(b)}).on("column-visibility.dt.DTFC",function(a,c,d,e,f){if(f===t||f)b._fnColCalc(),b._fnGridLayout(b),b._fnDraw(!0)}).on("select.dt.DTFC deselect.dt.DTFC",function(){b._fnDraw(!1)}).on("destroy.dt.DTFC",function(){h.off(".DTFC");d(b.dom.scroller).off(".DTFC");d(q).off(".DTFC");d(this.s.dt.nTableWrapper).off(".DTFC");d(b.dom.grid.left.liner).off(".DTFC "+
f);d(b.dom.grid.left.wrapper).remove();d(b.dom.grid.right.liner).off(".DTFC "+f);d(b.dom.grid.right.wrapper).remove()});this._fnGridLayout();this.s.dt.oInstance.fnDraw(!1)}},_fnColCalc:function(){var a=this,b=0,c=0;this.s.aiInnerWidths=[];this.s.aiOuterWidths=[];d.each(this.s.dt.aoColumns,function(e,f){var g=d(f.nTh),h;if(g.filter(":visible").length){var i=g.outerWidth();0===a.s.aiOuterWidths.length&&(h=d(a.s.dt.nTable).css("border-left-width"),i+="string"===typeof h?1:parseInt(h,10));a.s.aiOuterWidths.length===
a.s.dt.aoColumns.length-1&&(h=d(a.s.dt.nTable).css("border-right-width"),i+="string"===typeof h?1:parseInt(h,10));a.s.aiOuterWidths.push(i);a.s.aiInnerWidths.push(g.width());e<a.s.iLeftColumns&&(b+=i);a.s.iTableColumns-a.s.iRightColumns<=e&&(c+=i)}else a.s.aiInnerWidths.push(0),a.s.aiOuterWidths.push(0)});this.s.iLeftWidth=b;this.s.iRightWidth=c},_fnGridSetup:function(){var a=this._fnDTOverflow(),b;this.dom.body=this.s.dt.nTable;this.dom.header=this.s.dt.nTHead.parentNode;this.dom.header.parentNode.parentNode.style.position=
"relative";var c=d('<div class="DTFC_ScrollWrapper" style="position:relative; clear:both;"><div class="DTFC_LeftWrapper" style="position:absolute; top:0; left:0;"><div class="DTFC_LeftHeadWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div><div class="DTFC_LeftBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_LeftBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_LeftFootWrapper" style="position:relative; top:0; left:0; overflow:hidden;"></div></div><div class="DTFC_RightWrapper" style="position:absolute; top:0; right:0;"><div class="DTFC_RightHeadWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightHeadBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div><div class="DTFC_RightBodyWrapper" style="position:relative; top:0; left:0; overflow:hidden;"><div class="DTFC_RightBodyLiner" style="position:relative; top:0; left:0; overflow-y:scroll;"></div></div><div class="DTFC_RightFootWrapper" style="position:relative; top:0; left:0;"><div class="DTFC_RightFootBlocker DTFC_Blocker" style="position:absolute; top:0; bottom:0;"></div></div></div></div>')[0],
e=c.childNodes[0],f=c.childNodes[1];this.dom.grid.dt.parentNode.insertBefore(c,this.dom.grid.dt);c.appendChild(this.dom.grid.dt);this.dom.grid.wrapper=c;0<this.s.iLeftColumns&&(this.dom.grid.left.wrapper=e,this.dom.grid.left.head=e.childNodes[0],this.dom.grid.left.body=e.childNodes[1],this.dom.grid.left.liner=d("div.DTFC_LeftBodyLiner",c)[0],c.appendChild(e));0<this.s.iRightColumns&&(this.dom.grid.right.wrapper=f,this.dom.grid.right.head=f.childNodes[0],this.dom.grid.right.body=f.childNodes[1],this.dom.grid.right.liner=
d("div.DTFC_RightBodyLiner",c)[0],f.style.right=a.bar+"px",b=d("div.DTFC_RightHeadBlocker",c)[0],b.style.width=a.bar+"px",b.style.right=-a.bar+"px",this.dom.grid.right.headBlock=b,b=d("div.DTFC_RightFootBlocker",c)[0],b.style.width=a.bar+"px",b.style.right=-a.bar+"px",this.dom.grid.right.footBlock=b,c.appendChild(f));if(this.s.dt.nTFoot&&(this.dom.footer=this.s.dt.nTFoot.parentNode,0<this.s.iLeftColumns&&(this.dom.grid.left.foot=e.childNodes[2]),0<this.s.iRightColumns))this.dom.grid.right.foot=f.childNodes[2];
"rtl"===d(this.dom.body).css("direction")&&(d(e).css({left:"",right:0}),d(f).css({left:a.bar+"px",right:""}),d("div.DTFC_RightHeadBlocker",c).css({left:-a.bar+"px",right:""}))},_fnGridLayout:function(){var a=this,b=this.dom.grid;d(b.wrapper).width();var c=d(this.s.dt.nTable.parentNode).outerHeight(),e=d(this.s.dt.nTable.parentNode.parentNode).outerHeight(),f=this._fnDTOverflow(),g=this.s.iLeftWidth,h=this.s.iRightWidth,i=function(b,c){f.bar?a._firefoxScrollError()?34<d(b).height()&&(b.style.width=
c+f.bar+"px"):b.style.width=c+f.bar+"px":(b.style.width=c+20+"px",b.style.paddingRight="20px",b.style.boxSizing="border-box")};f.x&&(c-=f.bar);b.wrapper.style.height=e+"px";0<this.s.iLeftColumns&&(b.left.wrapper.style.width=g+"px",b.left.wrapper.style.height="1px",b.left.body.style.height=c+"px",b.left.foot&&(b.left.foot.style.top=(f.x?f.bar:0)+"px"),i(b.left.liner,g),b.left.liner.style.height=c+"px");0<this.s.iRightColumns&&(b.right.wrapper.style.width=h+"px",b.right.wrapper.style.height="1px",b.right.body.style.height=
c+"px",b.right.foot&&(b.right.foot.style.top=(f.x?f.bar:0)+"px"),i(b.right.liner,h),b.right.liner.style.height=c+"px",b.right.headBlock.style.display=f.y?"block":"none",b.right.footBlock.style.display=f.y?"block":"none")},_fnDTOverflow:function(){var a=this.s.dt.nTable,b=a.parentNode,c={x:!1,y:!1,bar:this.s.dt.oScroll.iBarWidth};a.offsetWidth>b.clientWidth&&(c.x=!0);a.offsetHeight>b.clientHeight&&(c.y=!0);return c},_fnDraw:function(a){this._fnGridLayout();this._fnCloneLeft(a);this._fnCloneRight(a);
null!==this.s.fnDrawCallback&&this.s.fnDrawCallback.call(this,this.dom.clone.left,this.dom.clone.right);d(this).trigger("draw.dtfc",{leftClone:this.dom.clone.left,rightClone:this.dom.clone.right})},_fnCloneRight:function(a){if(!(0>=this.s.iRightColumns)){var b,c=[];for(b=this.s.iTableColumns-this.s.iRightColumns;b<this.s.iTableColumns;b++)this.s.dt.aoColumns[b].bVisible&&c.push(b);this._fnClone(this.dom.clone.right,this.dom.grid.right,c,a)}},_fnCloneLeft:function(a){if(!(0>=this.s.iLeftColumns)){var b,
c=[];for(b=0;b<this.s.iLeftColumns;b++)this.s.dt.aoColumns[b].bVisible&&c.push(b);this._fnClone(this.dom.clone.left,this.dom.grid.left,c,a)}},_fnCopyLayout:function(a,b,c){for(var e=[],f=[],g=[],h=0,i=a.length;h<i;h++){var k=[];k.nTr=d(a[h].nTr).clone(c,!1)[0];for(var l=0,o=this.s.iTableColumns;l<o;l++)if(-1!==d.inArray(l,b)){var p=d.inArray(a[h][l].cell,g);-1===p?(p=d(a[h][l].cell).clone(c,!1)[0],f.push(p),g.push(a[h][l].cell),k.push({cell:p,unique:a[h][l].unique})):k.push({cell:f[p],unique:a[h][l].unique})}e.push(k)}return e},
_fnClone:function(a,b,c,e){var f=this,g,h,i,k,l,o,p,n,m,j=this.s.dt;if(e){d(a.header).remove();a.header=d(this.dom.header).clone(!0,!1)[0];a.header.className+=" DTFC_Cloned";a.header.style.width="100%";b.head.appendChild(a.header);n=this._fnCopyLayout(j.aoHeader,c,!0);k=d(">thead",a.header);k.empty();g=0;for(h=n.length;g<h;g++)k[0].appendChild(n[g].nTr);j.oApi._fnDrawHead(j,n,!0)}else{n=this._fnCopyLayout(j.aoHeader,c,!1);m=[];j.oApi._fnDetectHeader(m,d(">thead",a.header)[0]);g=0;for(h=n.length;g<
h;g++){i=0;for(k=n[g].length;i<k;i++)m[g][i].cell.className=n[g][i].cell.className,d("span.DataTables_sort_icon",m[g][i].cell).each(function(){this.className=d("span.DataTables_sort_icon",n[g][i].cell)[0].className})}}this._fnEqualiseHeights("thead",this.dom.header,a.header);"auto"==this.s.sHeightMatch&&d(">tbody>tr",f.dom.body).css("height","auto");null!==a.body&&(d(a.body).remove(),a.body=null);a.body=d(this.dom.body).clone(!0)[0];a.body.className+=" DTFC_Cloned";a.body.style.paddingBottom=j.oScroll.iBarWidth+
"px";a.body.style.marginBottom=2*j.oScroll.iBarWidth+"px";null!==a.body.getAttribute("id")&&a.body.removeAttribute("id");d(">thead>tr",a.body).empty();d(">tfoot",a.body).remove();var q=d("tbody",a.body)[0];d(q).empty();if(0<j.aiDisplay.length){h=d(">thead>tr",a.body)[0];for(p=0;p<c.length;p++)l=c[p],o=d(j.aoColumns[l].nTh).clone(!0)[0],o.innerHTML="",k=o.style,k.paddingTop="0",k.paddingBottom="0",k.borderTopWidth="0",k.borderBottomWidth="0",k.height=0,k.width=f.s.aiInnerWidths[l]+"px",h.appendChild(o);
d(">tbody>tr",f.dom.body).each(function(a){var a=f.s.dt.oFeatures.bServerSide===false?f.s.dt.aiDisplay[f.s.dt._iDisplayStart+a]:a,b=f.s.dt.aoData[a].anCells||d(this).children("td, th"),e=this.cloneNode(false);e.removeAttribute("id");e.setAttribute("data-dt-row",a);for(p=0;p<c.length;p++){l=c[p];if(b.length>0){o=d(b[l]).clone(true,true)[0];o.setAttribute("data-dt-row",a);o.setAttribute("data-dt-column",p);e.appendChild(o)}}q.appendChild(e)})}else d(">tbody>tr",f.dom.body).each(function(){o=this.cloneNode(true);
o.className=o.className+" DTFC_NoData";d("td",o).html("");q.appendChild(o)});a.body.style.width="100%";a.body.style.margin="0";a.body.style.padding="0";j.oScroller!==t&&(h=j.oScroller.dom.force,b.forcer?b.forcer.style.height=h.style.height:(b.forcer=h.cloneNode(!0),b.liner.appendChild(b.forcer)));b.liner.appendChild(a.body);this._fnEqualiseHeights("tbody",f.dom.body,a.body);if(null!==j.nTFoot){if(e){null!==a.footer&&a.footer.parentNode.removeChild(a.footer);a.footer=d(this.dom.footer).clone(!0,!0)[0];
a.footer.className+=" DTFC_Cloned";a.footer.style.width="100%";b.foot.appendChild(a.footer);n=this._fnCopyLayout(j.aoFooter,c,!0);b=d(">tfoot",a.footer);b.empty();g=0;for(h=n.length;g<h;g++)b[0].appendChild(n[g].nTr);j.oApi._fnDrawHead(j,n,!0)}else{n=this._fnCopyLayout(j.aoFooter,c,!1);b=[];j.oApi._fnDetectHeader(b,d(">tfoot",a.footer)[0]);g=0;for(h=n.length;g<h;g++){i=0;for(k=n[g].length;i<k;i++)b[g][i].cell.className=n[g][i].cell.className}}this._fnEqualiseHeights("tfoot",this.dom.footer,a.footer)}b=
j.oApi._fnGetUniqueThs(j,d(">thead",a.header)[0]);d(b).each(function(a){l=c[a];this.style.width=f.s.aiInnerWidths[l]+"px"});null!==f.s.dt.nTFoot&&(b=j.oApi._fnGetUniqueThs(j,d(">tfoot",a.footer)[0]),d(b).each(function(a){l=c[a];this.style.width=f.s.aiInnerWidths[l]+"px"}))},_fnGetTrNodes:function(a){for(var b=[],c=0,d=a.childNodes.length;c<d;c++)"TR"==a.childNodes[c].nodeName.toUpperCase()&&b.push(a.childNodes[c]);return b},_fnEqualiseHeights:function(a,b,c){if(!("none"==this.s.sHeightMatch&&"thead"!==
a&&"tfoot"!==a)){var e,f,g=b.getElementsByTagName(a)[0],c=c.getElementsByTagName(a)[0],a=d(">"+a+">tr:eq(0)",b).children(":first");a.outerHeight();a.height();for(var g=this._fnGetTrNodes(g),b=this._fnGetTrNodes(c),h=[],c=0,a=b.length;c<a;c++)e=g[c].offsetHeight,f=b[c].offsetHeight,e=f>e?f:e,"semiauto"==this.s.sHeightMatch&&(g[c]._DTTC_iHeight=e),h.push(e);c=0;for(a=b.length;c<a;c++)b[c].style.height=h[c]+"px",g[c].style.height=h[c]+"px"}},_firefoxScrollError:function(){if(u===t){var a=d("<div/>").css({position:"absolute",
top:0,left:0,height:10,width:50,overflow:"scroll"}).appendTo("body");u=a[0].clientWidth===a[0].offsetWidth&&0!==this._fnDTOverflow().bar;a.remove()}return u}});m.defaults={iLeftColumns:1,iRightColumns:0,fnDrawCallback:null,sHeightMatch:"semiauto"};m.version="3.2.1";s.Api.register("fixedColumns()",function(){return this});s.Api.register("fixedColumns().update()",function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnUpdate()})});s.Api.register("fixedColumns().relayout()",
function(){return this.iterator("table",function(a){a._oFixedColumns&&a._oFixedColumns.fnRedrawLayout()})});s.Api.register("rows().recalcHeight()",function(){return this.iterator("row",function(a,b){a._oFixedColumns&&a._oFixedColumns.fnRecalculateHeight(this.row(b).node())})});s.Api.register("fixedColumns().rowIndex()",function(a){a=d(a);return a.parents(".DTFC_Cloned").length?this.rows({page:"current"}).indexes()[a.index()]:this.row(a).index()});s.Api.register("fixedColumns().cellIndex()",function(a){a=
d(a);if(a.parents(".DTFC_Cloned").length){var b=a.parent().index(),b=this.rows({page:"current"}).indexes()[b],a=a.parents(".DTFC_LeftWrapper").length?a.index():this.columns().flatten().length-this.context[0]._oFixedColumns.s.iRightColumns+a.index();return{row:b,column:this.column.index("toData",a),columnVisible:a}}return this.cell(a).index()});d(r).on("init.dt.fixedColumns",function(a,b){if("dt"===a.namespace){var c=b.oInit.fixedColumns,e=s.defaults.fixedColumns;if(c||e)e=d.extend({},c,e),!1!==c&&
new m(b,e)}});d.fn.dataTable.FixedColumns=m;return d.fn.DataTable.FixedColumns=m});