Lines Matching defs:a

14  * This source file is free software, under either the GPL v2 license or a
67 * Notes: Allowed format is a.b.c.d.e where:
68 * a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional
124 * Notes: Array (associative) of functions which is run prior to a column of this
301 nPrevious = document.createElement( 'a' );
302 nNext = document.createElement( 'a' );
398 * Purpose: Initialise dom elements required for pagination with a list of the pages
599 * functions - they expect two inputs which they then compare and then return a priority
601 * a descending sort.
607 "string-asc": function ( a, b )
609 if ( typeof a != 'string' ) { a = ''; }
611 var x = a.toLowerCase();
616 "string-desc": function ( a, b )
618 if ( typeof a != 'string' ) { a = ''; }
620 var x = a.toLowerCase();
629 "html-asc": function ( a, b )
631 var x = a.replace( /<.*?>/g, "" ).toLowerCase();
636 "html-desc": function ( a, b )
638 var x = a.replace( /<.*?>/g, "" ).toLowerCase();
647 "date-asc": function ( a, b )
649 var x = Date.parse( a );
664 "date-desc": function ( a, b )
666 var x = Date.parse( a );
685 "numeric-asc": function ( a, b )
687 var x = (a=="-" || a==="") ? 0 : a*1;
692 "numeric-desc": function ( a, b )
694 var x = (a=="-" || a==="") ? 0 : a*1;
705 * Notes: The functions in this array are expected to parse a string to see if it is a data
706 * type that it recognises. If so then the function should return the name of the type (a
711 * Note that the input for these functions is always a string! It cannot be any other data
717 * Purpose: Check to see if a string is numeric
723 /* Allow zero length strings as a number */
738 /* Check for a valid first char (no period and allow negatives) */
770 * Purpose: Check to see if a string is actually a formatted date
786 * Purpose: Check to see if a string should be treated as an HTML string
802 * Purpose: Check a version string against this version of DataTables. Useful for plug-ins
806 * "a", "a.b" or "a.b.c"
807 * Notes: This function will only check the first three parts of a version string. It is
1039 * Purpose: Store the next unique id to be used for a new row
1053 * Purpose: Store the previous search incase we want to force a re-search
1054 * or compare the old search to a new one
1089 * Purpose: Classes to use for the striping of a table
1096 * Purpose: If restoring a table - we should restore its striping classes as well
1103 * Purpose: If restoring a table - we should restore its width
1110 * Purpose: Call this function every time a row is inserted (draw)
1236 * '<"class" and '>' - div with a class
1276 * save that has been thus far created. Returns a JSON string to be inserted into a
1309 * Purpose: Property from a given object from which to read the table data from. This can
1349 "This is caused by a JSON formatting error." );
1380 var s=(iIn+""), a=s.split(""), out="", iLen=s.length;
1388 out = a[iLen-i-1]+out;
1398 * Note: This varaible can take for form of a 1D array, in which case the value and the
1399 * displayed value in the menu are the same, or a 2D array in which case the value comes
1407 * Purpose: Counter for the draws that the table does. Also used as a tracker for
1415 * Purpose: Indicate if a redraw is being done - useful for Ajax
1592 * Purpose: Get the settings for a particular table for extern. manipulation
1609 * Purpose: Sort the table by a particular row
1623 * Purpose: Attach a sort listener to an element for a given column
1626 * int:iColumn - the column that a click on this node will sort on
1695 * Purpose: Remove a row for the table
1723 /* If there is a user callback function - call it */
1750 * Purpose: Quickly and simply clear a table
1769 * Purpose: Open a display row (append a row after the row in question)
1815 * Purpose: Close a display row
1894 * Purpose: Get the array indexes of a particular cell from it's DOM element
1897 * Inputs: node:nNode - this can either be a TR, TD or TH in the table's body, the return is
1927 * Purpose: Update a table cell or row - this method will accept either a single value to
2020 * Purpose: Show a particular column
2088 /* Remove a column from display */
2116 /* Do a redraw incase anything depending on the table columns needs it
2257 * it's a good effort without getting carried away
2278 * and will typically need a redraw after it.
2302 * DataTables object, providing a rather nice way to allow plug-in API functions. Note that
2304 * required for a particular purpose.
2309 * Purpose: Create a wrapper function for exporting an internal func to an external API func
2430 /* Reset the init display for cookie saving. We've already done a filter, and
2484 * Purpose: Copy language variables from remote object to a local one
2518 * Purpose: Add a column to the list used for the table with default values
2554 /* Add a column specific filter */
2584 * Purpose: Apply options for a column
2658 * Purpose: Add a data array to the table, creating DOM node etc
2662 * Notes: There are two basic methods for DataTables to get data to display - a JS array
2738 * Purpose: Create a new TR element (and it's TD children) for a row
2810 * Notes: This is a optimised version of _fnAddData (more or less) for reading information
2888 /* Get the title of the column - unless there is a user set one */
2980 /* If there is a header in place - then use it - otherwise it's going to get nuked... */
2983 /* We've got a thead from the DOM, so remove hidden columns and apply width to vis cols */
3002 /* We don't have a header in the DOM - so we are going to have to create one */
3093 * traversed over cell at a time in a rows x columns grid fashion, although each
3096 * already a cell in that position.
3116 /* Make a copy of the master layout array, but without the visible columns in it */
3151 /* Check to see if there is already a cell (row/colspan) covering our target
3202 /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
3304 /* Table is empty - create a row with an empty message in it */
3389 /* Call all required callback functions for the end of a draw */
3466 * Purpose: Build up the parameters in an object needed for a server-side processing request
3559 /* Protect against old returns over-writing a new one. Possible when you get
3595 /* If we need to re-order, then create a new array with the correct order and add it */
3631 * Create a temporary, empty, div which we can later on replace with what we have generated
3638 * All DataTables are wrapped in a div
3665 /* Check to see if we should append an id and/or a class name to the container */
3890 /* When xscrolling add the width and a scroller to move the header with the body */
3928 /* Use a blocker to stop scrolling from loading more data while other data is still loading */
3958 * Notes: It's a bit of a pig this function, but basically the idea to:
4035 /* Size the table as a whole */
4043 * the scrollbar - which is shouldn't. When there is a scrollbar we need to take this
4078 * a temporary variable. This is required because the column width calculation is done
4105 /* Clone the current footer and then place it into the body table as a "hidden header" */
4144 /* Sanity check that the table is of a sensible width. If not then we are going to get
4149 /* The min width depends upon if we have a vertical scrollbar visible or not */
4154 /* IE6/7 are a law unto themselves... */
4170 /* And give the user a warning that we've stopped the table getting too small */
4201 /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
4246 * Notes: You would probably want to do a redraw after calling this function!
4330 * int:iForce - optional - force a research of the master array (1) or not (undefined or 0)
4391 * Purpose: Filter the table on a per-column basis
4396 * bool:bRegex - treat search string as a regular expression or not
4427 * int:iForce - optional - force a research of the master array (1) or not (undefined or 0)
4428 * bool:bRegex - treat as a regular expression or not
4459 * We are starting a new search or the new search string is smaller
4469 /* Force a rebuild of the search array */
4534 * Purpose: Create a searchable string from a single data row
4562 /* IE and Opera appear to put an newline where there is a <br> tag - remove it */
4571 * Purpose: Build a regular expression object suitable for searching a table
4574 * bool:bRegex - treat as a regular expression or not
4636 * Notes: We always sort the master array and then apply a filter again
4665 /* If there is a sorting data type, and a fuction belonging to it, then we need to
4683 /* Create a value - key array of the current row positions such that we can use their
4691 /* Do the sort - here we want multi-column sorting based on a given data source (column)
4692 * and sorting function (from oSort) in a certain direction. It's reasonably complex to
4694 * fnLocalSorting = function(a,b){
4702 * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
4704 * Basically we have a test for each sorting column, if the data in that column is equal,
4705 * test the next column. If all columns match, then we use a numeric sort on the row
4706 * positions in the original data array to provide a stable sort.
4709 oSettings.aiDisplayMaster.sort( function ( a, b ) {
4716 _fnGetCellData( oSettings, a, iDataSort, 'sort' ),
4726 return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
4757 * Purpose: Attach a sort handler (click) to a node
4774 * This is a little bit odd I admit... I declare a temporary function inside the scope of
4781 * 'processing' display doesn't appear for a table sort. To break the js thread up a bit
4960 * Note that this is given as a feature switch since it can significantly slow down a sort
4962 * Further to this, note that this code is admitadly fairly ugly. It could be made a lot
5058 /* Add a draw callback for the pagination on first instance, to update the paging display */
5395 * Purpose: Covert the index of a visible column to the index in the data array (take account
5449 * Purpose: Take a TR element and convert it to an index in aoData
5459 * the most likely node to be asked for (a selector or event for example)
5469 /* Otherwise we are in for a slog through the whole data cache */
5530 * Purpose: Convert a CSS unit width to pixels (e.g. 2em)
5615 * Construct a 1 row table with the widest node in the data, and any user defined widths,
5723 /* Browsers need a bit of a hand when a width is assigned to any columns when
5774 * Purpose: Adjust a table's width to take account of scrolling
5848 * Purpose: Append a CSS unit (only if required) to a string
5930 * Purpose: Return the settings object for a particular table
5932 * Inputs: node:nTable - table we are using as a dataTable
6043 * Purpose: scape a string stuch that it can be used in a regular expression
6056 * Purpose: Take an array of integers (index array) and remove a target integer (value - not
6059 * Inputs: a:array int - Index array to target
6062 function _fnDeleteIndex( a, iTarget )
6066 for ( var i=0, iLen=a.length ; i<iLen ; i++ )
6068 if ( a[i] == iTarget )
6072 else if ( a[i] > iTarget )
6074 a[i]--;
6080 a.splice( iTargetIndex, 1 );
6086 * Purpose: Figure out how to reorder a display list
6177 * Purpose: Save the state of a table in a cookie such that the page can be reloaded
6241 * Purpose: Attempt to load a saved table state from a cookie
6281 /* Store the saved state so it might be accessed at any time (particualrly a plug-in */
6295 * Note that we use a 'not' for the value of the regular expression indicator to maintain
6333 * Purpose: Create a new cookie with a value to store the state of a table
6348 * a trailing slash on it. We need the cookie to be available based on the path, so we
6369 /* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies
6383 /* It's a DataTables cookie, so eval it and check the time stamp */
6408 * Purpose: Read an old cookie to get a cookie with an old table state
6439 * create a layout grid (array) of rows x columns, which contains a reference
6451 var fnShiftCol = function ( a, i, j ) {
6452 while ( typeof a[i][j] != 'undefined' ) {
6466 /* Calculate a layout array */
6545 * Purpose: Get the width of a scroll bar in this browser being used
6586 * Purpose: Apply a given function to the display child nodes of an element array (typically
6616 * Purpose: See if a property is defined on one object, if so assign it to the other object
6637 * Purpose: Get an array of data for a given row from the internal data cache
6655 * Purpose: Get the data for a given cell from the internal cache, taking into account data mapping
6686 /* If the data source is a function, then we run it and use the return */
6699 * Purpose: Set the value for a specific cell, into the internal data cache
6716 * Purpose: Return a function that can be used to get data from a source object, taking
6717 * into account the ability to use nested objects as a source
6738 /* If there is a . in the source string then the data source is in a nested object
6740 * operation, and a generalised one for when it is needed
6742 var a = mSource.split('.');
6743 if ( a.length == 2 )
6746 return data[ a[0] ][ a[1] ];
6749 else if ( a.length == 3 )
6752 return data[ a[0] ][ a[1] ][ a[2] ];
6758 for ( var i=0, iLen=a.length ; i<iLen ; i++ )
6760 data = data[ a[i] ];
6777 * Purpose: Return a function that can be used to set data from a source object, taking
6778 * into account the ability to use nested objects as a source
6797 /* Like the get, we need to get data from a nested object. Again two fast lookup
6798 * functions are provided, and a generalised one.
6800 var a = mSource.split('.');
6801 if ( a.length == 2 )
6804 data[ a[0] ][ a[1] ] = val;
6807 else if ( a.length == 3 )
6810 data[ a[0] ][ a[1] ][ a[2] ] = val;
6816 for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
6818 data = data[ a[i] ];
6820 data[ a[a.length-1] ] = val;
6927 /* Check to see if we are re-initialising a table */
6948 "the old table and create a new one, set bDestroy to true (note that a lot of "+
6955 /* If the element we are initialising has the same ID as a table which was previously
6967 /* Make a complete and independent copy of the settings object */
6989 _fnLog( oSettings, 0, "Attempted to initialise DataTables on a node which is not a "+
6997 /* Keep a reference to the 'this' instance for the table. Note that if this table is being
6998 * created with others, we retrieve a unique instance to ease API access.
7007 /* State the table's width for if a destroy is called at a later time */
7119 /* Set the DOM to use a layout suitable for jQuery UI's theming */
7138 /* Must be done after everything which can be overridden by a cookie! */
7173 /* Get the language definitions from a file */
7192 /* Create a dummy object for quick manipulation later on. */
7256 /* If not given a column array, generate one with nulls */
7296 _fnLog( oSettings, 1, 'aTargets must be an array of targets, not a '+(typeof aTargets) );
7355 /* Add a default sorting index */
7379 /* Do a first pass on the sorting classes (allows any size changes to be taken into