diff --git a/assets/dashboard/plugins/jquery-datatable/jquery.dataTables.js b/assets/dashboard/plugins/jquery-datatable/jquery.dataTables.js index 4f1d7bb..dae71d5 100644 --- a/assets/dashboard/plugins/jquery-datatable/jquery.dataTables.js +++ b/assets/dashboard/plugins/jquery-datatable/jquery.dataTables.js @@ -133,8 +133,8 @@ { return this.api(true).$( sSelector, oOpts ); }; - - + + /** * Almost identical to $ in operation, but in this case returns the data for the matched * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes @@ -187,8 +187,8 @@ { return this.api(true).rows( sSelector, oOpts ).data(); }; - - + + /** * Create a DataTables Api instance, with the currently selected tables for * the Api's context. @@ -206,8 +206,8 @@ ) : new _Api( this ); }; - - + + /** * Add a single new row or multiple rows of data to the table. Please note * that this is suitable for client-side processing only - if you are using @@ -249,20 +249,20 @@ this.fnAddData = function( data, redraw ) { var api = this.api( true ); - + /* Check if we want to add multiple rows or not */ var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ? api.rows.add( data ) : api.row.add( data ); - + if ( redraw === undefined || redraw ) { api.draw(); } - + return rows.flatten().toArray(); }; - - + + /** * This function will make DataTables recalculate the column sizes, based on the data * contained in the table and the sizes applied to the columns (in the DOM, CSS or @@ -289,7 +289,7 @@ var api = this.api( true ).columns.adjust(); var settings = api.settings()[0]; var scroll = settings.oScroll; - + if ( bRedraw === undefined || bRedraw ) { api.draw( false ); } @@ -298,8 +298,8 @@ _fnScrollDraw( settings ); } }; - - + + /** * Quickly and simply clear a table * @param {bool} [bRedraw=true] redraw the table or not @@ -317,13 +317,13 @@ this.fnClearTable = function( bRedraw ) { var api = this.api( true ).clear(); - + if ( bRedraw === undefined || bRedraw ) { api.draw(); } }; - - + + /** * The exact opposite of 'opening' a row, this function will close any rows which * are currently 'open'. @@ -352,8 +352,8 @@ { this.api( true ).row( nTr ).child.hide(); }; - - + + /** * Remove a row for the table * @param {mixed} target The index of the row from aoData to be deleted, or @@ -378,21 +378,21 @@ var rows = api.rows( target ); var settings = rows.settings()[0]; var data = settings.aoData[ rows[0][0] ]; - + rows.remove(); - + if ( callback ) { callback.call( this, settings, data ); } - + if ( redraw === undefined || redraw ) { api.draw(); } - + return data; }; - - + + /** * Restore the table to it's original state in the DOM by removing all of DataTables * enhancements, alterations to the DOM structure of the table and event listeners. @@ -411,8 +411,8 @@ { this.api( true ).destroy( remove ); }; - - + + /** * Redraw the table * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw. @@ -433,8 +433,8 @@ // into account the new data, but can hold position. this.api( true ).draw( complete ); }; - - + + /** * Filter the input based on data * @param {string} sInput String to filter the table on @@ -457,18 +457,18 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive ) { var api = this.api( true ); - + if ( iColumn === null || iColumn === undefined ) { api.search( sInput, bRegex, bSmart, bCaseInsensitive ); } else { api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive ); } - + api.draw(); }; - - + + /** * Get the data for the whole table, an individual row or an individual cell based on the * provided parameters. @@ -509,19 +509,19 @@ this.fnGetData = function( src, col ) { var api = this.api( true ); - + if ( src !== undefined ) { var type = src.nodeName ? src.nodeName.toLowerCase() : ''; - + return col !== undefined || type == 'td' || type == 'th' ? api.cell( src, col ).data() : api.row( src ).data() || null; } - + return api.data().toArray(); }; - - + + /** * Get an array of the TR nodes that are used in the table's body. Note that you will * typically want to use the '$' API method in preference to this as it is more @@ -543,13 +543,13 @@ this.fnGetNodes = function( iRow ) { var api = this.api( true ); - + return iRow !== undefined ? api.row( iRow ).node() : api.rows().nodes().flatten().toArray(); }; - - + + /** * Get the array indexes of a particular cell from it's DOM element * and column index including hidden columns @@ -582,13 +582,13 @@ { var api = this.api( true ); var nodeName = node.nodeName.toUpperCase(); - + if ( nodeName == 'TR' ) { return api.row( node ).index(); } else if ( nodeName == 'TD' || nodeName == 'TH' ) { var cell = api.cell( node ).index(); - + return [ cell.row, cell.columnVisible, @@ -597,8 +597,8 @@ } return null; }; - - + + /** * Check to see if a row is 'open' or not. * @param {node} nTr the table row to check @@ -626,8 +626,8 @@ { return this.api( true ).row( nTr ).child.isShown(); }; - - + + /** * This function will place a new row directly after a row which is currently * on display on the page, with the HTML contents that is passed into the @@ -666,8 +666,8 @@ .show() .child()[0]; }; - - + + /** * Change the pagination - provides the internal logic for pagination in a simple API * function. With this function you can have a DataTables table go to the next, @@ -687,13 +687,13 @@ this.fnPageChange = function ( mAction, bRedraw ) { var api = this.api( true ).page( mAction ); - + if ( bRedraw === undefined || bRedraw ) { api.draw(false); } }; - - + + /** * Show a particular column * @param {int} iCol The column whose display should be changed @@ -713,13 +713,13 @@ this.fnSetColumnVis = function ( iCol, bShow, bRedraw ) { var api = this.api( true ).column( iCol ).visible( bShow ); - + if ( bRedraw === undefined || bRedraw ) { api.columns.adjust().draw(); } }; - - + + /** * Get the settings for a particular table for external manipulation * @returns {object} DataTables settings object. See @@ -740,8 +740,8 @@ { return _fnSettingsFromNode( this[_ext.iApiIndex] ); }; - - + + /** * Sort the table by a particular column * @param {int} iCol the data index to sort on. Note that this will not match the @@ -761,8 +761,8 @@ { this.api( true ).order( aaSort ).draw(); }; - - + + /** * Attach a sort listener to an element for a given column * @param {node} nNode the element to attach the sort listener to @@ -783,8 +783,8 @@ { this.api( true ).order.listener( nNode, iColumn, fnCallback ); }; - - + + /** * Update a table cell or row - this method will accept either a single value to * update the cell with, an array of values with one element for each column or @@ -810,25 +810,25 @@ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction ) { var api = this.api( true ); - + if ( iColumn === undefined || iColumn === null ) { api.row( mRow ).data( mData ); } else { api.cell( mRow, iColumn ).data( mData ); } - + if ( bAction === undefined || bAction ) { api.columns.adjust(); } - + if ( bRedraw === undefined || bRedraw ) { api.draw(); } return 0; }; - - + + /** * Provide a common method for plug-ins to check the version of DataTables being used, in order * to ensure compatibility. @@ -847,7 +847,7 @@ * } ); */ this.fnVersionCheck = _ext.fnVersionCheck; - + var _that = this; var emptyInit = options === undefined; @@ -880,40 +880,40 @@ var bInitHandedOff = false; var defaults = DataTable.defaults; var $this = $(this); - - + + /* Sanity check */ if ( this.nodeName.toLowerCase() != 'table' ) { _fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 ); return; } - + /* Backwards compatibility for the defaults */ _fnCompatOpts( defaults ); _fnCompatCols( defaults.column ); - + /* Convert the camel-case defaults to Hungarian */ _fnCamelToHungarian( defaults, defaults, true ); _fnCamelToHungarian( defaults.column, defaults.column, true ); - + /* Setting up the initialisation object */ _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) ); - - - + + + /* Check to see if we are re-initialising a table */ var allSettings = DataTable.settings; for ( i=0, iLen=allSettings.length ; i').appendTo(this); } oSettings.nTHead = thead[0]; - + var tbody = $this.children('tbody'); if ( tbody.length === 0 ) { tbody = $('').appendTo(this); } oSettings.nTBody = tbody[0]; - + var tfoot = $this.children('tfoot'); if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) { @@ -1299,7 +1299,7 @@ // a tfoot element for the caption element to be appended to tfoot = $('').appendTo(this); } - + if ( tfoot.length === 0 || tfoot.children().length === 0 ) { $this.addClass( oClasses.sNoFooter ); } @@ -1307,7 +1307,7 @@ oSettings.nTFoot = tfoot[0]; _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot ); } - + /* Check if there is data passing into the constructor */ if ( oInit.aaData ) { @@ -1324,13 +1324,13 @@ */ _fnAddTr( oSettings, $(oSettings.nTBody).children('tr') ); } - + /* Copy the data index array */ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); - + /* Initialisation complete - table can be drawn */ oSettings.bInitialised = true; - + /* Check if we need to initialise the table (it might not have been handed off to the * language processor) */ @@ -1343,7 +1343,7 @@ return this; }; - + /* * It is useful to have variables which are scoped locally so only the * DataTables functions can access them and they don't leak into global space. @@ -1352,28 +1352,28 @@ * by DataTables as private variables here. This also ensures that there is no * clashing of variable names and that they can easily referenced for reuse. */ - - + + // Defined else where // _selector_run // _selector_opts // _selector_first // _selector_row_indexes - + var _ext; // DataTable.ext var _Api; // DataTable.Api var _api_register; // DataTable.Api.register var _api_registerPlural; // DataTable.Api.registerPlural - + var _re_dic = {}; var _re_new_lines = /[\r\n]/g; var _re_html = /<.*?>/g; var _re_date_start = /^[\w\+\-]/; var _re_date_end = /[\w\+\-]$/; - + // Escape regular expression special characters var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' ); - + // http://en.wikipedia.org/wiki/Foreign_exchange_market // - \u20BD - Russian ruble. // - \u20a9 - South Korean Won @@ -1385,18 +1385,18 @@ // - \u2009 is thin space and \u202F is narrow no-break space, both used in many // standards as thousands separators. var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi; - - + + var _empty = function ( d ) { return !d || d === true || d === '-' ? true : false; }; - - + + var _intVal = function ( s ) { var integer = parseInt( s, 10 ); return !isNaN(integer) && isFinite(s) ? integer : null; }; - + // Convert from a formatted number with characters other than `.` as the // decimal place, to a Javascript number var _numToDecimal = function ( num, decimalPoint ) { @@ -1408,41 +1408,41 @@ num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) : num; }; - - + + var _isNumber = function ( d, decimalPoint, formatted ) { var strType = typeof d === 'string'; - + // If empty return immediately so there must be a number if it is a // formatted string (this stops the string "k", or "kr", etc being detected // as a formatted number for currency if ( _empty( d ) ) { return true; } - + if ( decimalPoint && strType ) { d = _numToDecimal( d, decimalPoint ); } - + if ( formatted && strType ) { d = d.replace( _re_formatted_numeric, '' ); } - + return !isNaN( parseFloat(d) ) && isFinite( d ); }; - - + + // A string without HTML in it can be considered to be HTML still var _isHtml = function ( d ) { return _empty( d ) || typeof d === 'string'; }; - - + + var _htmlNumeric = function ( d, decimalPoint, formatted ) { if ( _empty( d ) ) { return true; } - + var html = _isHtml( d ); return ! html ? null : @@ -1450,12 +1450,12 @@ true : null; }; - - + + var _pluck = function ( a, prop, prop2 ) { var out = []; var i=0, ien=a.length; - + // Could have the test in the loop for slightly smaller code, but speed // is essential here if ( prop2 !== undefined ) { @@ -1472,18 +1472,18 @@ } } } - + return out; }; - - + + // Basically the same as _pluck, but rather than looping over `a` we use `order` // as the indexes to pick from `a` var _pluck_order = function ( a, order, prop, prop2 ) { var out = []; var i=0, ien=order.length; - + // Could have the test in the loop for slightly smaller code, but speed // is essential here if ( prop2 !== undefined ) { @@ -1498,16 +1498,16 @@ out.push( a[ order[i] ][ prop ] ); } } - + return out; }; - - + + var _range = function ( len, start ) { var out = []; var end; - + if ( start === undefined ) { start = 0; end = len; @@ -1516,34 +1516,34 @@ end = start; start = len; } - + for ( var i=start ; i') .css( { @@ -1874,10 +1874,10 @@ ) ) .appendTo( 'body' ); - + var outer = n.children(); var inner = outer.children(); - + // Numbers below, in order, are: // inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth // @@ -1887,30 +1887,30 @@ // Evergreen Windows: 83 83 100 83 // Evergreen Mac with scrollbars: 85 85 100 85 // Evergreen Mac without scrollbars: 100 100 100 100 - + // Get scrollbar width browser.barWidth = outer[0].offsetWidth - outer[0].clientWidth; - + // IE6/7 will oversize a width 100% element inside a scrolling element, to // include the width of the scrollbar, while other browsers ensure the inner // element is contained without forcing scrolling browser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100; - + // In rtl text layout, some browsers (most, but not all) will place the // scrollbar on the left, rather than the right. browser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1; - + // IE8- don't provide height and width for getBoundingClientRect browser.bBounding = n[0].getBoundingClientRect().width ? true : false; - + n.remove(); } - + $.extend( settings.oBrowser, DataTable.__browser ); settings.oScroll.iBarWidth = DataTable.__browser.barWidth; } - - + + /** * Array.prototype reduce[Right] method, used for browsers which don't support * JS 1.6. Done this way to reduce code size, since we iterate either way @@ -1923,28 +1923,28 @@ i = start, value, isSet = false; - + if ( init !== undefined ) { value = init; isSet = true; } - + while ( i !== end ) { if ( ! that.hasOwnProperty(i) ) { continue; } - + value = isSet ? fn( value, that[i], i, that ) : that[i]; - + isSet = true; i += inc; } - + return value; } - + /** * Add a column to the list used for the table with default values * @param {object} oSettings dataTables settings object @@ -1964,18 +1964,18 @@ idx: iCol } ); oSettings.aoColumns.push( oCol ); - + // Add search object for column specific search. Note that the `searchCols[ iCol ]` // passed into extend can be undefined. This allows the user to give a default // with only some of the parameters defined, and also not give a default var searchCols = oSettings.aoPreSearchCols; searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] ); - + // Use the default column options function to initialise classes etc _fnColumnOptions( oSettings, iCol, $(nTh).data() ); } - - + + /** * Apply options for a column * @param {object} oSettings dataTables settings object @@ -1988,50 +1988,50 @@ var oCol = oSettings.aoColumns[ iCol ]; var oClasses = oSettings.oClasses; var th = $(oCol.nTh); - + // Try to get width information from the DOM. We can't get it from CSS // as we'd need to parse the CSS stylesheet. `width` option can override if ( ! oCol.sWidthOrig ) { // Width attribute oCol.sWidthOrig = th.attr('width') || null; - + // Style attribute var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/); if ( t ) { oCol.sWidthOrig = t[1]; } } - + /* User specified column options */ if ( oOptions !== undefined && oOptions !== null ) { // Backwards compatibility _fnCompatCols( oOptions ); - + // Map camel case parameters to their Hungarian counterparts _fnCamelToHungarian( DataTable.defaults.column, oOptions ); - + /* Backwards compatibility for mDataProp */ if ( oOptions.mDataProp !== undefined && !oOptions.mData ) { oOptions.mData = oOptions.mDataProp; } - + if ( oOptions.sType ) { oCol._sManualType = oOptions.sType; } - + // `class` is a reserved word in Javascript, so we need to provide // the ability to use a valid name for the camel case input if ( oOptions.className && ! oOptions.sClass ) { oOptions.sClass = oOptions.className; } - + $.extend( oCol, oOptions ); _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" ); - + /* iDataSort to be applied (backwards compatibility), but aDataSort will take * priority if defined */ @@ -2041,12 +2041,12 @@ } _fnMap( oCol, oOptions, "aDataSort" ); } - + /* Cache the data get and set functions for speed */ var mDataSrc = oCol.mData; var mData = _fnGetObjectDataFn( mDataSrc ); var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null; - + var attrTest = function( src ) { return typeof src === 'string' && src.indexOf('@') !== -1; }; @@ -2054,10 +2054,10 @@ attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter) ); oCol._setter = null; - + oCol.fnGetData = function (rowData, type, meta) { var innerData = mData( rowData, type, undefined, meta ); - + return mRender && type ? mRender( innerData, type, rowData, meta ) : innerData; @@ -2065,20 +2065,20 @@ oCol.fnSetData = function ( rowData, val, meta ) { return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta ); }; - + // Indicate if DataTables should read DOM data as an object or array // Used in _fnGetRowElements if ( typeof mDataSrc !== 'number' ) { oSettings._rowReadObject = true; } - + /* Feature sorting overrides column specific when off */ if ( !oSettings.oFeatures.bSort ) { oCol.bSortable = false; th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called } - + /* Check that the class assignment is correct for sorting */ var bAsc = $.inArray('asc', oCol.asSorting) !== -1; var bDesc = $.inArray('desc', oCol.asSorting) !== -1; @@ -2103,8 +2103,8 @@ oCol.sSortingClassJUI = oClasses.sSortJUI; } } - - + + /** * Adjust the table column widths for new data. Note: you would probably want to * do a redraw after calling this function! @@ -2117,24 +2117,24 @@ if ( settings.oFeatures.bAutoWidth !== false ) { var columns = settings.aoColumns; - + _fnCalculateColumnWidths( settings ); for ( var i=0 , iLen=columns.length ; i