1.1 --- a/static/dataTables/extras/FixedHeader/index.html Mon Aug 16 14:55:21 2010 +0200
1.2 +++ b/static/dataTables/extras/FixedHeader/index.html Fri Aug 20 17:39:19 2010 +0200
1.3 @@ -465,7 +465,7 @@
1.4 <h1>Initialisation code</h1>
1.5 <pre>$(document).ready( function () {
1.6 var oTable = $('#example').dataTable();
1.7 - $.fn.dataTableExt.FixedHeader( oTable );
1.8 + new FixedHeader( oTable );
1.9 } );</pre>
1.10
1.11 <h1>Examples</h1>
2.1 --- a/static/dataTables/extras/FixedHeader/js/FixedHeader.js Mon Aug 16 14:55:21 2010 +0200
2.2 +++ b/static/dataTables/extras/FixedHeader/js/FixedHeader.js Fri Aug 20 17:39:19 2010 +0200
2.3 @@ -1,6 +1,6 @@
2.4 /*
2.5 * File: FixedHeader.js
2.6 - * Version: 2.0.0
2.7 + * Version: 2.0.3
2.8 * Description: "Fix" a header at the top of the table, so it scrolls with the table
2.9 * Author: Allan Jardine (www.sprymedia.co.uk)
2.10 * Created: Wed 16 Sep 2009 19:46:30 BST
2.11 @@ -117,7 +117,8 @@
2.12 /* DataTables specific stuff */
2.13 if ( typeof oTable.fnSettings == 'function' )
2.14 {
2.15 - if ( oTable.fnVersionCheck( '1.6.0' ) !== true )
2.16 + if ( typeof oTable.fnVersionCheck == 'functon' &&
2.17 + oTable.fnVersionCheck( '1.6.0' ) !== true )
2.18 {
2.19 alert( "FixedHeader 2 required DataTables 1.6.0 or later. "+
2.20 "Please upgrade your DataTables installation" );
2.21 @@ -125,6 +126,13 @@
2.22 }
2.23
2.24 var oDtSettings = oTable.fnSettings();
2.25 +
2.26 + if ( oDtSettings.oScroll.sX != "" || oDtSettings.oScroll.sY != "" )
2.27 + {
2.28 + alert( "FixedHeader 2 is not supported with DataTables' scrolling mode at this time" );
2.29 + return;
2.30 + }
2.31 +
2.32 s.nTable = oDtSettings.nTable;
2.33 oDtSettings.aoDrawCallback.push( {
2.34 "fn": function () {
2.35 @@ -301,18 +309,41 @@
2.36 s = this.fnGetSettings(),
2.37 m = s.oMes,
2.38 jqTable = jQuery(s.nTable),
2.39 - oOffset = jqTable.offset();
2.40 + oOffset = jqTable.offset(),
2.41 + iParentScrollTop = this._fnSumScroll( s.nTable.parentNode, 'scrollTop' ),
2.42 + iParentScrollLeft = this._fnSumScroll( s.nTable.parentNode, 'scrollLeft' );
2.43
2.44 m.iTableWidth = jqTable.outerWidth();
2.45 m.iTableHeight = jqTable.outerHeight();
2.46 - m.iTableLeft = oOffset.left;
2.47 - m.iTableTop = oOffset.top;
2.48 + m.iTableLeft = oOffset.left + s.nTable.parentNode.scrollLeft;
2.49 + m.iTableTop = oOffset.top + iParentScrollTop;
2.50 m.iTableRight = m.iTableLeft + m.iTableWidth;
2.51 m.iTableRight = FixedHeader.oDoc.iWidth - m.iTableLeft - m.iTableWidth;
2.52 m.iTableBottom = FixedHeader.oDoc.iHeight - m.iTableTop - m.iTableHeight;
2.53 },
2.54
2.55 /*
2.56 + * Function: _fnSumScroll
2.57 + * Purpose: Sum node parameters all the way to the top
2.58 + * Returns: int: sum
2.59 + * Inputs: node:n - node to consider
2.60 + * string:side - scrollTop or scrollLeft
2.61 + */
2.62 + _fnSumScroll: function ( n, side )
2.63 + {
2.64 + var i = n[side];
2.65 + while ( n = n.parentNode )
2.66 + {
2.67 + if ( n.nodeName != 'HTML' && n.nodeName != 'BODY' )
2.68 + {
2.69 + break;
2.70 + }
2.71 + i = n[side];
2.72 + }
2.73 + return i;
2.74 + },
2.75 +
2.76 + /*
2.77 * Function: _fnUpdatePositions
2.78 * Purpose: Loop over the fixed elements for this table and update their positions
2.79 * Returns: -
2.80 @@ -615,13 +646,6 @@
2.81 jQuery("thead:eq(0)>tr td", s.nTable).each( function (i) {
2.82 jQuery("thead:eq(0)>tr th:eq("+i+")", nTable)[0].style.width( jQuery(this).width() );
2.83 } );
2.84 -
2.85 - /* Add an event handler to update the display when sorting occurs - note that the clone above
2.86 - * will copy the sorting function from the main table
2.87 - */
2.88 - jQuery('thead th', nTable).click( function () {
2.89 - that._fnCloneThead( oCache ).call(that);
2.90 - } );
2.91 },
2.92
2.93 /*
2.94 @@ -668,7 +692,7 @@
2.95 {
2.96 var s = this.fnGetSettings();
2.97 var nTable = oCache.nNode;
2.98 - var iCols = jQuery('tbody tr:eq(0) td', this.nTable).length;
2.99 + var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length;
2.100
2.101 /* Remove any children the cloned table has */
2.102 while ( nTable.childNodes.length > 0 )
2.103 @@ -707,7 +731,7 @@
2.104 {
2.105 var s = this.fnGetSettings();
2.106 var nTable = oCache.nNode;
2.107 - var iCols = jQuery('tbody tr:eq(0) td', this.nTable).length;
2.108 + var iCols = jQuery('tbody tr:eq(0) td', s.nTable).length;
2.109
2.110 /* Remove any children the cloned table has */
2.111 while ( nTable.childNodes.length > 0 )
3.1 --- a/static/dataTables/extras/FixedHeader/js/FixedHeader.min.js Mon Aug 16 14:55:21 2010 +0200
3.2 +++ b/static/dataTables/extras/FixedHeader/js/FixedHeader.min.js Fri Aug 20 17:39:19 2010 +0200
3.3 @@ -1,6 +1,6 @@
3.4 /*
3.5 * File: FixedHeader.min.js
3.6 - * Version: 2.0.0
3.7 + * Version: 2.0.3
3.8 * Author: Allan Jardine (www.sprymedia.co.uk)
3.9 *
3.10 * Copyright 2009-2010 Allan Jardine, all rights reserved.
3.11 @@ -16,8 +16,9 @@
3.12 return}var c=this;var d={aoCache:[],oSides:{top:true,bottom:false,left:false,right:false},oZIndexes:{top:104,bottom:103,left:102,right:101},oMes:{iTableWidth:0,iTableHeight:0,iTableLeft:0,iTableRight:0,iTableTop:0,iTableBottom:0},nTable:null,bUseAbsPos:false};
3.13 this.fnGetSettings=function(){return d};this.fnUpdate=function(){this._fnUpdateClones();
3.14 this._fnUpdatePositions()};this.fnInit(b,a)};FixedHeader.prototype={fnInit:function(b,a){var c=this.fnGetSettings();
3.15 -var d=this;this.fnInitSettings(c,a);if(typeof b.fnSettings=="function"){if(b.fnVersionCheck("1.6.0")!==true){alert("FixedHeader 2 required DataTables 1.6.0 or later. Please upgrade your DataTables installation");
3.16 -return}var e=b.fnSettings();c.nTable=e.nTable;e.aoDrawCallback.push({fn:function(){FixedHeader.fnMeasure();
3.17 +var d=this;this.fnInitSettings(c,a);if(typeof b.fnSettings=="function"){if(typeof b.fnVersionCheck=="functon"&&b.fnVersionCheck("1.6.0")!==true){alert("FixedHeader 2 required DataTables 1.6.0 or later. Please upgrade your DataTables installation");
3.18 +return}var e=b.fnSettings();if(e.oScroll.sX!=""||e.oScroll.sY!=""){alert("FixedHeader 2 is not supported with DataTables' scrolling mode at this time");
3.19 +return}c.nTable=e.nTable;e.aoDrawCallback.push({fn:function(){FixedHeader.fnMeasure();
3.20 d._fnUpdateClones.call(d);d._fnUpdatePositions.call(d)},sName:"FixedHeader"})}else{c.nTable=b
3.21 }c.bUseAbsPos=(jQuery.browser.msie&&(jQuery.browser.version=="6.0"||jQuery.browser.version=="7.0"));
3.22 if(c.oSides.top){c.aoCache.push(d._fnCloneTable("fixedHeader","FixedHeader_Header",d._fnCloneThead))
3.23 @@ -36,11 +37,13 @@
3.24 c.className+=" FixedHeader_Cloned "+f+" "+e;if(f=="fixedHeader"){c.style.zIndex=b.oZIndexes.top
3.25 }if(f=="fixedFooter"){c.style.zIndex=b.oZIndexes.bottom}if(f=="fixedLeft"){c.style.zIndex=b.oZIndexes.left
3.26 }else{if(f=="fixedRight"){c.style.zIndex=b.oZIndexes.right}}c.appendChild(a);document.body.appendChild(c);
3.27 -return{nNode:a,nWrapper:c,sType:f,sPosition:"",sTop:"",sLeft:"",fnClone:d}},_fnMeasure:function(){var d=this.fnGetSettings(),a=d.oMes,c=jQuery(d.nTable),b=c.offset();
3.28 -a.iTableWidth=c.outerWidth();a.iTableHeight=c.outerHeight();a.iTableLeft=b.left;a.iTableTop=b.top;
3.29 -a.iTableRight=a.iTableLeft+a.iTableWidth;a.iTableRight=FixedHeader.oDoc.iWidth-a.iTableLeft-a.iTableWidth;
3.30 -a.iTableBottom=FixedHeader.oDoc.iHeight-a.iTableTop-a.iTableHeight},_fnUpdatePositions:function(){var c=this.fnGetSettings();
3.31 -this._fnMeasure();for(var b=0,a=c.aoCache.length;b<a;b++){if(c.aoCache[b].sType=="fixedHeader"){this._fnScrollFixedHeader(c.aoCache[b])
3.32 +return{nNode:a,nWrapper:c,sType:f,sPosition:"",sTop:"",sLeft:"",fnClone:d}},_fnMeasure:function(){var d=this.fnGetSettings(),a=d.oMes,c=jQuery(d.nTable),b=c.offset(),f=this._fnSumScroll(d.nTable.parentNode,"scrollTop"),e=this._fnSumScroll(d.nTable.parentNode,"scrollLeft");
3.33 +a.iTableWidth=c.outerWidth();a.iTableHeight=c.outerHeight();a.iTableLeft=b.left+d.nTable.parentNode.scrollLeft;
3.34 +a.iTableTop=b.top+f;a.iTableRight=a.iTableLeft+a.iTableWidth;a.iTableRight=FixedHeader.oDoc.iWidth-a.iTableLeft-a.iTableWidth;
3.35 +a.iTableBottom=FixedHeader.oDoc.iHeight-a.iTableTop-a.iTableHeight},_fnSumScroll:function(c,b){var a=c[b];
3.36 +while(c=c.parentNode){if(c.nodeName!="HTML"&&c.nodeName!="BODY"){break}a=c[b]}return a
3.37 +},_fnUpdatePositions:function(){var c=this.fnGetSettings();this._fnMeasure();for(var b=0,a=c.aoCache.length;
3.38 +b<a;b++){if(c.aoCache[b].sType=="fixedHeader"){this._fnScrollFixedHeader(c.aoCache[b])
3.39 }else{if(c.aoCache[b].sType=="fixedFooter"){this._fnScrollFixedFooter(c.aoCache[b])
3.40 }else{if(c.aoCache[b].sType=="fixedLeft"){this._fnScrollHorizontalLeft(c.aoCache[b])
3.41 }else{this._fnScrollHorizontalRight(c.aoCache[b])}}}}},_fnUpdateClones:function(){var c=this.fnGetSettings();
3.42 @@ -82,17 +85,17 @@
3.43 while(a.childNodes.length>0){jQuery("thead th",a).unbind("click");a.removeChild(a.childNodes[0])
3.44 }var b=jQuery("thead",c.nTable).clone(true)[0];a.appendChild(b);jQuery("thead:eq(0)>tr th",c.nTable).each(function(e){jQuery("thead:eq(0)>tr th:eq("+e+")",a).width(jQuery(this).width())
3.45 });jQuery("thead:eq(0)>tr td",c.nTable).each(function(e){jQuery("thead:eq(0)>tr th:eq("+e+")",a)[0].style.width(jQuery(this).width())
3.46 -});jQuery("thead th",a).click(function(){that._fnCloneThead(d).call(that)})},_fnCloneTfoot:function(d){var c=this.fnGetSettings();
3.47 -var a=d.nNode;d.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px";while(a.childNodes.length>0){a.removeChild(a.childNodes[0])
3.48 -}var b=jQuery("tfoot",c.nTable).clone(true)[0];a.appendChild(b);jQuery("tfoot:eq(0)>tr th",c.nTable).each(function(e){jQuery("tfoot:eq(0)>tr th:eq("+e+")",a).width(jQuery(this).width())
3.49 +})},_fnCloneTfoot:function(d){var c=this.fnGetSettings();var a=d.nNode;d.nWrapper.style.width=jQuery(c.nTable).outerWidth()+"px";
3.50 +while(a.childNodes.length>0){a.removeChild(a.childNodes[0])}var b=jQuery("tfoot",c.nTable).clone(true)[0];
3.51 +a.appendChild(b);jQuery("tfoot:eq(0)>tr th",c.nTable).each(function(e){jQuery("tfoot:eq(0)>tr th:eq("+e+")",a).width(jQuery(this).width())
3.52 });jQuery("tfoot:eq(0)>tr td",c.nTable).each(function(e){jQuery("tfoot:eq(0)>tr th:eq("+e+")",a)[0].style.width(jQuery(this).width())
3.53 -})},_fnCloneTLeft:function(e){var b=this.fnGetSettings();var a=e.nNode;var d=jQuery("tbody tr:eq(0) td",this.nTable).length;
3.54 +})},_fnCloneTLeft:function(e){var b=this.fnGetSettings();var a=e.nNode;var d=jQuery("tbody tr:eq(0) td",b.nTable).length;
3.55 while(a.childNodes.length>0){a.removeChild(a.childNodes[0])}a.appendChild(jQuery("thead",b.nTable).clone(true)[0]);
3.56 a.appendChild(jQuery("tbody",b.nTable).clone(true)[0]);a.appendChild(jQuery("tfoot",b.nTable).clone(true)[0]);
3.57 jQuery("thead tr th:gt(0)",a).remove();jQuery("tbody tr td:not(:nth-child("+d+"n-"+(d-1)+"))",a).remove();
3.58 jQuery("tfoot tr th:gt(0)",a).remove();var c=jQuery("thead tr th:eq(0)",b.nTable).outerWidth();
3.59 a.style.width=c+"px";e.nWrapper.style.width=c+"px"},_fnCloneTRight:function(e){var b=this.fnGetSettings();
3.60 -var a=e.nNode;var d=jQuery("tbody tr:eq(0) td",this.nTable).length;while(a.childNodes.length>0){a.removeChild(a.childNodes[0])
3.61 +var a=e.nNode;var d=jQuery("tbody tr:eq(0) td",b.nTable).length;while(a.childNodes.length>0){a.removeChild(a.childNodes[0])
3.62 }a.appendChild(jQuery("thead",b.nTable).clone(true)[0]);a.appendChild(jQuery("tbody",b.nTable).clone(true)[0]);
3.63 a.appendChild(jQuery("tfoot",b.nTable).clone(true)[0]);jQuery("thead tr th:not(:nth-child("+d+"n))",a).remove();
3.64 jQuery("tbody tr td:not(:nth-child("+d+"n))",a).remove();jQuery("tfoot tr th:not(:nth-child("+d+"n))",a).remove();
4.1 Binary file static/dataTables/extras/FixedHeader/js/FixedHeader.min.js.gz has changed
5.1 --- a/static/dataTables/extras/KeyTable/datatable.html Mon Aug 16 14:55:21 2010 +0200
5.2 +++ b/static/dataTables/extras/KeyTable/datatable.html Fri Aug 20 17:39:19 2010 +0200
5.3 @@ -480,6 +480,7 @@
5.4 <li><a href="editing.html">Editing a table</a></li>
5.5 <li><a href="form.html">Integration with an HTML form</a></li>
5.6 <li><a href="datatable.html">Integration with DataTables</a></li>
5.7 + <li><a href="datatable_scrolling.html">Using KeyTable with scrolling in DataTables</a></li>
5.8 </ul>
5.9
5.10
6.1 --- a/static/dataTables/extras/KeyTable/editing.html Mon Aug 16 14:55:21 2010 +0200
6.2 +++ b/static/dataTables/extras/KeyTable/editing.html Fri Aug 20 17:39:19 2010 +0200
6.3 @@ -519,6 +519,7 @@
6.4 <li><a href="editing.html">Editing a table</a></li>
6.5 <li><a href="form.html">Integration with an HTML form</a></li>
6.6 <li><a href="datatable.html">Integration with DataTables</a></li>
6.7 + <li><a href="datatable_scrolling.html">Using KeyTable with scrolling in DataTables</a></li>
6.8 </ul>
6.9
6.10
7.1 --- a/static/dataTables/extras/KeyTable/form.html Mon Aug 16 14:55:21 2010 +0200
7.2 +++ b/static/dataTables/extras/KeyTable/form.html Fri Aug 20 17:39:19 2010 +0200
7.3 @@ -120,6 +120,7 @@
7.4 <li><a href="editing.html">Editing a table</a></li>
7.5 <li><a href="form.html">Integration with an HTML form</a></li>
7.6 <li><a href="datatable.html">Integration with DataTables</a></li>
7.7 + <li><a href="datatable_scrolling.html">Using KeyTable with scrolling in DataTables</a></li>
7.8 </ul>
7.9
7.10 <div id="footer" style="text-align:center;">
8.1 --- a/static/dataTables/extras/KeyTable/index.html Mon Aug 16 14:55:21 2010 +0200
8.2 +++ b/static/dataTables/extras/KeyTable/index.html Fri Aug 20 17:39:19 2010 +0200
8.3 @@ -582,6 +582,7 @@
8.4 <li><a href="editing.html">Editing a table</a></li>
8.5 <li><a href="form.html">Integration with an HTML form</a></li>
8.6 <li><a href="datatable.html">Integration with DataTables</a></li>
8.7 + <li><a href="datatable_scrolling.html">Using KeyTable with scrolling in DataTables</a></li>
8.8 </ul>
8.9
8.10 <div id="footer" style="text-align:center;">
9.1 --- a/static/dataTables/extras/KeyTable/js/KeyTable.js Mon Aug 16 14:55:21 2010 +0200
9.2 +++ b/static/dataTables/extras/KeyTable/js/KeyTable.js Fri Aug 20 17:39:19 2010 +0200
9.3 @@ -1,11 +1,11 @@
9.4 /*
9.5 * File: KeyTable.js
9.6 - * Version: 1.1.1
9.7 - * CVS: jQueryIdjQuery
9.8 + * Version: 1.1.6
9.9 + * CVS: $Idj$
9.10 * Description: Keyboard navigation for HTML tables
9.11 * Author: Allan Jardine (www.sprymedia.co.uk)
9.12 * Created: Fri Mar 13 21:24:02 GMT 2009
9.13 - * Modified: jQueryDatejQuery by jQueryAuthorjQuery
9.14 + * Modified: $Date$ by $Author$
9.15 * Language: Javascript
9.16 * License: GPL v2 or BSD 3 point style
9.17 * Project: Just a little bit of fun :-)
9.18 @@ -81,6 +81,26 @@
9.19 };
9.20
9.21
9.22 + /*
9.23 + * Function: fnSetPosition
9.24 + * Purpose: Set the position of the focused cell
9.25 + * Returns: -
9.26 + * Inputs: int:x - x coordinate
9.27 + * int:y - y coordinate
9.28 + * Notes: Thanks to Rohan Daxini for the basis of this function
9.29 + */
9.30 + this.fnSetPosition = function( x, y )
9.31 + {
9.32 + if ( typeof x == 'object' && x.nodeName )
9.33 + {
9.34 + _fnSetFocus( x );
9.35 + }
9.36 + else
9.37 + {
9.38 + _fnSetFocus( _fnCellFromCoords(x, y) );
9.39 + }
9.40 + };
9.41 +
9.42
9.43 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
9.44 * Private parameters
9.45 @@ -391,9 +411,10 @@
9.46 jQuery(nTarget).addClass( _sFocusClass );
9.47
9.48 /* If it's a DataTable then we need to jump the paging to the relevant page */
9.49 + var oSettings;
9.50 if ( _oDatatable )
9.51 {
9.52 - var oSettings = _oDatatable.fnSettings();
9.53 + oSettings = _oDatatable.fnSettings();
9.54 var iRow = _fnFindDtCell( nTarget )[1];
9.55 var bKeyCaptureCache = _bKeyCapture;
9.56
9.57 @@ -442,16 +463,17 @@
9.58 _iOldX = aNewPos[0];
9.59 _iOldY = aNewPos[1];
9.60
9.61 + var iViewportHeight, iViewportWidth, iScrollTop, iScrollLeft, iHeight, iWidth, aiPos;
9.62 if ( bAutoScroll )
9.63 {
9.64 /* Scroll the viewport such that the new cell is fully visible in the rendered window */
9.65 - var iViewportHeight = document.documentElement.clientHeight;
9.66 - var iViewportWidth = document.documentElement.clientWidth;
9.67 - var iScrollTop = document.body.scrollTop || document.documentElement.scrollTop;
9.68 - var iScrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
9.69 - var iHeight = nTarget.offsetHeight;
9.70 - var iWidth = nTarget.offsetWidth;
9.71 - var aiPos = _fnGetPos( nTarget );
9.72 + iViewportHeight = document.documentElement.clientHeight;
9.73 + iViewportWidth = document.documentElement.clientWidth;
9.74 + iScrollTop = document.body.scrollTop || document.documentElement.scrollTop;
9.75 + iScrollLeft = document.body.scrollLeft || document.documentElement.scrollLeft;
9.76 + iHeight = nTarget.offsetHeight;
9.77 + iWidth = nTarget.offsetWidth;
9.78 + aiPos = _fnGetPos( nTarget );
9.79
9.80 /* Correct viewport positioning for vertical scrolling */
9.81 if ( aiPos[1]+iHeight > iScrollTop+iViewportHeight )
9.82 @@ -478,6 +500,39 @@
9.83 }
9.84 }
9.85
9.86 + /* Take account of scrolling in DataTables 1.7 */
9.87 + if ( _oDatatable && typeof oSettings.oScroll != 'undefined' &&
9.88 + (oSettings.oScroll.sX !== "" || oSettings.oScroll.xY !== "") )
9.89 + {
9.90 + var dtScrollBody = oSettings.nTable.parentNode;
9.91 + iViewportHeight = dtScrollBody.clientHeight;
9.92 + iViewportWidth = dtScrollBody.clientWidth;
9.93 + iScrollTop = dtScrollBody.scrollTop;
9.94 + iScrollLeft = dtScrollBody.scrollLeft;
9.95 + iHeight = nTarget.offsetHeight;
9.96 + iWidth = nTarget.offsetWidth;
9.97 +
9.98 + /* Correct for vertical scrolling */
9.99 + if ( nTarget.offsetTop + iHeight > iViewportHeight+iScrollTop )
9.100 + {
9.101 + dtScrollBody.scrollTop = (nTarget.offsetTop + iHeight) - iViewportHeight;
9.102 + }
9.103 + else if ( nTarget.offsetTop < iScrollTop )
9.104 + {
9.105 + dtScrollBody.scrollTop = nTarget.offsetTop;
9.106 + }
9.107 +
9.108 + /* Correct for horizontal scrolling */
9.109 + if ( nTarget.offsetLeft + iWidth > iViewportWidth+iScrollLeft )
9.110 + {
9.111 + dtScrollBody.scrollLeft = (nTarget.offsetLeft + iWidth) - iViewportWidth;
9.112 + }
9.113 + else if ( nTarget.offsetLeft < iScrollLeft )
9.114 + {
9.115 + dtScrollBody.scrollLeft = nTarget.offsetLeft;
9.116 + }
9.117 + }
9.118 +
9.119 /* Fire of the focus event if there is one */
9.120 _fnEventFire( "focus", _iOldX, _iOldY );
9.121 }
9.122 @@ -555,9 +610,10 @@
9.123 {
9.124 return true;
9.125 }
9.126 - var x, y;
9.127 - var iTableWidth, iTableHeight;
9.128 -
9.129 + var
9.130 + x, y,
9.131 + iTableWidth = _nBody.getElementsByTagName('tr')[0].getElementsByTagName('td').length,
9.132 + iTableHeight;
9.133
9.134 /* Get table height and width - done here so as to be dynamic (if table is updated) */
9.135 if ( _oDatatable )
9.136 @@ -568,7 +624,6 @@
9.137 * now
9.138 */
9.139 var oSettings = _oDatatable.fnSettings();
9.140 - iTableWidth = oSettings.aoColumns.length;
9.141 iTableHeight = oSettings.aiDisplay.length;
9.142
9.143 var aDtPos = _fnFindDtCell( _nOldFocus );
9.144 @@ -582,7 +637,6 @@
9.145 }
9.146 else
9.147 {
9.148 - iTableWidth = _nBody.getElementsByTagName('tr')[0].getElementsByTagName('td').length;
9.149 iTableHeight = _nBody.getElementsByTagName('tr').length;
9.150 }
9.151
9.152 @@ -935,7 +989,7 @@
9.153 nDiv.style.overflow = "hidden";
9.154 if ( typeof oInit.tabIndex != 'undefined' )
9.155 {
9.156 - nDiv.tabIndex = oInit.tabIndex;
9.157 + _nInput.tabIndex = oInit.tabIndex;
9.158 }
9.159 nDiv.appendChild(_nInput);
9.160 oInit.table.parentNode.insertBefore( nDiv, oInit.table.nextSibling );
10.1 --- a/static/dataTables/extras/KeyTable/js/KeyTable.min.js Mon Aug 16 14:55:21 2010 +0200
10.2 +++ b/static/dataTables/extras/KeyTable/js/KeyTable.min.js Fri Aug 20 17:39:19 2010 +0200
10.3 @@ -1,6 +1,6 @@
10.4 /*
10.5 * File: KeyTable.min.js
10.6 - * Version: 1.1.2
10.7 + * Version: 1.1.6
10.8 * Author: Allan Jardine (www.sprymedia.co.uk)
10.9 *
10.10 * Copyright 2009-2010 Allan Jardine, all rights reserved.
10.11 @@ -14,7 +14,8 @@
10.12 */
10.13 function KeyTable(q){this.block=false;this.event={remove:{}};this.fnGetCurrentPosition=function(){return[c,a]
10.14 };this.fnGetCurrentData=function(){return m.innerHTML};this.fnGetCurrentTD=function(){return m
10.15 -};var f=null;var m=null;var c=null;var a=null;var G=null;var i="focus";var w=false;
10.16 +};this.fnSetPosition=function(H,I){if(typeof H=="object"&&H.nodeName){b(H)}else{b(E(H,I))
10.17 +}};var f=null;var m=null;var c=null;var a=null;var G=null;var i="focus";var w=false;
10.18 var r={action:[],esc:[],focus:[],blur:[]};var e=null;var n;var s;var C=false;function B(H){return function(I,L,K){if((I===null||typeof I=="number")&&(L===null||typeof L=="number")&&typeof K=="function"){x(H,I,L,K)
10.19 }else{if(typeof I=="object"&&typeof L=="function"){var J=j(I);x(H,J[0],J[1],L)}else{alert("Unhandable event type was added: x"+I+" y:"+L+" z:"+K)
10.20 }}}}function d(H){return function(I,L,K){if((I===null||typeof arguments[0]=="number")&&(L===null||typeof arguments[1]=="number")){if(typeof arguments[2]=="function"){F(H,I,L,K)
10.21 @@ -24,20 +25,23 @@
10.22 }function F(N,I,M,K){var L=0;for(var J=0,H=r[N].length;J<H-L;J++){if(typeof K!="undefined"){if(r[N][J-L].x==I&&r[N][J-L].y==M&&r[N][J-L].fn==K){r[N].splice(J-L,1);
10.23 L++}}else{if(r[N][J-L].x==I&&r[N][J-L].y==M){r[N].splice(J,1);return 1}}}return L
10.24 }function A(M,H,L){var K=0;var I=r[M];for(var J=0;J<I.length;J++){if((I[J].x==H&&I[J].y==L)||(I[J].x===null&&I[J].y==L)||(I[J].x==H&&I[J].y===null)||(I[J].x===null&&I[J].y===null)){I[J].fn(E(H,L),H,L);
10.25 -K++}}return K}function b(L,T){if(m==L){return}if(typeof T=="undefined"){T=true}if(m!==null){p(m)
10.26 -}jQuery(L).addClass(i);if(e){var J=e.fnSettings();var O=g(L)[1];var P=w;while(O>=J.fnDisplayEnd()){if(J._iDisplayLength>=0){if(J._iDisplayStart+J._iDisplayLength<J.fnRecordsDisplay()){J._iDisplayStart+=J._iDisplayLength
10.27 -}}else{J._iDisplayStart=0}e.oApi._fnCalculateEnd(J)}while(O<J._iDisplayStart){J._iDisplayStart=J._iDisplayLength>=0?J._iDisplayStart-J._iDisplayLength:0;
10.28 +K++}}return K}function b(M,U){if(m==M){return}if(typeof U=="undefined"){U=true}if(m!==null){p(m)
10.29 +}jQuery(M).addClass(i);var J;if(e){J=e.fnSettings();var P=g(M)[1];var Q=w;while(P>=J.fnDisplayEnd()){if(J._iDisplayLength>=0){if(J._iDisplayStart+J._iDisplayLength<J.fnRecordsDisplay()){J._iDisplayStart+=J._iDisplayLength
10.30 +}}else{J._iDisplayStart=0}e.oApi._fnCalculateEnd(J)}while(P<J._iDisplayStart){J._iDisplayStart=J._iDisplayLength>=0?J._iDisplayStart-J._iDisplayLength:0;
10.31 if(J._iDisplayStart<0){J._iDisplayStart=0}e.oApi._fnCalculateEnd(J)}e.oApi._fnDraw(J);
10.32 -w=P}var M=j(L);m=L;c=M[0];a=M[1];if(T){var Q=document.documentElement.clientHeight;
10.33 -var S=document.documentElement.clientWidth;var K=document.body.scrollTop||document.documentElement.scrollTop;
10.34 -var N=document.body.scrollLeft||document.documentElement.scrollLeft;var H=L.offsetHeight;
10.35 -var I=L.offsetWidth;var R=y(L);if(R[1]+H>K+Q){z(R[1]+H-Q)}else{if(R[1]<K){z(R[1])
10.36 -}}if(R[0]+I>N+S){t(R[0]+I-S)}else{if(R[0]<N){t(R[0])}}}A("focus",c,a)}function u(){p(m);
10.37 -c=null;a=null;m=null;k()}function p(H){jQuery(H).removeClass(i);A("blur",c,a)}function l(H){var I=this;
10.38 -while(I.nodeName!="TD"){I=I.parentNode}b(I);D()}function h(N){if(G.block||!w){return true
10.39 -}if(N.metaKey||N.altKey||N.ctrlKey){return true}var I,O;var L,H;if(e){var M=e.fnSettings();
10.40 -L=M.aoColumns.length;H=M.aiDisplay.length;var K=g(m);if(K===null){return}c=K[0];a=K[1]
10.41 -}else{L=f.getElementsByTagName("tr")[0].getElementsByTagName("td").length;H=f.getElementsByTagName("tr").length
10.42 +w=Q}var N=j(M);m=M;c=N[0];a=N[1];var R,T,L,O,H,I,S;if(U){R=document.documentElement.clientHeight;
10.43 +T=document.documentElement.clientWidth;L=document.body.scrollTop||document.documentElement.scrollTop;
10.44 +O=document.body.scrollLeft||document.documentElement.scrollLeft;H=M.offsetHeight;
10.45 +I=M.offsetWidth;S=y(M);if(S[1]+H>L+R){z(S[1]+H-R)}else{if(S[1]<L){z(S[1])}}if(S[0]+I>O+T){t(S[0]+I-T)
10.46 +}else{if(S[0]<O){t(S[0])}}}if(e&&typeof J.oScroll!="undefined"&&(J.oScroll.sX!==""||J.oScroll.xY!=="")){var K=J.nTable.parentNode;
10.47 +R=K.clientHeight;T=K.clientWidth;L=K.scrollTop;O=K.scrollLeft;H=M.offsetHeight;I=M.offsetWidth;
10.48 +if(M.offsetTop+H>R+L){K.scrollTop=(M.offsetTop+H)-R}else{if(M.offsetTop<L){K.scrollTop=M.offsetTop
10.49 +}}if(M.offsetLeft+I>T+O){K.scrollLeft=(M.offsetLeft+I)-T}else{if(M.offsetLeft<O){K.scrollLeft=M.offsetLeft
10.50 +}}}A("focus",c,a)}function u(){p(m);c=null;a=null;m=null;k()}function p(H){jQuery(H).removeClass(i);
10.51 +A("blur",c,a)}function l(H){var I=this;while(I.nodeName!="TD"){I=I.parentNode}b(I);
10.52 +D()}function h(N){if(G.block||!w){return true}if(N.metaKey||N.altKey||N.ctrlKey){return true
10.53 +}var I,O,L=f.getElementsByTagName("tr")[0].getElementsByTagName("td").length,H;if(e){var M=e.fnSettings();
10.54 +H=M.aiDisplay.length;var K=g(m);if(K===null){return}c=K[0];a=K[1]}else{H=f.getElementsByTagName("tr").length
10.55 }var J=(N.keyCode==9&&N.shiftKey)?-1:N.keyCode;switch(J){case 13:N.preventDefault();
10.56 N.stopPropagation();A("action",c,a);return true;case 27:if(!A("esc",c,a)){u()}break;
10.57 case -1:case 37:if(c>0){I=c-1;O=a}else{if(a>0){I=L-1;O=a-1}else{if(J==-1&&n){C=true;
10.58 @@ -61,7 +65,7 @@
10.59 }if(typeof H.initScroll=="undefined"){H.initScroll=true}if(typeof H.form=="undefined"){H.form=false
10.60 }n=H.form;f=H.table.getElementsByTagName("tbody")[0];if(n){var I=document.createElement("div");
10.61 s=document.createElement("input");I.style.height="1px";I.style.width="0px";I.style.overflow="hidden";
10.62 -if(typeof H.tabIndex!="undefined"){I.tabIndex=H.tabIndex}I.appendChild(s);H.table.parentNode.insertBefore(I,H.table.nextSibling);
10.63 +if(typeof H.tabIndex!="undefined"){s.tabIndex=H.tabIndex}I.appendChild(s);H.table.parentNode.insertBefore(I,H.table.nextSibling);
10.64 jQuery(s).focus(function(){if(!C){w=true;C=false;if(typeof H.focus.nodeName!="undefined"){b(H.focus,H.initScroll)
10.65 }else{b(E(H.focus[0],H.focus[1]),H.initScroll)}setTimeout(function(){s.blur()},0)
10.66 }});w=false}else{if(typeof H.focus.nodeName!="undefined"){b(H.focus,H.initScroll)
11.1 Binary file static/dataTables/extras/KeyTable/js/KeyTable.min.js.gz has changed
12.1 --- a/static/dataTables/extras/TableTools/index.html Mon Aug 16 14:55:21 2010 +0200
12.2 +++ b/static/dataTables/extras/TableTools/index.html Fri Aug 20 17:39:19 2010 +0200
12.3 @@ -33,7 +33,15 @@
12.4
12.5 <h1>Preamble</h1>
12.6 <p>TableTools in a features plug-in for DataTables which presents a tool bar for a table providing the end user with options for saving files Comma Separated Values (CSV) or Excel (XLS), copying data to system Clipboard, or printing the table.</p>
12.7 - <p>Please note that DataTables 1.5.x or greater is required for TableTools and Flash 10 is used for the file saving / clipboard operations so the user will require that installed for their browser. Features and customisation options for TableTools is done through the <i>TableToolsInit</i> variable. Note that you might need to set the sSwfPath variable for TableTools to find the required Flash file (TableToolsInit.sSwfPath="...").</p>
12.8 + <p>Points to note</p>
12.9 + <ul>
12.10 + <li>Please note that DataTables 1.5.x or greater is required for TableTools</li>
12.11 + <li>Flash 10 is used for the file save / clipboard operations so the user will required that installed for their browser</li>
12.12 + <li>Features and customisation options for TableTools is done through the <i>TableToolsInit</i> variable</li>
12.13 + <li>You might need to set the sSwfPath variable for TableTools to find the required Flash file (TableToolsInit.sSwfPath="...")</li>
12.14 + <li>TableTools will not work using file:// protocol (i.e. from your desktop) unless you specifically allow it in your <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html">Flash Player settings</a></li>
12.15 + </ul>
12.16 +
12.17
12.18 <h1>Live example</h1>
12.19 <div id="demo">
13.1 --- a/static/dataTables/extras/TableTools/media/ZeroClipboard/ZeroClipboard.as Mon Aug 16 14:55:21 2010 +0200
13.2 +++ b/static/dataTables/extras/TableTools/media/ZeroClipboard/ZeroClipboard.as Fri Aug 20 17:39:19 2010 +0200
13.3 @@ -1,1 +1,1 @@
13.4 -package {
13.5 import flash.display.Stage;
13.6 import flash.display.Sprite;
13.7 import flash.display.LoaderInfo;
13.8 import flash.display.StageScaleMode;
13.9 import flash.events.*;
13.10 import flash.display.StageAlign;
13.11 import flash.display.StageScaleMode;
13.12 import flash.external.ExternalInterface;
13.13 import flash.system.Security;
13.14 import flash.utils.*;
13.15 import flash.system.System;
13.16 import flash.net.FileReference;
13.17 import flash.net.FileFilter;
13.18
13.19 public class ZeroClipboard extends Sprite {
13.20
13.21 private var id:String = '';
13.22 private var button:Sprite;
13.23 private var clipText:String = 'blank';
13.24 private var fileName:String = '';
13.25 private var action:String = 'copy';
13.26
13.27 public function ZeroClipboard() {
13.28 // constructor, setup event listeners and external interfaces
13.29 stage.scaleMode = StageScaleMode.EXACT_FIT;
13.30 flash.system.Security.allowDomain("*");
13.31
13.32 // import flashvars
13.33 var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
13.34 id = flashvars.id;
13.35
13.36 // invisible button covers entire stage
13.37 button = new Sprite();
13.38 button.buttonMode = true;
13.39 button.useHandCursor = true;
13.40 button.graphics.beginFill(0xCCFF00);
13.41 button.graphics.drawRect(0, 0, Math.floor(flashvars.width), Math.floor(flashvars.height));
13.42 button.alpha = 0.0;
13.43 addChild(button);
13.44 button.addEventListener(MouseEvent.CLICK, clickHandler);
13.45
13.46 button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event) {
13.47 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'mouseOver', null );
13.48 } );
13.49 button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event) {
13.50 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'mouseOut', null );
13.51 } );
13.52 button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event) {
13.53 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'mouseDown', null );
13.54 } );
13.55 button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event) {
13.56 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'mouseUp', null );
13.57 } );
13.58
13.59 // external functions
13.60 ExternalInterface.addCallback("setHandCursor", setHandCursor);
13.61 ExternalInterface.addCallback("clearText", clearText);
13.62 ExternalInterface.addCallback("setText", setText);
13.63 ExternalInterface.addCallback("setFileName", setFileName);
13.64 ExternalInterface.addCallback("setAction", setAction);
13.65
13.66 // signal to the browser that we are ready
13.67 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'load', null );
13.68 }
13.69
13.70 public function clearText() {
13.71 clipText = '';
13.72 }
13.73
13.74 public function setText(newText:String) {
13.75 clipText += newText;
13.76 }
13.77
13.78 public function setFileName(newFileName:String) {
13.79 fileName = newFileName;
13.80 }
13.81
13.82 public function setAction(newAction:String) {
13.83 action = newAction;
13.84 }
13.85
13.86 public function setHandCursor(enabled:Boolean) {
13.87 // control whether the hand cursor is shown on rollover (true)
13.88 // or the default arrow cursor (false)
13.89 button.useHandCursor = enabled;
13.90 }
13.91
13.92 private function clickHandler(event:Event):void {
13.93 if ( action == "save" ) {
13.94 var fileRef:FileReference = new FileReference();
13.95
13.96 /* If we are saving to an XLS, we must use UTF16LE */
13.97 var xlsPattern:RegExp = /\.xls$/;
13.98 if ( xlsPattern.test(fileName) ) {
13.99 fileRef.save( strToUTF16(clipText), fileName );
13.100 } else {
13.101 fileRef.save( strToUTF8(clipText), fileName );
13.102 }
13.103 } else {
13.104 /* Copy the text to the clipboard */
13.105 System.setClipboard( clipText );
13.106 }
13.107 ExternalInterface.call( 'ZeroClipboard.dispatch', id, 'complete', clipText );
13.108 }
13.109
13.110
13.111 /*
13.112 * Function: utf8to8
13.113 * Purpose: Convert a string to the output utf-8
13.114 * Returns: ByteArray
13.115 * Inputs: String
13.116 */
13.117 private function strToUTF8( str:String ):ByteArray
13.118 {
13.119 var utf8:ByteArray = new ByteArray();
13.120
13.121 /* BOM first */
13.122 utf8.writeByte( 0xEF );
13.123 utf8.writeByte( 0xBB );
13.124 utf8.writeByte( 0xBF );
13.125 utf8.writeUTFBytes( str );
13.126
13.127 return utf8;
13.128 }
13.129
13.130
13.131 /*
13.132 * Function: strToUTF16
13.133 * Purpose: Convert a string to the output utf-16
13.134 * Returns: ByteArray
13.135 * Inputs: String
13.136 * Notes: The fact that this function is needed is a little annoying. Basically, strings in
13.137 * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
13.138 * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the padding
13.139 * required, and the BOM
13.140 */
13.141 private function strToUTF16( str:String ):ByteArray
13.142 {
13.143 var utf16:ByteArray = new ByteArray();
13.144 var iChar:uint;
13.145 var i:uint=0, iLen:uint = str.length;
13.146
13.147 /* BOM first */
13.148 utf16.writeByte( 0xFF );
13.149 utf16.writeByte( 0xFE );
13.150
13.151 while ( i < iLen )
13.152 {
13.153 iChar = str.charCodeAt(i);
13.154 trace( iChar );
13.155
13.156 if ( iChar < 0xFF )
13.157 {
13.158 /* one byte char */
13.159 utf16.writeByte( iChar );
13.160 utf16.writeByte( 0 );
13.161 }
13.162 else
13.163 {
13.164 /* two byte char */
13.165 utf16.writeByte( iChar & 0x00FF );
13.166 utf16.writeByte( iChar >> 8 );
13.167 }
13.168
13.169 i++;
13.170 }
13.171
13.172 return utf16;
13.173 }
13.174 }
13.175 }
13.176 \ No newline at end of file
13.177 +/* Compile using: mxmlc --target-player=10.0.0 ZeroClipboard.as */
13.178 package {
13.179 import flash.display.Stage;
13.180 import flash.display.Sprite;
13.181 import flash.display.LoaderInfo;
13.182 import flash.display.StageScaleMode;
13.183 import flash.events.*;
13.184 import flash.display.StageAlign;
13.185 import flash.display.StageScaleMode;
13.186 import flash.external.ExternalInterface;
13.187 import flash.system.Security;
13.188 import flash.utils.*;
13.189 import flash.system.System;
13.190 import flash.net.FileReference;
13.191 import flash.net.FileFilter;
13.192
13.193 public class ZeroClipboard extends Sprite {
13.194
13.195 private var domId:String = '';
13.196 private var button:Sprite;
13.197 private var clipText:String = 'blank';
13.198 private var fileName:String = '';
13.199 private var action:String = 'copy';
13.200 private var incBom:Boolean = true;
13.201 private var charSet:String = 'utf8';
13.202
13.203 public function ZeroClipboard() {
13.204 // constructor, setup event listeners and external interfaces
13.205 stage.scaleMode = StageScaleMode.EXACT_FIT;
13.206 flash.system.Security.allowDomain("*");
13.207
13.208 // import flashvars
13.209 var flashvars:Object = LoaderInfo( this.root.loaderInfo ).parameters;
13.210 domId = flashvars.id;
13.211
13.212 // invisible button covers entire stage
13.213 button = new Sprite();
13.214 button.buttonMode = true;
13.215 button.useHandCursor = true;
13.216 button.graphics.beginFill(0x00FF00);
13.217 button.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
13.218 button.alpha = 0.0;
13.219 addChild(button);
13.220
13.221 button.addEventListener(MouseEvent.CLICK, clickHandler);
13.222 button.addEventListener(MouseEvent.MOUSE_OVER, function(event:Event):void {
13.223 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOver', null );
13.224 } );
13.225 button.addEventListener(MouseEvent.MOUSE_OUT, function(event:Event):void {
13.226 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseOut', null );
13.227 } );
13.228 button.addEventListener(MouseEvent.MOUSE_DOWN, function(event:Event):void {
13.229 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseDown', null );
13.230 } );
13.231 button.addEventListener(MouseEvent.MOUSE_UP, function(event:Event):void {
13.232 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'mouseUp', null );
13.233 } );
13.234
13.235 // external functions
13.236 ExternalInterface.addCallback("setHandCursor", setHandCursor);
13.237 ExternalInterface.addCallback("clearText", clearText);
13.238 ExternalInterface.addCallback("setText", setText);
13.239 ExternalInterface.addCallback("appendText", appendText);
13.240 ExternalInterface.addCallback("setFileName", setFileName);
13.241 ExternalInterface.addCallback("setAction", setAction);
13.242 ExternalInterface.addCallback("setCharSet", setCharSet);
13.243 ExternalInterface.addCallback("setBomInc", setBomInc);
13.244
13.245 // signal to the browser that we are ready
13.246 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'load', null );
13.247 }
13.248
13.249 public function setCharSet(newCharSet:String):void {
13.250 if ( newCharSet == 'UTF16LE' ) {
13.251 charSet = newCharSet;
13.252 } else {
13.253 charSet = 'UTF8';
13.254 }
13.255 }
13.256
13.257 public function setBomInc(newBomInc:Boolean):void {
13.258 incBom = newBomInc;
13.259 }
13.260
13.261 public function clearText():void {
13.262 clipText = '';
13.263 }
13.264
13.265 public function appendText(newText:String):void {
13.266 clipText += newText;
13.267 }
13.268
13.269 public function setText(newText:String):void {
13.270 clipText = newText;
13.271 }
13.272
13.273 public function setFileName(newFileName:String):void {
13.274 fileName = newFileName;
13.275 }
13.276
13.277 public function setAction(newAction:String):void {
13.278 action = newAction;
13.279 }
13.280
13.281 public function setHandCursor(enabled:Boolean):void {
13.282 // control whether the hand cursor is shown on rollover (true)
13.283 // or the default arrow cursor (false)
13.284 button.useHandCursor = enabled;
13.285 }
13.286
13.287 private function clickHandler(event:Event):void {
13.288 if ( action == "save" ) {
13.289 var fileRef:FileReference = new FileReference();
13.290
13.291 if ( charSet == 'UTF16LE' ) {
13.292 fileRef.save( strToUTF16LE(clipText), fileName );
13.293 } else {
13.294 fileRef.save( strToUTF8(clipText), fileName );
13.295 }
13.296 } else {
13.297 /* Copy the text to the clipboard. Note charset and BOM have no effect here */
13.298 System.setClipboard( clipText );
13.299 }
13.300 ExternalInterface.call( 'ZeroClipboard.dispatch', domId, 'complete', clipText );
13.301 }
13.302
13.303
13.304 /*
13.305 * Function: strToUTF8
13.306 * Purpose: Convert a string to the output utf-8
13.307 * Returns: ByteArray
13.308 * Inputs: String
13.309 */
13.310 private function strToUTF8( str:String ):ByteArray {
13.311 var utf8:ByteArray = new ByteArray();
13.312
13.313 /* BOM first */
13.314 if ( incBom ) {
13.315 utf8.writeByte( 0xEF );
13.316 utf8.writeByte( 0xBB );
13.317 utf8.writeByte( 0xBF );
13.318 }
13.319 utf8.writeUTFBytes( str );
13.320
13.321 return utf8;
13.322 }
13.323
13.324
13.325 /*
13.326 * Function: strToUTF16LE
13.327 * Purpose: Convert a string to the output utf-16
13.328 * Returns: ByteArray
13.329 * Inputs: String
13.330 * Notes: The fact that this function is needed is a little annoying. Basically, strings in
13.331 * AS3 are UTF-16 (with surrogate pairs and everything), but characters which take up less
13.332 * than 8 bytes appear to be stored as only 8 bytes. This function effective adds the
13.333 * padding required, and the BOM
13.334 */
13.335 private function strToUTF16LE( str:String ):ByteArray {
13.336 var utf16:ByteArray = new ByteArray();
13.337 var iChar:uint;
13.338 var i:uint=0, iLen:uint = str.length;
13.339
13.340 /* BOM first */
13.341 if ( incBom ) {
13.342 utf16.writeByte( 0xFF );
13.343 utf16.writeByte( 0xFE );
13.344 }
13.345
13.346 while ( i < iLen ) {
13.347 iChar = str.charCodeAt(i);
13.348 trace( iChar );
13.349
13.350 if ( iChar < 0xFF ) {
13.351 /* one byte char */
13.352 utf16.writeByte( iChar );
13.353 utf16.writeByte( 0 );
13.354 } else {
13.355 /* two byte char */
13.356 utf16.writeByte( iChar & 0x00FF );
13.357 utf16.writeByte( iChar >> 8 );
13.358 }
13.359
13.360 i++;
13.361 }
13.362
13.363 return utf16;
13.364 }
13.365 }
13.366 }
13.367 \ No newline at end of file
14.1 --- a/static/dataTables/extras/TableTools/media/ZeroClipboard/ZeroClipboard.js Mon Aug 16 14:55:21 2010 +0200
14.2 +++ b/static/dataTables/extras/TableTools/media/ZeroClipboard/ZeroClipboard.js Fri Aug 20 17:39:19 2010 +0200
14.3 @@ -3,7 +3,7 @@
14.4
14.5 var ZeroClipboard = {
14.6
14.7 - version: "1.0.4",
14.8 + version: "1.0.4-mod",
14.9 clients: {}, // registered upload clients on page, indexed by id
14.10 moviePath: 'ZeroClipboard.swf', // URL to movie
14.11 nextId: 1, // ID of next movie
14.12 @@ -191,25 +191,43 @@
14.13 },
14.14
14.15 clearText: function() {
14.16 - // set text to be copied to clipboard
14.17 + // clear the text to be copy / saved
14.18 this.clipText = '';
14.19 if (this.ready) this.movie.clearText();
14.20 },
14.21
14.22 + appendText: function(newText) {
14.23 + // append text to that which is to be copied / saved
14.24 + this.clipText += newText;
14.25 + if (this.ready) { this.movie.appendText(newText) ;}
14.26 + },
14.27 +
14.28 setText: function(newText) {
14.29 - // set text to be copied to clipboard
14.30 - this.clipText += newText;
14.31 + // set text to be copied to be copied / saved
14.32 + this.clipText = newText;
14.33 if (this.ready) { this.movie.setText(newText) ;}
14.34 },
14.35
14.36 + setCharSet: function(charSet) {
14.37 + // set the character set (UTF16LE or UTF8)
14.38 + this.charSet = charSet;
14.39 + if (this.ready) { this.movie.setCharSet(charSet) ;}
14.40 + },
14.41 +
14.42 + setBomInc: function(bomInc) {
14.43 + // set if the BOM should be included or not
14.44 + this.incBom = bomInc;
14.45 + if (this.ready) { this.movie.setBomInc(bomInc) ;}
14.46 + },
14.47 +
14.48 setFileName: function(newText) {
14.49 - // set text to be copied to clipboard
14.50 + // set the file name
14.51 this.fileName = newText;
14.52 if (this.ready) this.movie.setFileName(newText);
14.53 },
14.54
14.55 setAction: function(newText) {
14.56 - // set text to be copied to clipboard
14.57 + // set action (save or copy)
14.58 this.action = newText;
14.59 if (this.ready) this.movie.setAction(newText);
14.60 },
14.61 @@ -259,9 +277,11 @@
14.62
14.63 this.ready = true;
14.64 this.movie.clearText();
14.65 - this.movie.setText( this.clipText );
14.66 + this.movie.appendText( this.clipText );
14.67 this.movie.setFileName( this.fileName );
14.68 this.movie.setAction( this.action );
14.69 + this.movie.setCharSet( this.charSet );
14.70 + this.movie.setBomInc( this.incBom );
14.71 this.movie.setHandCursor( this.handCursorEnabled );
14.72 break;
14.73
15.1 --- a/static/dataTables/extras/TableTools/media/js/TableTools.js Mon Aug 16 14:55:21 2010 +0200
15.2 +++ b/static/dataTables/extras/TableTools/media/js/TableTools.js Fri Aug 20 17:39:19 2010 +0200
15.3 @@ -1,6 +1,6 @@
15.4 /*
15.5 * File: TableTools.js
15.6 - * Version: 1.1.2
15.7 + * Version: 1.1.4
15.8 * CVS: $Id$
15.9 * Description: Copy, save and print functions for DataTables
15.10 * Author: Allan Jardine (www.sprymedia.co.uk)
15.11 @@ -27,6 +27,10 @@
15.12 "bCopy": true,
15.13 "bPrint": true
15.14 },
15.15 + "oBom": {
15.16 + "bCsv": true,
15.17 + "bXls": true
15.18 + },
15.19 "bIncFooter": true,
15.20 "bIncHiddenColumns": false,
15.21 "sPrintMessage": "", /* Message with will print with the table */
15.22 @@ -130,6 +134,8 @@
15.23 var clip = new ZeroClipboard.Client();
15.24 clip.setHandCursor( true );
15.25 clip.setAction( 'save' );
15.26 + clip.setCharSet( 'UTF8' );
15.27 + clip.setBomInc( _oSettings.oBom.bCsv );
15.28 clip.setFileName( fnGetTitle()+'.csv' );
15.29
15.30 clip.addEventListener('mouseOver', function(client) {
15.31 @@ -167,6 +173,8 @@
15.32 var clip = new ZeroClipboard.Client();
15.33 clip.setHandCursor( true );
15.34 clip.setAction( 'save' );
15.35 + clip.setCharSet( 'UTF16LE' );
15.36 + clip.setBomInc( _oSettings.oBom.bXls );
15.37 clip.setFileName( fnGetTitle()+'.xls' );
15.38
15.39 clip.addEventListener('mouseOver', function(client) {
15.40 @@ -219,7 +227,7 @@
15.41
15.42 clip.addEventListener('complete', function (client, text) {
15.43 var aData = _sLastData.split('\n');
15.44 - alert( 'Copied '+(aData.length-2)+' rows to the clipboard' );
15.45 + alert( 'Copied '+(aData.length-1)+' rows to the clipboard' );
15.46 } );
15.47
15.48 fnGlue( clip, nButton, "ToolTables_Copy_"+_iId, "Copy to clipboard" );
15.49 @@ -258,7 +266,9 @@
15.50 fnPrintHideNodes( _DTSettings.nTable );
15.51
15.52 /* Show the whole table */
15.53 + _iPrintSaveStart = _DTSettings._iDisplayStart;
15.54 _iPrintSaveLength = _DTSettings._iDisplayLength;
15.55 + _DTSettings._iDisplayStart = 0;
15.56 _DTSettings._iDisplayLength = -1;
15.57 _DTSettings.oApi._fnCalculateEnd( _DTSettings );
15.58 _DTSettings.oApi._fnDraw( _DTSettings );
15.59 @@ -296,7 +306,7 @@
15.60 _iPrintScroll = $(window).scrollTop();
15.61 window.scrollTo( 0, 0 );
15.62
15.63 - $(document).bind( "keydown", null, fnPrintEnd );
15.64 + $(document).bind( "keyup", null, fnPrintEnd );
15.65
15.66 setTimeout( function() {
15.67 $(nInfo).fadeOut( "normal", function() {
15.68 @@ -336,6 +346,7 @@
15.69 }
15.70
15.71 /* Restore the table length */
15.72 + _DTSettings._iDisplayStart = _iPrintSaveStart;
15.73 _DTSettings._iDisplayLength = _iPrintSaveLength;
15.74 _DTSettings.oApi._fnCalculateEnd( _DTSettings );
15.75 _DTSettings.oApi._fnDraw( _DTSettings );
15.76 @@ -589,7 +600,7 @@
15.77 clip.clearText();
15.78 for ( var i=0, iLen=asData.length ; i<iLen ; i++ )
15.79 {
15.80 - clip.setText( asData[i] );
15.81 + clip.appendText( asData[i] );
15.82 }
15.83 }
15.84
15.85 @@ -644,7 +655,10 @@
15.86 var mTypeData = _DTSettings.aoData[ _DTSettings.aiDisplay[j] ]._aData[ i ];
15.87 if ( typeof mTypeData == "string" )
15.88 {
15.89 - sLoopData = mTypeData.replace(/\n/g," ").replace( /<.*?>/g, "" );
15.90 + /* Strip newlines, replace img tags with alt attr. and finally strip html... */
15.91 + sLoopData = mTypeData.replace(/\n/g," ");
15.92 + sLoopData = sLoopData.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi, '$1$2$3')
15.93 + sLoopData = sLoopData.replace( /<.*?>/g, "" );
15.94 }
15.95 else
15.96 {
16.1 --- a/static/dataTables/extras/TableTools/media/js/TableTools.min.js Mon Aug 16 14:55:21 2010 +0200
16.2 +++ b/static/dataTables/extras/TableTools/media/js/TableTools.min.js Fri Aug 20 17:39:19 2010 +0200
16.3 @@ -1,6 +1,6 @@
16.4 /*
16.5 * File: TableTools.min.js
16.6 - * Version: 1.1.2
16.7 + * Version: 2.0.0.dev
16.8 * Author: Allan Jardine (www.sprymedia.co.uk)
16.9 *
16.10 * Copyright 2009-2010 Allan Jardine, all rights reserved.
16.11 @@ -12,62 +12,17 @@
16.12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16.13 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
16.14 */
16.15 -var TableToolsInit={oFeatures:{bCsv:true,bXls:true,bCopy:true,bPrint:true},bIncFooter:true,bIncHiddenColumns:false,sPrintMessage:"",sPrintInfo:"<h6>Print view</h6><p>Please use your browser's print function to print this table. Press escape when finished.",sTitle:"",sSwfPath:"media/swf/ZeroClipboard.swf",iButtonHeight:30,iButtonWidth:30,sCsvBoundary:"'",_iNextId:1};
16.16 -(function(a){function b(i){var n;var m=null;var r;var u=[];var c=0;var e=null;var x;
16.17 -var f;var z;function q(C){_nTools=document.createElement("div");_nTools.className="TableTools";
16.18 -z=TableToolsInit._iNextId++;n=a.extend(true,{},TableToolsInit);x=C.oDTSettings;r=k(x.nTable,"dataTables_wrapper");
16.19 -ZeroClipboard.moviePath=n.sSwfPath;if(n.oFeatures.bCopy){B()}if(n.oFeatures.bCsv){j()
16.20 -}if(n.oFeatures.bXls){s()}if(n.oFeatures.bPrint){d()}return _nTools}function j(){var E="TableTools_button TableTools_csv";
16.21 -var C=document.createElement("div");C.id="ToolTables_CSV_"+z;C.style.height=n.iButtonHeight+"px";
16.22 -C.style.width=n.iButtonWidth+"px";C.className=E;_nTools.appendChild(C);var D=new ZeroClipboard.Client();
16.23 -D.setHandCursor(true);D.setAction("save");D.setFileName(l()+".csv");D.addEventListener("mouseOver",function(F){C.className=E+"_hover"
16.24 -});D.addEventListener("mouseOut",function(F){C.className=E});D.addEventListener("mouseDown",function(F){v(D,h(",",TableToolsInit.sCsvBoundary))
16.25 -});g(D,C,"ToolTables_CSV_"+z,"Save as CSV")}function s(){var E="TableTools_button TableTools_xls";
16.26 -var C=document.createElement("div");C.id="ToolTables_XLS_"+z;C.style.height=n.iButtonHeight+"px";
16.27 -C.style.width=n.iButtonWidth+"px";C.className=E;_nTools.appendChild(C);var D=new ZeroClipboard.Client();
16.28 -D.setHandCursor(true);D.setAction("save");D.setFileName(l()+".xls");D.addEventListener("mouseOver",function(F){C.className=E+"_hover"
16.29 -});D.addEventListener("mouseOut",function(F){C.className=E});D.addEventListener("mouseDown",function(F){v(D,h("\t"))
16.30 -});g(D,C,"ToolTables_XLS_"+z,"Save for Excel")}function B(){var E="TableTools_button TableTools_clipboard";
16.31 -var C=document.createElement("div");C.id="ToolTables_Copy_"+z;C.style.height=n.iButtonHeight+"px";
16.32 -C.style.width=n.iButtonWidth+"px";C.className=E;_nTools.appendChild(C);var D=new ZeroClipboard.Client();
16.33 -D.setHandCursor(true);D.setAction("copy");D.addEventListener("mouseOver",function(F){C.className=E+"_hover"
16.34 -});D.addEventListener("mouseOut",function(F){C.className=E});D.addEventListener("mouseDown",function(F){v(D,h("\t"))
16.35 -});D.addEventListener("complete",function(F,H){var G=f.split("\n");alert("Copied "+(G.length-2)+" rows to the clipboard")
16.36 -});g(D,C,"ToolTables_Copy_"+z,"Copy to clipboard")}function d(){var D="TableTools_button TableTools_print";
16.37 -var C=document.createElement("div");C.style.height=n.iButtonHeight+"px";C.style.width=n.iButtonWidth+"px";
16.38 -C.className=D;C.title="Print table";_nTools.appendChild(C);a(C).hover(function(E){C.className=D+"_hover"
16.39 -},function(E){C.className=D});a(C).click(function(){y(x.nTable);_iPrintSaveLength=x._iDisplayLength;
16.40 -x._iDisplayLength=-1;x.oApi._fnCalculateEnd(x);x.oApi._fnDraw(x);var E=x.anFeatures;
16.41 -for(var G in E){if(G!="i"&&G!="t"){u.push({node:E[G],display:"block"});E[G].style.display="none"
16.42 -}}var F=document.createElement("div");F.className="TableTools_PrintInfo";F.innerHTML=n.sPrintInfo;
16.43 -document.body.appendChild(F);if(n.sPrintMessage!==""){e=document.createElement("p");
16.44 -e.className="TableTools_PrintMessage";e.innerHTML=n.sPrintMessage;document.body.insertBefore(e,document.body.childNodes[0])
16.45 -}c=a(window).scrollTop();window.scrollTo(0,0);a(document).bind("keydown",null,p);
16.46 -setTimeout(function(){a(F).fadeOut("normal",function(){document.body.removeChild(F)
16.47 -})},2000)})}function p(C){if(C.keyCode==27){t();window.scrollTo(0,c);if(e){document.body.removeChild(e);
16.48 -e=null}x._iDisplayLength=_iPrintSaveLength;x.oApi._fnCalculateEnd(x);x.oApi._fnDraw(x);
16.49 -a(document).unbind("keydown",p)}}function t(){for(var D=0,C=u.length;D<C;D++){u[D].node.style.display=u[D].display
16.50 -}u.splice(0,u.length)}function y(D){var G=D.parentNode;var H=G.childNodes;for(var E=0,C=H.length;
16.51 -E<C;E++){if(H[E]!=D&&H[E].nodeType==1){var F=a(H[E]).css("display");if(F!="none"){u.push({node:H[E],display:F});
16.52 -H[E].style.display="none"}}}if(G.nodeName!="BODY"){y(G)}}function g(D,C,F,E){if(document.getElementById(F)){D.glue(C,E)
16.53 -}else{setTimeout(function(){g(D,C,F,E)},100)}}function l(){var C;if(n.sTitle!==""){C=n.sTitle
16.54 -}else{C=document.getElementsByTagName("title")[0].innerHTML}if("\u00A1".toString().length<4){return C.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,"")
16.55 -}else{return C.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")}}function k(D,C){if(D.className.match(C)||D.nodeName=="BODY"){return D
16.56 -}else{return k(D.parentNode,C)}}function o(C,E,D){if(E===""){return C}else{return E+C.replace(D,"\\"+E)+E
16.57 -}}function w(D){var E=A(D,2048),J=document.createElement("div"),F,C,H,I="",G;for(F=0,C=E.length;
16.58 -F<C;F++){H=E[F].lastIndexOf("&");if(H!=-1&&E[F].length>=8&&H>E[F].length-8){G=E[F].substr(H);
16.59 -E[F]=E[F].substr(0,H)}J.innerHTML=E[F];I+=J.childNodes[0].nodeValue}return I}function A(C,E){var F=[];
16.60 -var G=C.length;for(var D=0;D<G;D+=E){if(D+E<G){F.push(C.substring(D,D+E))}else{F.push(C.substring(D,G))
16.61 -}}return F}function v(G,D){var F=A(D,8192);G.clearText();for(var E=0,C=F.length;E<C;
16.62 -E++){G.setText(F[E])}}function h(E,I){var G,D;var F,M;var K="";var H="";var C=navigator.userAgent.match(/Windows/)?"\r\n":"\n";
16.63 -if(typeof I=="undefined"){I=""}var J=new RegExp(I,"g");for(G=0,D=x.aoColumns.length;
16.64 -G<D;G++){if(n.bIncHiddenColumns===true||x.aoColumns[G].bVisible){H=x.aoColumns[G].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"");
16.65 -if(H.indexOf("&")!=-1){H=w(H)}K+=o(H,I,J)+E}}K=K.slice(0,E.length*-1);K+=C;for(F=0,M=x.aiDisplay.length;
16.66 -F<M;F++){for(G=0,D=x.aoColumns.length;G<D;G++){if(n.bIncHiddenColumns===true||x.aoColumns[G].bVisible){var L=x.aoData[x.aiDisplay[F]]._aData[G];
16.67 -if(typeof L=="string"){H=L.replace(/\n/g," ").replace(/<.*?>/g,"")}else{H=L+""}H=H.replace(/^\s+/,"").replace(/\s+$/,"");
16.68 -if(H.indexOf("&")!=-1){H=w(H)}K+=o(H,I,J)+E}}K=K.slice(0,E.length*-1);K+=C}K.slice(0,-1);
16.69 -if(n.bIncFooter){for(G=0,D=x.aoColumns.length;G<D;G++){if(x.aoColumns[G].nTf!==null&&(n.bIncHiddenColumns===true||x.aoColumns[G].bVisible)){H=x.aoColumns[G].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,"");
16.70 -if(H.indexOf("&")!=-1){H=w(H)}K+=o(H,I,J)+E}}K=K.slice(0,E.length*-1)}f=K;return K
16.71 -}return q(i)}if(typeof a.fn.dataTable=="function"&&typeof a.fn.dataTableExt.sVersion!="undefined"){a.fn.dataTableExt.aoFeatures.push({fnInit:function(c){return new b({oDTSettings:c})
16.72 -},cFeature:"T",sFeature:"TableTools"})}else{alert("Warning: TableTools requires DataTables 1.5 or greater - www.datatables.net/download")
16.73 -}})(jQuery);
16.74 \ No newline at end of file
16.75 +var TableToolsInit={oFeatures:{bCsv:true,bXls:true,bCopy:true,bPrint:true},oBom:{bCsv:true,bXls:true},bIncFooter:true,bIncHiddenColumns:false,sPrintMessage:"",sPrintInfo:"<h6>Print view</h6><p>Please use your browser's print function to print this table. Press escape when finished.",sTitle:"",sSwfPath:"media/swf/ZeroClipboard.swf",iButtonHeight:30,iButtonWidth:30,sCsvBoundary:"'",_iNextId:1};
16.76 +(function(j){function D(p){function E(a){_nTools=document.createElement("div");_nTools.className="TableTools";l=TableToolsInit._iNextId++;g=j.extend(true,{},TableToolsInit);e=a.oDTSettings;F=v(e.nTable,"dataTables_wrapper");ZeroClipboard.moviePath=g.sSwfPath;g.oFeatures.bCopy&&G();g.oFeatures.bCsv&&H();g.oFeatures.bXls&&I();g.oFeatures.bPrint&&J();return _nTools}function H(){var a=document.createElement("div");a.id="ToolTables_CSV_"+l;a.style.height=g.iButtonHeight+"px";a.style.width=g.iButtonWidth+
16.77 +"px";a.className="TableTools_button TableTools_csv";_nTools.appendChild(a);var b=new ZeroClipboard.Client;b.setHandCursor(true);b.setAction("save");b.setCharSet("UTF8");b.setBomInc(g.oBom.bCsv);b.setFileName(w()+".csv");b.addEventListener("mouseOver",function(){a.className="TableTools_button TableTools_csv_hover"});b.addEventListener("mouseOut",function(){a.className="TableTools_button TableTools_csv"});b.addEventListener("mouseDown",function(){q(b,r(",",TableToolsInit.sCsvBoundary))});o(b,a,"ToolTables_CSV_"+
16.78 +l,"Save as CSV")}function I(){var a=document.createElement("div");a.id="ToolTables_XLS_"+l;a.style.height=g.iButtonHeight+"px";a.style.width=g.iButtonWidth+"px";a.className="TableTools_button TableTools_xls";_nTools.appendChild(a);var b=new ZeroClipboard.Client;b.setHandCursor(true);b.setAction("save");b.setCharSet("UTF16LE");b.setBomInc(g.oBom.bXls);b.setFileName(w()+".xls");b.addEventListener("mouseOver",function(){a.className="TableTools_button TableTools_xls_hover"});b.addEventListener("mouseOut",
16.79 +function(){a.className="TableTools_button TableTools_xls"});b.addEventListener("mouseDown",function(){q(b,r("\t"))});o(b,a,"ToolTables_XLS_"+l,"Save for Excel")}function G(){var a=document.createElement("div");a.id="ToolTables_Copy_"+l;a.style.height=g.iButtonHeight+"px";a.style.width=g.iButtonWidth+"px";a.className="TableTools_button TableTools_clipboard";_nTools.appendChild(a);var b=new ZeroClipboard.Client;b.setHandCursor(true);b.setAction("copy");b.addEventListener("mouseOver",function(){a.className=
16.80 +"TableTools_button TableTools_clipboard_hover"});b.addEventListener("mouseOut",function(){a.className="TableTools_button TableTools_clipboard"});b.addEventListener("mouseDown",function(){q(b,r("\t"))});b.addEventListener("complete",function(){var c=x.split("\n");alert("Copied "+(c.length-1)+" rows to the clipboard")});o(b,a,"ToolTables_Copy_"+l,"Copy to clipboard")}function J(){var a=document.createElement("div");a.style.height=g.iButtonHeight+"px";a.style.width=g.iButtonWidth+"px";a.className="TableTools_button TableTools_print";
16.81 +a.title="Print table";_nTools.appendChild(a);j(a).hover(function(){a.className="TableTools_button TableTools_print_hover"},function(){a.className="TableTools_button TableTools_print"});j(a).click(function(){y(e.nTable);_iPrintSaveStart=e._iDisplayStart;_iPrintSaveLength=e._iDisplayLength;e._iDisplayStart=0;e._iDisplayLength=-1;e.oApi._fnCalculateEnd(e);e.oApi._fnDraw(e);var b=e.anFeatures;for(var c in b)if(c!="i"&&c!="t"){m.push({node:b[c],display:"block"});b[c].style.display="none"}var d=document.createElement("div");
16.82 +d.className="TableTools_PrintInfo";d.innerHTML=g.sPrintInfo;document.body.appendChild(d);if(g.sPrintMessage!==""){n=document.createElement("p");n.className="TableTools_PrintMessage";n.innerHTML=g.sPrintMessage;document.body.insertBefore(n,document.body.childNodes[0])}z=j(window).scrollTop();window.scrollTo(0,0);j(document).bind("keydown",null,A);setTimeout(function(){j(d).fadeOut("normal",function(){document.body.removeChild(d)})},2E3)})}function A(a){if(a.keyCode==27){K();window.scrollTo(0,z);if(n){document.body.removeChild(n);
16.83 +n=null}e._iDisplayStart=_iPrintSaveStart;e._iDisplayLength=_iPrintSaveLength;e.oApi._fnCalculateEnd(e);e.oApi._fnDraw(e);j(document).unbind("keydown",A)}}function K(){for(var a=0,b=m.length;a<b;a++)m[a].node.style.display=m[a].display;m.splice(0,m.length)}function y(a){for(var b=a.parentNode,c=b.childNodes,d=0,h=c.length;d<h;d++)if(c[d]!=a&&c[d].nodeType==1){var k=j(c[d]).css("display");if(k!="none"){m.push({node:c[d],display:k});c[d].style.display="none"}}b.nodeName!="BODY"&&y(b)}function o(a,b,
16.84 +c,d){document.getElementById(c)?a.glue(b,d):setTimeout(function(){o(a,b,c,d)},100)}function w(){var a;a=g.sTitle!==""?g.sTitle:document.getElementsByTagName("title")[0].innerHTML;return"\u00a1".toString().length<4?a.replace(/[^a-zA-Z0-9_\u00A1-\uFFFF\.,\-_ !\(\)]/g,""):a.replace(/[^a-zA-Z0-9_\.,\-_ !\(\)]/g,"")}function v(a,b){return a.className.match(b)||a.nodeName=="BODY"?a:v(a.parentNode,b)}function s(a,b,c){return b===""?a:b+a.replace(c,"\\"+b)+b}function t(a){a=B(a,2048);var b=document.createElement("div"),
16.85 +c,d,h,k="";c=0;for(d=a.length;c<d;c++){h=a[c].lastIndexOf("&");if(h!=-1&&a[c].length>=8&&h>a[c].length-8){a[c].substr(h);a[c]=a[c].substr(0,h)}b.innerHTML=a[c];k+=b.childNodes[0].nodeValue}return k}function B(a,b){for(var c=[],d=a.length,h=0;h<d;h+=b)h+b<d?c.push(a.substring(h,h+b)):c.push(a.substring(h,d));return c}function q(a,b){b=B(b,8192);a.clearText();for(var c=0,d=b.length;c<d;c++)a.appendText(b[c])}function r(a,b){var c,d,h,k,i="",f="",C=navigator.userAgent.match(/Windows/)?"\r\n":"\n";if(typeof b==
16.86 +"undefined")b="";var u=new RegExp(b,"g");c=0;for(d=e.aoColumns.length;c<d;c++)if(g.bIncHiddenColumns===true||e.aoColumns[c].bVisible){f=e.aoColumns[c].sTitle.replace(/\n/g," ").replace(/<.*?>/g,"");if(f.indexOf("&")!=-1)f=t(f);i+=s(f,b,u)+a}i=i.slice(0,a.length*-1);i+=C;h=0;for(k=e.aiDisplay.length;h<k;h++){c=0;for(d=e.aoColumns.length;c<d;c++)if(g.bIncHiddenColumns===true||e.aoColumns[c].bVisible){f=e.aoData[e.aiDisplay[h]]._aData[c];if(typeof f=="string"){f=f.replace(/\n/g," ");f=f.replace(/<img.*?\s+alt\s*=\s*(?:"([^"]+)"|'([^']+)'|([^\s>]+)).*?>/gi,
16.87 +"$1$2$3");f=f.replace(/<.*?>/g,"")}else f=f+"";f=f.replace(/^\s+/,"").replace(/\s+$/,"");if(f.indexOf("&")!=-1)f=t(f);i+=s(f,b,u)+a}i=i.slice(0,a.length*-1);i+=C}i.slice(0,-1);if(g.bIncFooter){c=0;for(d=e.aoColumns.length;c<d;c++)if(e.aoColumns[c].nTf!==null&&(g.bIncHiddenColumns===true||e.aoColumns[c].bVisible)){f=e.aoColumns[c].nTf.innerHTML.replace(/\n/g," ").replace(/<.*?>/g,"");if(f.indexOf("&")!=-1)f=t(f);i+=s(f,b,u)+a}i=i.slice(0,a.length*-1)}return x=i}var g,F,m=[],z=0,n=null,e,x,l;return E(p)}
16.88 +typeof j.fn.dataTable=="function"&&typeof j.fn.dataTableExt.sVersion!="undefined"?j.fn.dataTableExt.aoFeatures.push({fnInit:function(p){return new D({oDTSettings:p})},cFeature:"T",sFeature:"TableTools"}):alert("Warning: TableTools requires DataTables 1.5 or greater - www.datatables.net/download")})(jQuery);
17.1 Binary file static/dataTables/extras/TableTools/media/js/TableTools.min.js.gz has changed
18.1 Binary file static/dataTables/extras/TableTools/media/swf/ZeroClipboard.swf has changed
19.1 --- a/static/dataTables/media/css/demo_page.css Mon Aug 16 14:55:21 2010 +0200
19.2 +++ b/static/dataTables/media/css/demo_page.css Fri Aug 20 17:39:19 2010 +0200
19.3 @@ -81,7 +81,7 @@
19.4 }
19.5
19.6 #dt_example ul {
19.7 - color: #B0BED9;
19.8 + color: #4E6CA3;
19.9 }
19.10
19.11 .css_right {
20.1 --- a/static/dataTables/media/css/demo_table.css Mon Aug 16 14:55:21 2010 +0200
20.2 +++ b/static/dataTables/media/css/demo_table.css Fri Aug 20 17:39:19 2010 +0200
20.3 @@ -108,8 +108,21 @@
20.4 */
20.5 table.display {
20.6 margin: 0 auto;
20.7 + clear: both;
20.8 width: 100%;
20.9 - clear: both;
20.10 +
20.11 + /* Note Firefox 3.5 and before have a bug with border-collapse
20.12 + * ( https://bugzilla.mozilla.org/show%5Fbug.cgi?id=155955 )
20.13 + * border-spacing: 0; is one possible option. Conditional-css.com is
20.14 + * useful for this kind of thing
20.15 + *
20.16 + * Further note IE 6/7 has problems when calculating widths with border width.
20.17 + * It subtracts one px relative to the other browsers from the first column, and
20.18 + * adds one to the end...
20.19 + *
20.20 + * If you want that effect I'd suggest setting a border-top/left on th/td's and
20.21 + * then filling in the gaps with other borders.
20.22 + */
20.23 }
20.24
20.25 table.display thead th {
20.26 @@ -121,7 +134,7 @@
20.27 }
20.28
20.29 table.display tfoot th {
20.30 - padding: 3px 10px;
20.31 + padding: 3px 18px 3px 10px;
20.32 border-top: 1px solid black;
20.33 font-weight: bold;
20.34 }
20.35 @@ -179,14 +192,6 @@
20.36 background-color: #eeffee;
20.37 }
20.38
20.39 -table.display tr.odd.gradeA {
20.40 - background-color: #ddffdd;
20.41 -}
20.42 -
20.43 -table.display tr.even.gradeA {
20.44 - background-color: #eeffee;
20.45 -}
20.46 -
20.47 table.display tr.odd.gradeC {
20.48 background-color: #ddddff;
20.49 }
20.50 @@ -227,6 +232,14 @@
20.51 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
20.52 * Misc
20.53 */
20.54 +.dataTables_scroll {
20.55 + clear: both;
20.56 +}
20.57 +
20.58 +.dataTables_scrollBody {
20.59 + *margin-top: -1px;
20.60 +}
20.61 +
20.62 .top, .bottom {
20.63 padding: 15px;
20.64 background-color: #F5F5F5;
20.65 @@ -313,7 +326,6 @@
20.66 * Sorting classes for columns
20.67 */
20.68 /* For the standard odd/even */
20.69 -/*
20.70 tr.odd td.sorting_1 {
20.71 background-color: #D3D6FF;
20.72 }
20.73 @@ -337,7 +349,7 @@
20.74 tr.even td.sorting_3 {
20.75 background-color: #F9F9FF;
20.76 }
20.77 -*/
20.78 +
20.79
20.80 /* For the Conditional-CSS grading rows */
20.81 /*
20.82 @@ -457,6 +469,38 @@
20.83 background-color: #E6FF99;
20.84 }
20.85
20.86 +.ex_highlight_row #example tr.even:hover {
20.87 + background-color: #ECFFB3;
20.88 +}
20.89 +
20.90 +.ex_highlight_row #example tr.even:hover td.sorting_1 {
20.91 + background-color: #DDFF75;
20.92 +}
20.93 +
20.94 +.ex_highlight_row #example tr.even:hover td.sorting_2 {
20.95 + background-color: #E7FF9E;
20.96 +}
20.97 +
20.98 +.ex_highlight_row #example tr.even:hover td.sorting_3 {
20.99 + background-color: #E2FF89;
20.100 +}
20.101 +
20.102 +.ex_highlight_row #example tr.odd:hover {
20.103 + background-color: #E6FF99;
20.104 +}
20.105 +
20.106 +.ex_highlight_row #example tr.odd:hover td.sorting_1 {
20.107 + background-color: #D6FF5C;
20.108 +}
20.109 +
20.110 +.ex_highlight_row #example tr.odd:hover td.sorting_2 {
20.111 + background-color: #E0FF84;
20.112 +}
20.113 +
20.114 +.ex_highlight_row #example tr.odd:hover td.sorting_3 {
20.115 + background-color: #DBFF70;
20.116 +}
20.117 +
20.118
20.119 /*
20.120 * KeyTable
21.1 --- a/static/dataTables/media/css/demo_table_jui.css Mon Aug 16 14:55:21 2010 +0200
21.2 +++ b/static/dataTables/media/css/demo_table_jui.css Fri Aug 20 17:39:19 2010 +0200
21.3 @@ -149,12 +149,13 @@
21.4 margin: 0 auto;
21.5 width: 100%;
21.6 clear: both;
21.7 + border-collapse: collapse;
21.8 }
21.9
21.10 table.display tfoot th {
21.11 - padding: 3px 10px;
21.12 - border-top: 1px solid black;
21.13 + padding: 3px 0px 3px 10px;
21.14 font-weight: bold;
21.15 + font-weight: normal;
21.16 }
21.17
21.18 table.display tr.heading2 td {
21.19 @@ -252,6 +253,10 @@
21.20 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
21.21 * Misc
21.22 */
21.23 +.dataTables_scroll {
21.24 + clear: both;
21.25 +}
21.26 +
21.27 .top, .bottom {
21.28 padding: 15px;
21.29 background-color: #F5F5F5;
22.1 --- a/static/dataTables/media/js/jquery.dataTables.js Mon Aug 16 14:55:21 2010 +0200
22.2 +++ b/static/dataTables/media/js/jquery.dataTables.js Fri Aug 20 17:39:19 2010 +0200
22.3 @@ -1,6 +1,6 @@
22.4 /*
22.5 * File: jquery.dataTables.js
22.6 - * Version: 1.6.1
22.7 + * Version: 1.7.0
22.8 * CVS: $Id$
22.9 * Description: Paginate, search and sort HTML tables
22.10 * Author: Allan Jardine (www.sprymedia.co.uk)
22.11 @@ -20,7 +20,7 @@
22.12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22.13 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
22.14 *
22.15 - * For details pleease refer to: http://www.datatables.net
22.16 + * For details please refer to: http://www.datatables.net
22.17 */
22.18
22.19 /*
22.20 @@ -28,9 +28,9 @@
22.21 * building the dynamic multi-column sort functions.
22.22 */
22.23 /*jslint evil: true, undef: true, browser: true */
22.24 -/*globals $, jQuery,_fnReadCookie,_fnProcessingDisplay,_fnDraw,_fnSort,_fnReDraw,_fnDetectType,_fnSortingClasses,_fnSettingsFromNode,_fnBuildSearchArray,_fnCalculateEnd,_fnFeatureHtmlProcessing,_fnFeatureHtmlPaginate,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlFilter,_fnFilter,_fnSaveState,_fnFilterColumn,_fnEscapeRegex,_fnFilterComplete,_fnFeatureHtmlLength,_fnGetDataMaster,_fnVisibleToColumnIndex,_fnDrawHead,_fnAddData,_fnGetTrNodes,_fnGetTdNodes,_fnColumnIndexToVisible,_fnCreateCookie,_fnAddOptionsHtml,_fnMap,_fnClearTable,_fnDataToSearch,_fnReOrderIndex,_fnFilterCustom,_fnNodeToDataIndex,_fnVisbleColumns,_fnAjaxUpdate,_fnAjaxUpdateDraw,_fnColumnOrdering,fnGetMaxLenString,_fnSortAttachListener,_fnPageChange*/
22.25 +/*globals $, jQuery,_fnExternApiFunc,_fnInitalise,_fnLanguageProcess,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnGatherData,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxUpdateDraw,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnArrayCmp,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap*/
22.26
22.27 -(function($) {
22.28 +(function($, window, document) {
22.29 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
22.30 * Section - DataTables variables
22.31 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
22.32 @@ -70,7 +70,14 @@
22.33 * Notes: Allowed format is a.b.c.d.e where:
22.34 * a:int, b:int, c:int, d:string(dev|beta), e:int. d and e are optional
22.35 */
22.36 - _oExt.sVersion = "1.6.1";
22.37 + _oExt.sVersion = "1.7.0";
22.38 +
22.39 + /*
22.40 + * Variable: sErrMode
22.41 + * Purpose: How should DataTables report an error. Can take the value 'alert' or 'throw'
22.42 + * Scope: jQuery.fn.dataTableExt
22.43 + */
22.44 + _oExt.sErrMode = "alert";
22.45
22.46 /*
22.47 * Variable: iApiIndex
22.48 @@ -171,13 +178,24 @@
22.49 "sSortable": "sorting", /* Sortable in both directions */
22.50 "sSortableAsc": "sorting_asc_disabled",
22.51 "sSortableDesc": "sorting_desc_disabled",
22.52 - "sSortableNone": "",
22.53 + "sSortableNone": "sorting_disabled",
22.54 "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
22.55 "sSortJUIAsc": "",
22.56 "sSortJUIDesc": "",
22.57 "sSortJUI": "",
22.58 "sSortJUIAscAllowed": "",
22.59 - "sSortJUIDescAllowed": ""
22.60 + "sSortJUIDescAllowed": "",
22.61 +
22.62 + /* Scrolling */
22.63 + "sScrollWrapper": "dataTables_scroll",
22.64 + "sScrollHead": "dataTables_scrollHead",
22.65 + "sScrollHeadInner": "dataTables_scrollHeadInner",
22.66 + "sScrollBody": "dataTables_scrollBody",
22.67 + "sScrollFoot": "dataTables_scrollFoot",
22.68 + "sScrollFootInner": "dataTables_scrollFootInner",
22.69 +
22.70 + /* Misc */
22.71 + "sFooterTH": ""
22.72 };
22.73
22.74 /*
22.75 @@ -230,7 +248,18 @@
22.76 "sSortJUIDesc": "css_right ui-icon ui-icon-triangle-1-s",
22.77 "sSortJUI": "css_right ui-icon ui-icon-carat-2-n-s",
22.78 "sSortJUIAscAllowed": "css_right ui-icon ui-icon-carat-1-n",
22.79 - "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s"
22.80 + "sSortJUIDescAllowed": "css_right ui-icon ui-icon-carat-1-s",
22.81 +
22.82 + /* Scrolling */
22.83 + "sScrollWrapper": "dataTables_scroll",
22.84 + "sScrollHead": "dataTables_scrollHead ui-state-default",
22.85 + "sScrollHeadInner": "dataTables_scrollHeadInner",
22.86 + "sScrollBody": "dataTables_scrollBody",
22.87 + "sScrollFoot": "dataTables_scrollFoot ui-state-default",
22.88 + "sScrollFootInner": "dataTables_scrollFootInner",
22.89 +
22.90 + /* Misc */
22.91 + "sFooterTH": "ui-state-default"
22.92 };
22.93
22.94 /*
22.95 @@ -289,13 +318,18 @@
22.96 nPaging.appendChild( nNext );
22.97
22.98 $(nPrevious).click( function() {
22.99 - oSettings.oApi._fnPageChange( oSettings, "previous" );
22.100 - fnCallbackDraw( oSettings );
22.101 + if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) )
22.102 + {
22.103 + /* Only draw when the page has actually changed */
22.104 + fnCallbackDraw( oSettings );
22.105 + }
22.106 } );
22.107
22.108 $(nNext).click( function() {
22.109 - oSettings.oApi._fnPageChange( oSettings, "next" );
22.110 - fnCallbackDraw( oSettings );
22.111 + if ( oSettings.oApi._fnPageChange( oSettings, "next" ) )
22.112 + {
22.113 + fnCallbackDraw( oSettings );
22.114 + }
22.115 } );
22.116
22.117 /* Take the brutal approach to cancelling text selection */
22.118 @@ -391,23 +425,31 @@
22.119 nPaging.appendChild( nLast );
22.120
22.121 $(nFirst).click( function () {
22.122 - oSettings.oApi._fnPageChange( oSettings, "first" );
22.123 - fnCallbackDraw( oSettings );
22.124 + if ( oSettings.oApi._fnPageChange( oSettings, "first" ) )
22.125 + {
22.126 + fnCallbackDraw( oSettings );
22.127 + }
22.128 } );
22.129
22.130 $(nPrevious).click( function() {
22.131 - oSettings.oApi._fnPageChange( oSettings, "previous" );
22.132 - fnCallbackDraw( oSettings );
22.133 + if ( oSettings.oApi._fnPageChange( oSettings, "previous" ) )
22.134 + {
22.135 + fnCallbackDraw( oSettings );
22.136 + }
22.137 } );
22.138
22.139 $(nNext).click( function() {
22.140 - oSettings.oApi._fnPageChange( oSettings, "next" );
22.141 - fnCallbackDraw( oSettings );
22.142 + if ( oSettings.oApi._fnPageChange( oSettings, "next" ) )
22.143 + {
22.144 + fnCallbackDraw( oSettings );
22.145 + }
22.146 } );
22.147
22.148 $(nLast).click( function() {
22.149 - oSettings.oApi._fnPageChange( oSettings, "last" );
22.150 - fnCallbackDraw( oSettings );
22.151 + if ( oSettings.oApi._fnPageChange( oSettings, "last" ) )
22.152 + {
22.153 + fnCallbackDraw( oSettings );
22.154 + }
22.155 } );
22.156
22.157 /* Take the brutal approach to cancelling text selection */
22.158 @@ -533,7 +575,7 @@
22.159 anStatic[1].className += " "+oClasses.sPageButton;
22.160 }
22.161
22.162 - if ( iCurrentPage == iPages || oSettings._iDisplayLength == -1 )
22.163 + if ( iPages === 0 || iCurrentPage == iPages || oSettings._iDisplayLength == -1 )
22.164 {
22.165 anStatic[2].className += " "+oClasses.sPageButtonStaticDisabled;
22.166 anStatic[3].className += " "+oClasses.sPageButtonStaticDisabled;
22.167 @@ -602,11 +644,11 @@
22.168 var x = Date.parse( a );
22.169 var y = Date.parse( b );
22.170
22.171 - if ( isNaN( x ) )
22.172 + if ( isNaN(x) || x==="" )
22.173 {
22.174 x = Date.parse( "01/01/1970 00:00:00" );
22.175 }
22.176 - if ( isNaN( y ) )
22.177 + if ( isNaN(y) || y==="" )
22.178 {
22.179 y = Date.parse( "01/01/1970 00:00:00" );
22.180 }
22.181 @@ -619,11 +661,11 @@
22.182 var x = Date.parse( a );
22.183 var y = Date.parse( b );
22.184
22.185 - if ( isNaN( x ) )
22.186 + if ( isNaN(x) || x==="" )
22.187 {
22.188 x = Date.parse( "01/01/1970 00:00:00" );
22.189 }
22.190 - if ( isNaN( y ) )
22.191 + if ( isNaN(y) || y==="" )
22.192 {
22.193 y = Date.parse( "01/01/1970 00:00:00" );
22.194 }
22.195 @@ -637,15 +679,15 @@
22.196 */
22.197 "numeric-asc": function ( a, b )
22.198 {
22.199 - var x = a == "-" ? 0 : a;
22.200 - var y = b == "-" ? 0 : b;
22.201 + var x = (a=="-" || a==="") ? 0 : a*1;
22.202 + var y = (b=="-" || b==="") ? 0 : b*1;
22.203 return x - y;
22.204 },
22.205
22.206 "numeric-desc": function ( a, b )
22.207 {
22.208 - var x = a == "-" ? 0 : a;
22.209 - var y = b == "-" ? 0 : b;
22.210 + var x = (a=="-" || a==="") ? 0 : a*1;
22.211 + var y = (b=="-" || b==="") ? 0 : b*1;
22.212 return y - x;
22.213 }
22.214 };
22.215 @@ -661,6 +703,8 @@
22.216 * function should return null such that the parser and move on to check the next type.
22.217 * Note that ordering is important in this array - the functions are processed linearly,
22.218 * starting at index 0.
22.219 + * Note that the input for these functions is always a string! It cannot be any other data
22.220 + * type
22.221 */
22.222 _oExt.aTypes = [
22.223 /*
22.224 @@ -671,15 +715,11 @@
22.225 */
22.226 function ( sData )
22.227 {
22.228 - /* Sanity check that we are dealing with a string or quick return for a number */
22.229 - if ( typeof sData == 'number' )
22.230 + /* Allow zero length strings as a number */
22.231 + if ( sData.length === 0 )
22.232 {
22.233 return 'numeric';
22.234 }
22.235 - else if ( typeof sData.charAt != 'function' )
22.236 - {
22.237 - return null;
22.238 - }
22.239
22.240 var sValidFirstChars = "0123456789-";
22.241 var sValidChars = "0123456789.";
22.242 @@ -725,14 +765,61 @@
22.243 function ( sData )
22.244 {
22.245 var iParse = Date.parse(sData);
22.246 - if ( iParse !== null && !isNaN(iParse) )
22.247 + if ( (iParse !== null && !isNaN(iParse)) || sData.length === 0 )
22.248 {
22.249 return 'date';
22.250 }
22.251 return null;
22.252 + },
22.253 +
22.254 + /*
22.255 + * Function: -
22.256 + * Purpose: Check to see if a string should be treated as an HTML string
22.257 + * Returns: string:'html' or null
22.258 + * Inputs: string:sText - string to check
22.259 + */
22.260 + function ( sData )
22.261 + {
22.262 + if ( sData.indexOf('<') != -1 && sData.indexOf('>') != -1 )
22.263 + {
22.264 + return 'html';
22.265 + }
22.266 + return null;
22.267 }
22.268 ];
22.269
22.270 + /*
22.271 + * Function: fnVersionCheck
22.272 + * Purpose: Check a version string against this version of DataTables. Useful for plug-ins
22.273 + * Returns: bool:true -this version of DataTables is greater or equal to the required version
22.274 + * false -this version of DataTales is not suitable
22.275 + * Inputs: string:sVersion - the version to check against. May be in the following formats:
22.276 + * "a", "a.b" or "a.b.c"
22.277 + * Notes: This function will only check the first three parts of a version string. It is
22.278 + * assumed that beta and dev versions will meet the requirements. This might change in future
22.279 + */
22.280 + _oExt.fnVersionCheck = function( sVersion )
22.281 + {
22.282 + /* This is cheap, but very effective */
22.283 + var fnZPad = function (Zpad, count)
22.284 + {
22.285 + while(Zpad.length < count) {
22.286 + Zpad += '0';
22.287 + }
22.288 + return Zpad;
22.289 + };
22.290 + var aThis = _oExt.sVersion.split('.');
22.291 + var aThat = sVersion.split('.');
22.292 + var sThis = '', sThat = '';
22.293 +
22.294 + for ( var i=0, iLen=aThat.length ; i<iLen ; i++ )
22.295 + {
22.296 + sThis += fnZPad( aThis[i], 3 );
22.297 + sThat += fnZPad( aThat[i], 3 );
22.298 + }
22.299 +
22.300 + return parseInt(sThis, 10) >= parseInt(sThat, 10);
22.301 + };
22.302
22.303 /*
22.304 * Variable: _oExternConfig
22.305 @@ -787,13 +874,25 @@
22.306 this.fnDisplayEnd = function ()
22.307 {
22.308 if ( this.oFeatures.bServerSide ) {
22.309 - return this._iDisplayStart + this.aiDisplay.length;
22.310 + if ( this.oFeatures.bPaginate === false ) {
22.311 + return this._iDisplayStart+this.aiDisplay.length;
22.312 + } else {
22.313 + return Math.min( this._iDisplayStart+this._iDisplayLength,
22.314 + this._iDisplayStart+this.aiDisplay.length );
22.315 + }
22.316 } else {
22.317 return this._iDisplayEnd;
22.318 }
22.319 };
22.320
22.321 /*
22.322 + * Variable: oInstance
22.323 + * Purpose: The DataTables object for this table
22.324 + * Scope: jQuery.dataTable.classSettings
22.325 + */
22.326 + this.oInstance = null;
22.327 +
22.328 + /*
22.329 * Variable: sInstance
22.330 * Purpose: Unique idendifier for each instance of the DataTables object
22.331 * Scope: jQuery.dataTable.classSettings
22.332 @@ -819,6 +918,19 @@
22.333 };
22.334
22.335 /*
22.336 + * Variable: oScroll
22.337 + * Purpose: Container for scrolling options
22.338 + * Scope: jQuery.dataTable.classSettings
22.339 + */
22.340 + this.oScroll = {
22.341 + "sX": "",
22.342 + "sXInner": "",
22.343 + "sY": "",
22.344 + "bCollapse": false,
22.345 + "iBarWidth": 0
22.346 + };
22.347 +
22.348 + /*
22.349 * Variable: aanFeatures
22.350 * Purpose: Array referencing the nodes which are used for the features
22.351 * Scope: jQuery.dataTable.classSettings
22.352 @@ -843,6 +955,7 @@
22.353 "sProcessing": "Processing...",
22.354 "sLengthMenu": "Show _MENU_ entries",
22.355 "sZeroRecords": "No matching records found",
22.356 + "sEmptyTable": "No data available in table",
22.357 "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
22.358 "sInfoEmpty": "Showing 0 to 0 of 0 entries",
22.359 "sInfoFiltered": "(filtered from _MAX_ total entries)",
22.360 @@ -913,7 +1026,8 @@
22.361 */
22.362 this.oPreviousSearch = {
22.363 "sSearch": "",
22.364 - "bEscapeRegex": true
22.365 + "bRegex": false,
22.366 + "bSmart": true
22.367 };
22.368
22.369 /*
22.370 @@ -948,6 +1062,13 @@
22.371 this.asStripClasses = [];
22.372
22.373 /*
22.374 + * Variable: asDestoryStrips
22.375 + * Purpose: If restoring a table - we should restore it's striping classes as well
22.376 + * Scope: jQuery.dataTable.classSettings
22.377 + */
22.378 + this.asDestoryStrips = [];
22.379 +
22.380 + /*
22.381 * Variable: fnRowCallback
22.382 * Purpose: Call this function every time a row is inserted (draw)
22.383 * Scope: jQuery.dataTable.classSettings
22.384 @@ -1000,6 +1121,34 @@
22.385 this.nTable = null;
22.386
22.387 /*
22.388 + * Variable: nTHead
22.389 + * Purpose: Permanent ref to the thead element
22.390 + * Scope: jQuery.dataTable.classSettings
22.391 + */
22.392 + this.nTHead = null;
22.393 +
22.394 + /*
22.395 + * Variable: nTFoot
22.396 + * Purpose: Permanent ref to the tfoot element - if it exists
22.397 + * Scope: jQuery.dataTable.classSettings
22.398 + */
22.399 + this.nTFoot = null;
22.400 +
22.401 + /*
22.402 + * Variable: nTBody
22.403 + * Purpose: Permanent ref to the tbody element
22.404 + * Scope: jQuery.dataTable.classSettings
22.405 + */
22.406 + this.nTBody = null;
22.407 +
22.408 + /*
22.409 + * Variable: nTableWrapper
22.410 + * Purpose: Cache the wrapper node (contains all DataTables controlled elements)
22.411 + * Scope: jQuery.dataTable.classSettings
22.412 + */
22.413 + this.nTableWrapper = null;
22.414 +
22.415 + /*
22.416 * Variable: iDefaultSortIndex
22.417 * Purpose: Sorting index which will be used by default
22.418 * Scope: jQuery.dataTable.classSettings
22.419 @@ -1059,6 +1208,13 @@
22.420 this.iCookieDuration = 60 * 60 * 2;
22.421
22.422 /*
22.423 + * Variable: sCookiePrefix
22.424 + * Purpose: The cookie name prefix
22.425 + * Scope: jQuery.dataTable.classSettings
22.426 + */
22.427 + this.sCookiePrefix = "SpryMedia_DataTables_";
22.428 +
22.429 + /*
22.430 * Variable: sAjaxSource
22.431 * Purpose: Source url for AJAX data for the table
22.432 * Scope: jQuery.dataTable.classSettings
22.433 @@ -1077,14 +1233,73 @@
22.434 * Purpose: Function to get the server-side data - can be overruled by the developer
22.435 * Scope: jQuery.dataTable.classSettings
22.436 */
22.437 - this.fnServerData = $.getJSON;
22.438 + this.fnServerData = function ( url, data, callback ) {
22.439 + $.ajax( {
22.440 + "url": url,
22.441 + "data": data,
22.442 + "success": callback,
22.443 + "dataType": "json",
22.444 + "cache": false,
22.445 + "error": function () {
22.446 + alert( "DataTables warning: JSON data from server failed to load or be parsed. "+
22.447 + "This is most likely to be caused by a JSON formatting error." );
22.448 + }
22.449 + } );
22.450 + };
22.451
22.452 /*
22.453 - * Variable: iServerDraw
22.454 - * Purpose: Counter and tracker for server-side processing draws
22.455 + * Variable: fnFormatNumber
22.456 + * Purpose: Format numbers for display
22.457 * Scope: jQuery.dataTable.classSettings
22.458 */
22.459 - this.iServerDraw = 0;
22.460 + this.fnFormatNumber = function ( iIn )
22.461 + {
22.462 + if ( iIn < 1000 )
22.463 + {
22.464 + /* A small optimisation for what is likely to be the vast majority of use cases */
22.465 + return iIn;
22.466 + }
22.467 + else
22.468 + {
22.469 + var s=(iIn+""), a=s.split(""), out="", iLen=s.length;
22.470 +
22.471 + for ( var i=0 ; i<iLen ; i++ )
22.472 + {
22.473 + if ( i%3 === 0 && i !== 0 )
22.474 + {
22.475 + out = ','+out;
22.476 + }
22.477 + out = a[iLen-i-1]+out;
22.478 + }
22.479 + }
22.480 + return out;
22.481 + };
22.482 +
22.483 + /*
22.484 + * Variable: aLengthMenu
22.485 + * Purpose: List of options that can be used for the user selectable length menu
22.486 + * Scope: jQuery.dataTable.classSettings
22.487 + * Note: This varaible can take for form of a 1D array, in which case the value and the
22.488 + * displayed value in the menu are the same, or a 2D array in which case the value comes
22.489 + * from the first array, and the displayed value to the end user comes from the second
22.490 + * array. 2D example: [ [ 10, 25, 50, 100, -1 ], [ 10, 25, 50, 100, 'All' ] ];
22.491 + */
22.492 + this.aLengthMenu = [ 10, 25, 50, 100 ];
22.493 +
22.494 + /*
22.495 + * Variable: iDraw
22.496 + * Purpose: Counter for the draws that the table does. Also used as a tracker for
22.497 + * server-side processing
22.498 + * Scope: jQuery.dataTable.classSettings
22.499 + */
22.500 + this.iDraw = 0;
22.501 +
22.502 + /*
22.503 + * Variable: iDrawError
22.504 + * Purpose: Last draw error
22.505 + * Scope: jQuery.dataTable.classSettings
22.506 + */
22.507 + this.iDrawError = -1;
22.508
22.509 /*
22.510 * Variable: _iDisplayLength, _iDisplayStart, _iDisplayEnd
22.511 @@ -1123,11 +1338,18 @@
22.512
22.513 /*
22.514 * Variable: bFiltered and bSorted
22.515 - * Purpose: Flag to allow callback functions to see what action has been performed
22.516 + * Purpose: Flags to allow callback functions to see what actions have been performed
22.517 * Scope: jQuery.dataTable.classSettings
22.518 */
22.519 this.bFiltered = false;
22.520 this.bSorted = false;
22.521 +
22.522 + /*
22.523 + * Variable: oInit
22.524 + * Purpose: Initialisation object that is used for the table
22.525 + * Scope: jQuery.dataTable.classSettings
22.526 + */
22.527 + this.oInit = null;
22.528 }
22.529
22.530 /*
22.531 @@ -1169,27 +1391,59 @@
22.532 * Returns: -
22.533 * Inputs: string:sInput - string to filter the table on
22.534 * int:iColumn - optional - column to limit filtering to
22.535 - * bool:bEscapeRegex - optional - escape regex characters or not - default true
22.536 + * bool:bRegex - optional - treat as regular expression or not - default false
22.537 + * bool:bSmart - optional - perform smart filtering or not - default true
22.538 + * bool:bShowGlobal - optional - show the input global filter in it's input box(es)
22.539 + * - default true
22.540 */
22.541 - this.fnFilter = function( sInput, iColumn, bEscapeRegex )
22.542 + this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal )
22.543 {
22.544 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.545
22.546 - if ( typeof bEscapeRegex == 'undefined' )
22.547 - {
22.548 - bEscapeRegex = true;
22.549 + if ( !oSettings.oFeatures.bFilter )
22.550 + {
22.551 + return;
22.552 + }
22.553 +
22.554 + if ( typeof bRegex == 'undefined' )
22.555 + {
22.556 + bRegex = false;
22.557 + }
22.558 +
22.559 + if ( typeof bSmart == 'undefined' )
22.560 + {
22.561 + bSmart = true;
22.562 + }
22.563 +
22.564 + if ( typeof bShowGlobal == 'undefined' )
22.565 + {
22.566 + bShowGlobal = true;
22.567 }
22.568
22.569 if ( typeof iColumn == "undefined" || iColumn === null )
22.570 {
22.571 /* Global filter */
22.572 - _fnFilterComplete( oSettings, {"sSearch":sInput, "bEscapeRegex": bEscapeRegex}, 1 );
22.573 + _fnFilterComplete( oSettings, {
22.574 + "sSearch":sInput,
22.575 + "bRegex": bRegex,
22.576 + "bSmart": bSmart
22.577 + }, 1 );
22.578 +
22.579 + if ( bShowGlobal && typeof oSettings.aanFeatures.f != 'undefined' )
22.580 + {
22.581 + var n = oSettings.aanFeatures.f;
22.582 + for ( var i=0, iLen=n.length ; i<iLen ; i++ )
22.583 + {
22.584 + $('input', n[i]).val( sInput );
22.585 + }
22.586 + }
22.587 }
22.588 else
22.589 {
22.590 /* Single column filter */
22.591 oSettings.aoPreSearchCols[ iColumn ].sSearch = sInput;
22.592 - oSettings.aoPreSearchCols[ iColumn ].bEscapeRegex = bEscapeRegex;
22.593 + oSettings.aoPreSearchCols[ iColumn ].bRegex = bRegex;
22.594 + oSettings.aoPreSearchCols[ iColumn ].bSmart = bSmart;
22.595 _fnFilterComplete( oSettings, oSettings.oPreviousSearch, 1 );
22.596 }
22.597 };
22.598 @@ -1207,36 +1461,9 @@
22.599
22.600 /*
22.601 * Function: fnVersionCheck
22.602 - * Purpose: Check a version string against this version of DataTables. Useful for plug-ins
22.603 - * Returns: bool:true -this version of DataTables is greater or equal to the required version
22.604 - * false -this version of DataTales is not suitable
22.605 - * Inputs: string:sVersion - the version to check against. May be in the following formats:
22.606 - * "a", "a.b" or "a.b.c"
22.607 - * Notes: This function will only check the first three parts of a version string. It is
22.608 - * assumed that beta and dev versions will meet the requirements. This might change in future
22.609 + * Notes: The function is the same as the 'static' function provided in the ext variable
22.610 */
22.611 - this.fnVersionCheck = function( sVersion )
22.612 - {
22.613 - /* This is cheap, but very effective */
22.614 - var fnZPad = function (Zpad, count)
22.615 - {
22.616 - while(Zpad.length < count) {
22.617 - Zpad += '0';
22.618 - }
22.619 - return Zpad;
22.620 - };
22.621 - var aThis = _oExt.sVersion.split('.');
22.622 - var aThat = sVersion.split('.');
22.623 - var sThis = '', sThat = '';
22.624 -
22.625 - for ( var i=0, iLen=aThat.length ; i<iLen ; i++ )
22.626 - {
22.627 - sThis += fnZPad( aThis[i], 3 );
22.628 - sThat += fnZPad( aThat[i], 3 );
22.629 - }
22.630 -
22.631 - return parseInt(sThis, 10) >= parseInt(sThat, 10);
22.632 - };
22.633 + this.fnVersionCheck = _oExt.fnVersionCheck;
22.634
22.635 /*
22.636 * Function: fnSort
22.637 @@ -1335,16 +1562,9 @@
22.638 * int: - index of aoData to be deleted, or
22.639 * node(TR): - TR element you want to delete
22.640 * function:fnCallBack - callback function - default null
22.641 - * bool:bNullRow - remove the row information from aoData by setting the value to
22.642 - * null - default false
22.643 - * Notes: This function requires a little explanation - we don't actually delete the data
22.644 - * from aoData - rather we remove it's references from aiDisplayMastr and aiDisplay. This
22.645 - * in effect prevnts DataTables from drawing it (hence deleting it) - it could be restored
22.646 - * if you really wanted. The reason for this is that actually removing the aoData object
22.647 - * would mess up all the subsequent indexes in the display arrays (they could be ajusted -
22.648 - * but this appears to do what is required).
22.649 + * bool:bRedraw - redraw the table or not - default true
22.650 */
22.651 - this.fnDeleteRow = function( mTarget, fnCallBack, bNullRow )
22.652 + this.fnDeleteRow = function( mTarget, fnCallBack, bRedraw )
22.653 {
22.654 /* Find settings from table node */
22.655 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.656 @@ -1353,25 +1573,12 @@
22.657 iAODataIndex = (typeof mTarget == 'object') ?
22.658 _fnNodeToDataIndex(oSettings, mTarget) : mTarget;
22.659
22.660 - /* Delete from the display master */
22.661 - for ( i=0 ; i<oSettings.aiDisplayMaster.length ; i++ )
22.662 - {
22.663 - if ( oSettings.aiDisplayMaster[i] == iAODataIndex )
22.664 - {
22.665 - oSettings.aiDisplayMaster.splice( i, 1 );
22.666 - break;
22.667 - }
22.668 - }
22.669 -
22.670 - /* Delete from the current display index */
22.671 - for ( i=0 ; i<oSettings.aiDisplay.length ; i++ )
22.672 - {
22.673 - if ( oSettings.aiDisplay[i] == iAODataIndex )
22.674 - {
22.675 - oSettings.aiDisplay.splice( i, 1 );
22.676 - break;
22.677 - }
22.678 - }
22.679 + /* Return the data array from this row */
22.680 + var oData = oSettings.aoData.splice( iAODataIndex, 1 );
22.681 +
22.682 + /* Delete from the display arrays */
22.683 + _fnDeleteIndex( oSettings.aiDisplayMaster, iAODataIndex );
22.684 + _fnDeleteIndex( oSettings.aiDisplay, iAODataIndex );
22.685
22.686 /* Rebuild the search */
22.687 _fnBuildSearchArray( oSettings, 1 );
22.688 @@ -1379,7 +1586,7 @@
22.689 /* If there is a user callback function - call it */
22.690 if ( typeof fnCallBack == "function" )
22.691 {
22.692 - fnCallBack.call( this );
22.693 + fnCallBack.call( this, oSettings, oData );
22.694 }
22.695
22.696 /* Check for an 'overflow' they case for dislaying the table */
22.697 @@ -1392,18 +1599,13 @@
22.698 }
22.699 }
22.700
22.701 - _fnCalculateEnd( oSettings );
22.702 - _fnDraw( oSettings );
22.703 -
22.704 - /* Return the data array from this row */
22.705 - var aData = oSettings.aoData[iAODataIndex]._aData.slice();
22.706 -
22.707 - if ( typeof bNullRow != "undefined" && bNullRow === true )
22.708 - {
22.709 - oSettings.aoData[iAODataIndex] = null;
22.710 - }
22.711 -
22.712 - return aData;
22.713 + if ( typeof bRedraw == 'undefined' || bRedraw )
22.714 + {
22.715 + _fnCalculateEnd( oSettings );
22.716 + _fnDraw( oSettings );
22.717 + }
22.718 +
22.719 + return oData;
22.720 };
22.721
22.722 /*
22.723 @@ -1431,7 +1633,7 @@
22.724 * Returns: node:nNewRow - the row opened
22.725 * Inputs: node:nTr - the table row to 'open'
22.726 * string:sHtml - the HTML to put into the row
22.727 - * string:sClass - class to give the new cell
22.728 + * string:sClass - class to give the new TD cell
22.729 */
22.730 this.fnOpen = function( nTr, sHtml, sClass )
22.731 {
22.732 @@ -1449,22 +1651,16 @@
22.733 nNewCell.innerHTML = sHtml;
22.734
22.735 /* If the nTr isn't on the page at the moment - then we don't insert at the moment */
22.736 - var nTrs = $('tbody tr', oSettings.nTable);
22.737 + var nTrs = $('tr', oSettings.nTBody);
22.738 if ( $.inArray(nTr, nTrs) != -1 )
22.739 {
22.740 $(nNewRow).insertAfter(nTr);
22.741 }
22.742
22.743 - /* No point in storing the row if using server-side processing since the nParent will be
22.744 - * nuked on a re-draw anyway
22.745 - */
22.746 - if ( !oSettings.oFeatures.bServerSide )
22.747 - {
22.748 - oSettings.aoOpenRows.push( {
22.749 - "nTr": nNewRow,
22.750 - "nParent": nTr
22.751 - } );
22.752 - }
22.753 + oSettings.aoOpenRows.push( {
22.754 + "nTr": nNewRow,
22.755 + "nParent": nTr
22.756 + } );
22.757
22.758 return nNewRow;
22.759 };
22.760 @@ -1556,11 +1752,11 @@
22.761 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.762 var i;
22.763
22.764 - if ( nNode.nodeName == "TR" )
22.765 + if ( nNode.nodeName.toUpperCase() == "TR" )
22.766 {
22.767 return _fnNodeToDataIndex(oSettings, nNode);
22.768 }
22.769 - else if ( nNode.nodeName == "TD" )
22.770 + else if ( nNode.nodeName.toUpperCase() == "TD" )
22.771 {
22.772 var iDataIndex = _fnNodeToDataIndex(oSettings, nNode.parentNode);
22.773 var iCorrector = 0;
22.774 @@ -1592,8 +1788,10 @@
22.775 * node(TR): - TR element you want to update
22.776 * int:iColumn - the column to update - optional (not used of mData is 2D)
22.777 * bool:bRedraw - redraw the table or not - default true
22.778 + * bool:bAction - perform predraw actions or not (you will want this as 'true' if
22.779 + * you have bRedraw as true) - default true
22.780 */
22.781 - this.fnUpdate = function( mData, mRow, iColumn, bRedraw )
22.782 + this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
22.783 {
22.784 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.785 var iVisibleColumn;
22.786 @@ -1632,7 +1830,7 @@
22.787 {
22.788 if ( mData.length != oSettings.aoColumns.length )
22.789 {
22.790 - alert( 'DataTables warning: An array passed to fnUpdate must have the same number of '+
22.791 + _fnLog( oSettings, 0, 'An array passed to fnUpdate must have the same number of '+
22.792 'columns as the table in question - in this case '+oSettings.aoColumns.length );
22.793 return 1;
22.794 }
22.795 @@ -1666,11 +1864,15 @@
22.796 }
22.797 }
22.798
22.799 - /* Update the search array */
22.800 - _fnBuildSearchArray( oSettings, 1 );
22.801 + /* Perform pre-draw actions */
22.802 + if ( typeof bAction == 'undefined' || bAction )
22.803 + {
22.804 + _fnBuildSearchArray( oSettings, 1 );
22.805 + _fnAjustColumnSizing( oSettings );
22.806 + }
22.807
22.808 /* Redraw the table */
22.809 - if ( typeof bRedraw != 'undefined' && bRedraw )
22.810 + if ( typeof bRedraw == 'undefined' || bRedraw )
22.811 {
22.812 _fnReDraw( oSettings );
22.813 }
22.814 @@ -1690,7 +1892,7 @@
22.815 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.816 var i, iLen;
22.817 var iColumns = oSettings.aoColumns.length;
22.818 - var nTd;
22.819 + var nTd, anTds;
22.820
22.821 /* No point in doing anything if we are requesting what is already true */
22.822 if ( oSettings.aoColumns[iCol].bVisible == bShow )
22.823 @@ -1698,8 +1900,8 @@
22.824 return;
22.825 }
22.826
22.827 - var nTrHead = $('thead:eq(0)>tr', oSettings.nTable)[0];
22.828 - var nTrFoot = $('tfoot:eq(0)>tr', oSettings.nTable)[0];
22.829 + var nTrHead = $('>tr', oSettings.nTHead)[0];
22.830 + var nTrFoot = $('>tr', oSettings.nTFoot)[0];
22.831 var anTheadTh = [];
22.832 var anTfootTh = [];
22.833 for ( i=0 ; i<iColumns ; i++ )
22.834 @@ -1754,10 +1956,12 @@
22.835 nTrFoot.insertBefore( anTfootTh[iCol], nTrFoot.getElementsByTagName('th')[iBefore] );
22.836 }
22.837
22.838 + anTds = _fnGetTdNodes( oSettings );
22.839 for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
22.840 {
22.841 nTd = oSettings.aoData[i]._anHidden[iCol];
22.842 - oSettings.aoData[i].nTr.insertBefore( nTd, oSettings.aoData[i].nTr.getElementsByTagName('td')[iBefore] );
22.843 + oSettings.aoData[i].nTr.insertBefore( nTd, $('>td:eq('+iBefore+')',
22.844 + oSettings.aoData[i].nTr)[0] );
22.845 }
22.846 }
22.847
22.848 @@ -1772,10 +1976,10 @@
22.849 nTrFoot.removeChild( anTfootTh[iCol] );
22.850 }
22.851
22.852 - var iVisCol = _fnColumnIndexToVisible(oSettings, iCol);
22.853 + anTds = _fnGetTdNodes( oSettings );
22.854 for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
22.855 {
22.856 - nTd = oSettings.aoData[i].nTr.getElementsByTagName('td')[ iVisCol ];
22.857 + nTd = anTds[ ( i*oSettings.aoColumns.length) + (iCol*1) ];
22.858 oSettings.aoData[i]._anHidden[iCol] = nTd;
22.859 nTd.parentNode.removeChild( nTd );
22.860 }
22.861 @@ -1789,8 +1993,11 @@
22.862 oSettings.aoOpenRows[i].nTr.colSpan = _fnVisbleColumns( oSettings );
22.863 }
22.864
22.865 - /* Since there is no redraw done here, we need to save the state manually */
22.866 - _fnSaveState( oSettings );
22.867 + /* Do a redraw incase anything depending on the table columns needs it
22.868 + * (built-in: scrolling)
22.869 + */
22.870 + _fnAjustColumnSizing( oSettings );
22.871 + _fnDraw( oSettings );
22.872 };
22.873
22.874 /*
22.875 @@ -1804,13 +2011,98 @@
22.876 {
22.877 var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.878 _fnPageChange( oSettings, sAction );
22.879 + _fnCalculateEnd( oSettings );
22.880
22.881 if ( typeof bRedraw == 'undefined' || bRedraw )
22.882 {
22.883 - _fnReDraw( oSettings );
22.884 + _fnDraw( oSettings );
22.885 }
22.886 };
22.887
22.888 + /*
22.889 + * Function: fnDestroy
22.890 + * Purpose: Destructor for the DataTable
22.891 + * Returns: -
22.892 + * Inputs: -
22.893 + */
22.894 + this.fnDestroy = function ( )
22.895 + {
22.896 + var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
22.897 + var nOrig = oSettings.nTableWrapper.parentNode;
22.898 + var nBody = oSettings.nTBody;
22.899 + var i, iLen;
22.900 +
22.901 + /* Remove the DataTables generated nodes, events and classes */
22.902 + oSettings.nTable.parentNode.removeChild( oSettings.nTable );
22.903 + $(oSettings.nTableWrapper).remove();
22.904 +
22.905 + oSettings.aaSorting = [];
22.906 + oSettings.aaSortingFixed = [];
22.907 + _fnSortingClasses( oSettings );
22.908 +
22.909 + $(_fnGetTrNodes( oSettings )).removeClass( oSettings.asStripClasses.join(' ') );
22.910 +
22.911 + if ( !oSettings.bJUI )
22.912 + {
22.913 + $('th', oSettings.nTHead).removeClass( [ _oExt.oStdClasses.sSortable,
22.914 + _oExt.oStdClasses.sSortableAsc,
22.915 + _oExt.oStdClasses.sSortableDesc,
22.916 + _oExt.oStdClasses.sSortableNone ].join(' ')
22.917 + );
22.918 + }
22.919 + else
22.920 + {
22.921 + $('th', oSettings.nTHead).removeClass( [ _oExt.oStdClasses.sSortable,
22.922 + _oExt.oJUIClasses.sSortableAsc,
22.923 + _oExt.oJUIClasses.sSortableDesc,
22.924 + _oExt.oJUIClasses.sSortableNone ].join(' ')
22.925 + );
22.926 + $('th span', oSettings.nTHead).remove();
22.927 + }
22.928 +
22.929 + /* Add the TR elements back into the table in their original order */
22.930 + nOrig.appendChild( oSettings.nTable );
22.931 + for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
22.932 + {
22.933 + nBody.appendChild( oSettings.aoData[i].nTr );
22.934 + }
22.935 +
22.936 + /* If the were originally odd/even type classes - then we add them back here. Note
22.937 + * this is not fool proof (for example if not all rows as odd/even classes - but
22.938 + * it's a good effort without getting carried away
22.939 + */
22.940 + $('>tr:even', nBody).addClass( oSettings.asDestoryStrips[0] );
22.941 + $('>tr:odd', nBody).addClass( oSettings.asDestoryStrips[1] );
22.942 +
22.943 + /* Remove the settings object from the settings array */
22.944 + for ( i=0, iLen=_aoSettings.length ; i<iLen ; i++ )
22.945 + {
22.946 + if ( _aoSettings[i] == oSettings )
22.947 + {
22.948 + _aoSettings.splice( i, 1 );
22.949 + }
22.950 + }
22.951 +
22.952 + /* End it all */
22.953 + oSettings = null;
22.954 + };
22.955 +
22.956 + /*
22.957 + * Function: _fnAjustColumnSizing
22.958 + * Purpose: Update tale sizing based on content. This would most likely be used for scrolling
22.959 + * and will typically need a redraw after it.
22.960 + * Returns: -
22.961 + * Inputs: bool:bRedraw - redraw the table or not, you will typically want to - default true
22.962 + */
22.963 + this.fnAdjustColumnSizing = function ( bRedraw )
22.964 + {
22.965 + _fnAjustColumnSizing( _fnSettingsFromNode( this[_oExt.iApiIndex] ) );
22.966 +
22.967 + if ( typeof bRedraw == 'undefined' || bRedraw )
22.968 + {
22.969 + this.fnDraw( false );
22.970 + }
22.971 + };
22.972
22.973 /*
22.974 * Plugin API functions
22.975 @@ -1887,13 +2179,7 @@
22.976 */
22.977 if ( oSettings.oFeatures.bSort )
22.978 {
22.979 - _fnSort( oSettings, false );
22.980 - /*
22.981 - * Add the sorting classes to the header and the body (if needed).
22.982 - * Reason for doing it here after the first draw is to stop classes being applied to the
22.983 - * 'static' table.
22.984 - */
22.985 - _fnSortingClasses( oSettings );
22.986 + _fnSort( oSettings );
22.987 }
22.988 else
22.989 {
22.990 @@ -1907,8 +2193,7 @@
22.991 {
22.992 _fnProcessingDisplay( oSettings, true );
22.993
22.994 - oSettings.fnServerData( oSettings.sAjaxSource, null, function(json) {
22.995 -
22.996 + oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, null, function(json) {
22.997 /* Got the data - add it to the table */
22.998 for ( var i=0 ; i<json.aaData.length ; i++ )
22.999 {
22.1000 @@ -1936,7 +2221,7 @@
22.1001 /* Run the init callback if there is one */
22.1002 if ( typeof oSettings.fnInitComplete == 'function' )
22.1003 {
22.1004 - oSettings.fnInitComplete( oSettings, json );
22.1005 + oSettings.fnInitComplete.call( oSettings.oInstance, oSettings, json );
22.1006 }
22.1007 } );
22.1008 return;
22.1009 @@ -1945,7 +2230,7 @@
22.1010 /* Run the init callback if there is one */
22.1011 if ( typeof oSettings.fnInitComplete == 'function' )
22.1012 {
22.1013 - oSettings.fnInitComplete( oSettings );
22.1014 + oSettings.fnInitComplete.call( oSettings.oInstance, oSettings );
22.1015 }
22.1016
22.1017 if ( !oSettings.oFeatures.bServerSide )
22.1018 @@ -1966,6 +2251,7 @@
22.1019 {
22.1020 _fnMap( oSettings.oLanguage, oLanguage, 'sProcessing' );
22.1021 _fnMap( oSettings.oLanguage, oLanguage, 'sLengthMenu' );
22.1022 + _fnMap( oSettings.oLanguage, oLanguage, 'sEmptyTable' );
22.1023 _fnMap( oSettings.oLanguage, oLanguage, 'sZeroRecords' );
22.1024 _fnMap( oSettings.oLanguage, oLanguage, 'sInfo' );
22.1025 _fnMap( oSettings.oLanguage, oLanguage, 'sInfoEmpty' );
22.1026 @@ -1981,6 +2267,15 @@
22.1027 _fnMap( oSettings.oLanguage.oPaginate, oLanguage.oPaginate, 'sLast' );
22.1028 }
22.1029
22.1030 + /* Backwards compatibility - if there is no sEmptyTable given, then use the same as
22.1031 + * sZeroRecords - assuming that is given.
22.1032 + */
22.1033 + if ( typeof oLanguage.sEmptyTable == 'undefined' &&
22.1034 + typeof oLanguage.sZeroRecords != 'undefined' )
22.1035 + {
22.1036 + _fnMap( oSettings.oLanguage, oLanguage, 'sZeroRecords', 'sEmptyTable' );
22.1037 + }
22.1038 +
22.1039 if ( bInit )
22.1040 {
22.1041 _fnInitalise( oSettings );
22.1042 @@ -1989,15 +2284,12 @@
22.1043
22.1044 /*
22.1045 * Function: _fnAddColumn
22.1046 - * Purpose: Add a column to the list used for the table
22.1047 + * Purpose: Add a column to the list used for the table with default values
22.1048 * Returns: -
22.1049 * Inputs: object:oSettings - dataTables settings object
22.1050 - * object:oOptions - object with sType, bVisible and bSearchable
22.1051 * node:nTh - the th element for this column
22.1052 - * Notes: All options in enter column can be over-ridden by the user
22.1053 - * initialisation of dataTables
22.1054 */
22.1055 - function _fnAddColumn( oSettings, oOptions, nTh )
22.1056 + function _fnAddColumn( oSettings, nTh )
22.1057 {
22.1058 oSettings.aoColumns[ oSettings.aoColumns.length++ ] = {
22.1059 "sType": null,
22.1060 @@ -2011,6 +2303,7 @@
22.1061 "sTitle": nTh ? nTh.innerHTML : '',
22.1062 "sName": '',
22.1063 "sWidth": null,
22.1064 + "sWidthOrig": null,
22.1065 "sClass": null,
22.1066 "fnRender": null,
22.1067 "bUseRendered": true,
22.1068 @@ -2020,8 +2313,48 @@
22.1069 "nTf": null
22.1070 };
22.1071
22.1072 - var iLength = oSettings.aoColumns.length-1;
22.1073 - var oCol = oSettings.aoColumns[ iLength ];
22.1074 + var iCol = oSettings.aoColumns.length-1;
22.1075 + var oCol = oSettings.aoColumns[ iCol ];
22.1076 +
22.1077 + /* Add a column specific filter */
22.1078 + if ( typeof oSettings.aoPreSearchCols[ iCol ] == 'undefined' ||
22.1079 + oSettings.aoPreSearchCols[ iCol ] === null )
22.1080 + {
22.1081 + oSettings.aoPreSearchCols[ iCol ] = {
22.1082 + "sSearch": "",
22.1083 + "bRegex": false,
22.1084 + "bSmart": true
22.1085 + };
22.1086 + }
22.1087 + else
22.1088 + {
22.1089 + /* Don't require that the user must specify bRegex and / or bSmart */
22.1090 + if ( typeof oSettings.aoPreSearchCols[ iCol ].bRegex == 'undefined' )
22.1091 + {
22.1092 + oSettings.aoPreSearchCols[ iCol ].bRegex = true;
22.1093 + }
22.1094 +
22.1095 + if ( typeof oSettings.aoPreSearchCols[ iCol ].bSmart == 'undefined' )
22.1096 + {
22.1097 + oSettings.aoPreSearchCols[ iCol ].bSmart = true;
22.1098 + }
22.1099 + }
22.1100 +
22.1101 + /* Use the column options function to initialise classes etc */
22.1102 + _fnColumnOptions( oSettings, iCol, null );
22.1103 + }
22.1104 +
22.1105 + /*
22.1106 + * Function: _fnColumnOptions
22.1107 + * Purpose: Apply options for a column
22.1108 + * Returns: -
22.1109 + * Inputs: object:oSettings - dataTables settings object
22.1110 + * int:iCol - column index to consider
22.1111 + * object:oOptions - object with sType, bVisible and bSearchable
22.1112 + */
22.1113 + function _fnColumnOptions( oSettings, iCol, oOptions )
22.1114 + {
22.1115 + var oCol = oSettings.aoColumns[ iCol ];
22.1116
22.1117 /* User specified column options */
22.1118 if ( typeof oOptions != 'undefined' && oOptions !== null )
22.1119 @@ -2038,6 +2371,7 @@
22.1120 _fnMap( oCol, oOptions, "sTitle" );
22.1121 _fnMap( oCol, oOptions, "sName" );
22.1122 _fnMap( oCol, oOptions, "sWidth" );
22.1123 + _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
22.1124 _fnMap( oCol, oOptions, "sClass" );
22.1125 _fnMap( oCol, oOptions, "fnRender" );
22.1126 _fnMap( oCol, oOptions, "bUseRendered" );
22.1127 @@ -2069,21 +2403,6 @@
22.1128 oCol.sSortingClass = oSettings.oClasses.sSortableDesc;
22.1129 oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed;
22.1130 }
22.1131 -
22.1132 - /* Add a column specific filter */
22.1133 - if ( typeof oSettings.aoPreSearchCols[ iLength ] == 'undefined' ||
22.1134 - oSettings.aoPreSearchCols[ iLength ] === null )
22.1135 - {
22.1136 - oSettings.aoPreSearchCols[ iLength ] = {
22.1137 - "sSearch": "",
22.1138 - "bEscapeRegex": true
22.1139 - };
22.1140 - }
22.1141 - else if ( typeof oSettings.aoPreSearchCols[ iLength ].bEscapeRegex == 'undefined' )
22.1142 - {
22.1143 - /* Don't require that the user must specify bEscapeRegex */
22.1144 - oSettings.aoPreSearchCols[ iLength ].bEscapeRegex = true;
22.1145 - }
22.1146 }
22.1147
22.1148 /*
22.1149 @@ -2092,32 +2411,54 @@
22.1150 * Returns: int: - >=0 if successful (index of new aoData entry), -1 if failed
22.1151 * Inputs: object:oSettings - dataTables settings object
22.1152 * array:aData - data array to be added
22.1153 + * Notes: There are two basic methods for DataTables to get data to display - a JS array
22.1154 + * (which is dealt with by this function), and the DOM, which has it's own optimised
22.1155 + * function (_fnGatherData). Be careful to make the same changes here as there and vice-versa
22.1156 */
22.1157 - function _fnAddData ( oSettings, aData )
22.1158 + function _fnAddData ( oSettings, aDataSupplied )
22.1159 {
22.1160 /* Sanity check the length of the new array */
22.1161 - if ( aData.length != oSettings.aoColumns.length )
22.1162 - {
22.1163 - alert( "DataTables warning: Added data does not match known number of columns" );
22.1164 + if ( aDataSupplied.length != oSettings.aoColumns.length &&
22.1165 + oSettings.iDrawError != oSettings.iDraw )
22.1166 + {
22.1167 + _fnLog( oSettings, 0, "Added data does not match known number of columns" );
22.1168 + oSettings.iDrawError = oSettings.iDraw;
22.1169 return -1;
22.1170 }
22.1171
22.1172 +
22.1173 /* Create the object for storing information about this new row */
22.1174 + var aData = aDataSupplied.slice();
22.1175 var iThisIndex = oSettings.aoData.length;
22.1176 oSettings.aoData.push( {
22.1177 "nTr": document.createElement('tr'),
22.1178 "_iId": oSettings.iNextId++,
22.1179 - "_aData": aData.slice(),
22.1180 + "_aData": aData,
22.1181 "_anHidden": [],
22.1182 "_sRowStripe": ''
22.1183 } );
22.1184
22.1185 /* Create the cells */
22.1186 - var nTd;
22.1187 + var nTd, sThisType;
22.1188 for ( var i=0 ; i<aData.length ; i++ )
22.1189 {
22.1190 nTd = document.createElement('td');
22.1191
22.1192 + /* Allow null data (from a data array) - simply deal with it as a blank string */
22.1193 + if ( aData[i] === null )
22.1194 + {
22.1195 + aData[i] = '';
22.1196 + }
22.1197 +
22.1198 + /* Cast everything as a string - this allows us to treat everything accurately in the
22.1199 + * sorting functions
22.1200 + */
22.1201 + if ( typeof aData[i] != 'string' )
22.1202 + {
22.1203 + aData[i] += "";
22.1204 + }
22.1205 + aData[i] = $.trim(aData[i]);
22.1206 +
22.1207 if ( typeof oSettings.aoColumns[i].fnRender == 'function' )
22.1208 {
22.1209 var sRendered = oSettings.aoColumns[i].fnRender( {
22.1210 @@ -2147,14 +2488,15 @@
22.1211 if ( oSettings.aoColumns[i]._bAutoType && oSettings.aoColumns[i].sType != 'string' )
22.1212 {
22.1213 /* Attempt to auto detect the type - same as _fnGatherData() */
22.1214 + sThisType = _fnDetectType( oSettings.aoData[iThisIndex]._aData[i] );
22.1215 if ( oSettings.aoColumns[i].sType === null )
22.1216 {
22.1217 - oSettings.aoColumns[i].sType = _fnDetectType( aData[i] );
22.1218 + oSettings.aoColumns[i].sType = sThisType;
22.1219 }
22.1220 - else if ( oSettings.aoColumns[i].sType == "date" ||
22.1221 - oSettings.aoColumns[i].sType == "numeric" )
22.1222 + else if ( oSettings.aoColumns[i].sType != sThisType )
22.1223 {
22.1224 - oSettings.aoColumns[i].sType = _fnDetectType( aData[i] );
22.1225 + /* String is always the 'fallback' option */
22.1226 + oSettings.aoColumns[i].sType = 'string';
22.1227 }
22.1228 }
22.1229
22.1230 @@ -2175,9 +2517,11 @@
22.1231
22.1232 /*
22.1233 * Function: _fnGatherData
22.1234 - * Purpose: Read in the data from the target table
22.1235 + * Purpose: Read in the data from the target table from the DOM
22.1236 * Returns: -
22.1237 * Inputs: object:oSettings - dataTables settings object
22.1238 + * Notes: This is a optimised version of _fnAddData (more or less) for reading information
22.1239 + * from the DOM. The basic actions must be identical in the two functions.
22.1240 */
22.1241 function _fnGatherData( oSettings )
22.1242 {
22.1243 @@ -2192,10 +2536,10 @@
22.1244 */
22.1245 if ( oSettings.sAjaxSource === null )
22.1246 {
22.1247 - nTrs = oSettings.nTable.getElementsByTagName('tbody')[0].childNodes;
22.1248 + nTrs = oSettings.nTBody.childNodes;
22.1249 for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
22.1250 {
22.1251 - if ( nTrs[i].nodeName == "TR" )
22.1252 + if ( nTrs[i].nodeName.toUpperCase() == "TR" )
22.1253 {
22.1254 iThisIndex = oSettings.aoData.length;
22.1255 oSettings.aoData.push( {
22.1256 @@ -2214,9 +2558,9 @@
22.1257
22.1258 for ( j=0, jLen=nTds.length ; j<jLen ; j++ )
22.1259 {
22.1260 - if ( nTds[j].nodeName == "TD" )
22.1261 + if ( nTds[j].nodeName.toUpperCase() == "TD" )
22.1262 {
22.1263 - aLocalData[jInner] = nTds[j].innerHTML;
22.1264 + aLocalData[jInner] = $.trim(nTds[j].innerHTML);
22.1265 jInner++;
22.1266 }
22.1267 }
22.1268 @@ -2235,7 +2579,7 @@
22.1269 for ( j=0, jLen=nTrs[i].childNodes.length ; j<jLen ; j++ )
22.1270 {
22.1271 nTd = nTrs[i].childNodes[j];
22.1272 - if ( nTd.nodeName == "TD" )
22.1273 + if ( nTd.nodeName.toUpperCase() == "TD" )
22.1274 {
22.1275 nTds.push( nTd );
22.1276 }
22.1277 @@ -2245,10 +2589,10 @@
22.1278 /* Sanity check */
22.1279 if ( nTds.length != nTrs.length * oSettings.aoColumns.length )
22.1280 {
22.1281 - alert( "DataTables warning: Unexpected number of TD elements. Expected "+nTds.length+
22.1282 - " and got "+(nTrs.length * oSettings.aoColumns.length)+". DataTables does not support "+
22.1283 - "rowspan / colspan in the table body, and there must be one cell for each row/column "+
22.1284 - "combination." );
22.1285 + _fnLog( oSettings, 1, "Unexpected number of TD elements. Expected "+
22.1286 + (nTrs.length * oSettings.aoColumns.length)+" and got "+nTds.length+". DataTables does "+
22.1287 + "not support rowspan / colspan in the table body, and there must be one cell for each "+
22.1288 + "row/column combination." );
22.1289 }
22.1290
22.1291 /* Now process by column */
22.1292 @@ -2341,7 +2685,7 @@
22.1293 function _fnDrawHead( oSettings )
22.1294 {
22.1295 var i, nTh, iLen;
22.1296 - var iThs = oSettings.nTable.getElementsByTagName('thead')[0].getElementsByTagName('th').length;
22.1297 + var iThs = oSettings.nTHead.getElementsByTagName('th').length;
22.1298 var iCorrector = 0;
22.1299
22.1300 /* If there is a header in place - then use it - otherwise it's going to get nuked... */
22.1301 @@ -2350,7 +2694,6 @@
22.1302 /* We've got a thead from the DOM, so remove hidden columns and apply width to vis cols */
22.1303 for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
22.1304 {
22.1305 - //oSettings.aoColumns[i].nTh = nThs[i];
22.1306 nTh = oSettings.aoColumns[i].nTh;
22.1307
22.1308 if ( oSettings.aoColumns[i].bVisible )
22.1309 @@ -2399,7 +2742,7 @@
22.1310 nTr.appendChild( nTh );
22.1311 }
22.1312 }
22.1313 - $('thead:eq(0)', oSettings.nTable).html( '' )[0].appendChild( nTr );
22.1314 + $(oSettings.nTHead).html( '' )[0].appendChild( nTr );
22.1315 }
22.1316
22.1317 /* Add the extra markup needed by jQuery UI's themes */
22.1318 @@ -2427,29 +2770,34 @@
22.1319 }
22.1320 }
22.1321
22.1322 - /* Take the brutal approach to cancelling text selection due to the shift key */
22.1323 - $('thead:eq(0) th', oSettings.nTable).mousedown( function (e) {
22.1324 - if ( e.shiftKey )
22.1325 + /* Take the brutal approach to cancelling text selection in header */
22.1326 + $('th', oSettings.nTHead).mousedown( function (e) {
22.1327 + this.onselectstart = function() { return false; };
22.1328 + return false;
22.1329 + } );
22.1330 + }
22.1331 +
22.1332 + /* Cache the footer elements */
22.1333 + if ( oSettings.nTFoot !== null )
22.1334 + {
22.1335 + iCorrector = 0;
22.1336 + var nTfs = oSettings.nTFoot.getElementsByTagName('th');
22.1337 + for ( i=0, iLen=nTfs.length ; i<iLen ; i++ )
22.1338 + {
22.1339 + if ( typeof oSettings.aoColumns[i] != 'undefined' )
22.1340 {
22.1341 - this.onselectstart = function() { return false; };
22.1342 - return false;
22.1343 - }
22.1344 - } );
22.1345 - }
22.1346 -
22.1347 - /* Cache the footer elements */
22.1348 - var nTfoot = oSettings.nTable.getElementsByTagName('tfoot');
22.1349 - if ( nTfoot.length !== 0 )
22.1350 - {
22.1351 - iCorrector = 0;
22.1352 - var nTfs = nTfoot[0].getElementsByTagName('th');
22.1353 - for ( i=0, iLen=nTfs.length ; i<iLen ; i++ )
22.1354 - {
22.1355 - oSettings.aoColumns[i].nTf = nTfs[i-iCorrector];
22.1356 - if ( !oSettings.aoColumns[i].bVisible )
22.1357 - {
22.1358 - nTfs[i-iCorrector].parentNode.removeChild( nTfs[i-iCorrector] );
22.1359 - iCorrector++;
22.1360 + oSettings.aoColumns[i].nTf = nTfs[i-iCorrector];
22.1361 +
22.1362 + if ( oSettings.oClasses.sFooterTH !== "" )
22.1363 + {
22.1364 + oSettings.aoColumns[i].nTf.className += " "+oSettings.oClasses.sFooterTH;
22.1365 + }
22.1366 +
22.1367 + if ( !oSettings.aoColumns[i].bVisible )
22.1368 + {
22.1369 + nTfs[i-iCorrector].parentNode.removeChild( nTfs[i-iCorrector] );
22.1370 + iCorrector++;
22.1371 + }
22.1372 }
22.1373 }
22.1374 }
22.1375 @@ -2470,6 +2818,22 @@
22.1376 var iStrips = oSettings.asStripClasses.length;
22.1377 var iOpenRows = oSettings.aoOpenRows.length;
22.1378
22.1379 + /* Check and see if we have an initial draw position from state saving */
22.1380 + if ( typeof oSettings.iInitDisplayStart != 'undefined' && oSettings.iInitDisplayStart != -1 )
22.1381 + {
22.1382 + if ( oSettings.oFeatures.bServerSide )
22.1383 + {
22.1384 + oSettings._iDisplayStart = oSettings.iInitDisplayStart;
22.1385 + }
22.1386 + else
22.1387 + {
22.1388 + oSettings._iDisplayStart = (oSettings.iInitDisplayStart >= oSettings.fnRecordsDisplay()) ?
22.1389 + 0 : oSettings.iInitDisplayStart;
22.1390 + }
22.1391 + oSettings.iInitDisplayStart = -1;
22.1392 + _fnCalculateEnd( oSettings );
22.1393 + }
22.1394 +
22.1395 /* If we are dealing with Ajax - do it here */
22.1396 if ( oSettings.oFeatures.bServerSide &&
22.1397 !_fnAjaxUpdate( oSettings ) )
22.1398 @@ -2477,14 +2841,6 @@
22.1399 return;
22.1400 }
22.1401
22.1402 - /* Check and see if we have an initial draw position from state saving */
22.1403 - if ( typeof oSettings.iInitDisplayStart != 'undefined' && oSettings.iInitDisplayStart != -1 )
22.1404 - {
22.1405 - oSettings._iDisplayStart = oSettings.iInitDisplayStart;
22.1406 - oSettings.iInitDisplayStart = -1;
22.1407 - _fnCalculateEnd( oSettings );
22.1408 - }
22.1409 -
22.1410 if ( oSettings.aiDisplay.length !== 0 )
22.1411 {
22.1412 var iStart = oSettings._iDisplayStart;
22.1413 @@ -2515,11 +2871,11 @@
22.1414 /* Custom row callback function - might want to manipule the row */
22.1415 if ( typeof oSettings.fnRowCallback == "function" )
22.1416 {
22.1417 - nRow = oSettings.fnRowCallback( nRow,
22.1418 + nRow = oSettings.fnRowCallback.call( oSettings.oInstance, nRow,
22.1419 oSettings.aoData[ oSettings.aiDisplay[j] ]._aData, iRowCount, j );
22.1420 if ( !nRow && !bRowError )
22.1421 {
22.1422 - alert( "DataTables warning: A node was not returned by fnRowCallback" );
22.1423 + _fnLog( oSettings, 0, "A node was not returned by fnRowCallback" );
22.1424 bRowError = true;
22.1425 }
22.1426 }
22.1427 @@ -2552,9 +2908,18 @@
22.1428
22.1429 var nTd = document.createElement( 'td' );
22.1430 nTd.setAttribute( 'valign', "top" );
22.1431 - nTd.colSpan = oSettings.aoColumns.length;
22.1432 + nTd.colSpan = _fnVisbleColumns( oSettings );
22.1433 nTd.className = oSettings.oClasses.sRowEmpty;
22.1434 - nTd.innerHTML = oSettings.oLanguage.sZeroRecords;
22.1435 + if ( typeof oSettings.oLanguage.sEmptyTable != 'undefined' &&
22.1436 + oSettings.fnRecordsTotal() === 0 )
22.1437 + {
22.1438 + nTd.innerHTML = oSettings.oLanguage.sEmptyTable;
22.1439 + }
22.1440 + else
22.1441 + {
22.1442 + nTd.innerHTML = oSettings.oLanguage.sZeroRecords.replace(
22.1443 + '_MAX_', oSettings.fnFormatNumber(oSettings.fnRecordsTotal()) );
22.1444 + }
22.1445
22.1446 anRows[ iRowCount ].appendChild( nTd );
22.1447 }
22.1448 @@ -2562,14 +2927,14 @@
22.1449 /* Callback the header and footer custom funcation if there is one */
22.1450 if ( typeof oSettings.fnHeaderCallback == 'function' )
22.1451 {
22.1452 - oSettings.fnHeaderCallback( $('thead:eq(0)>tr', oSettings.nTable)[0],
22.1453 + oSettings.fnHeaderCallback.call( oSettings.oInstance, $('>tr', oSettings.nTHead)[0],
22.1454 _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(),
22.1455 oSettings.aiDisplay );
22.1456 }
22.1457
22.1458 if ( typeof oSettings.fnFooterCallback == 'function' )
22.1459 {
22.1460 - oSettings.fnFooterCallback( $('tfoot:eq(0)>tr', oSettings.nTable)[0],
22.1461 + oSettings.fnFooterCallback.call( oSettings.oInstance, $('>tr', oSettings.nTFoot)[0],
22.1462 _fnGetDataMaster( oSettings ), oSettings._iDisplayStart, oSettings.fnDisplayEnd(),
22.1463 oSettings.aiDisplay );
22.1464 }
22.1465 @@ -2579,10 +2944,17 @@
22.1466 * $().html('') since this will unbind the jQuery event handlers (even although the node
22.1467 * still exists!) - equally we can't use innerHTML, since IE throws an exception.
22.1468 */
22.1469 - var nBody = oSettings.nTable.getElementsByTagName('tbody');
22.1470 - if ( nBody[0] )
22.1471 - {
22.1472 - var nTrs = nBody[0].childNodes;
22.1473 + var
22.1474 + nAddFrag = document.createDocumentFragment(),
22.1475 + nRemoveFrag = document.createDocumentFragment(),
22.1476 + nBodyPar, nTrs;
22.1477 +
22.1478 + if ( oSettings.nTBody )
22.1479 + {
22.1480 + nBodyPar = oSettings.nTBody.parentNode;
22.1481 + nRemoveFrag.appendChild( oSettings.nTBody );
22.1482 +
22.1483 + nTrs = oSettings.nTBody.childNodes;
22.1484 for ( i=nTrs.length-1 ; i>=0 ; i-- )
22.1485 {
22.1486 nTrs[i].parentNode.removeChild( nTrs[i] );
22.1487 @@ -2591,33 +2963,49 @@
22.1488 /* Put the draw table into the dom */
22.1489 for ( i=0, iLen=anRows.length ; i<iLen ; i++ )
22.1490 {
22.1491 - nBody[0].appendChild( anRows[i] );
22.1492 - }
22.1493 + nAddFrag.appendChild( anRows[i] );
22.1494 + }
22.1495 +
22.1496 + oSettings.nTBody.appendChild( nAddFrag );
22.1497 + if ( nBodyPar !== null )
22.1498 + {
22.1499 + nBodyPar.appendChild( oSettings.nTBody );
22.1500 + }
22.1501 + }
22.1502 +
22.1503 + /* Perform certain DOM operations after the table has been drawn for the first time */
22.1504 + if ( typeof oSettings._bInitComplete == "undefined" )
22.1505 + {
22.1506 + oSettings._bInitComplete = true;
22.1507 +
22.1508 + /* It is possible that some of the DOM created (particularly if custom) has padding etc
22.1509 + * on it which means that the table size is more constrained that when we originally
22.1510 + * measured it. As such we check here if this is the case, and correct if needed
22.1511 + */
22.1512 + if ( oSettings.nTableWrapper != oSettings.nTable.parentNode &&
22.1513 + $(oSettings.nTableWrapper).width() > $(oSettings.nTable.parentNode).width() )
22.1514 + {
22.1515 + _fnAjustColumnSizing( oSettings );
22.1516 + }
22.1517 +
22.1518 + /* Set an absolute width for the table such that pagination doesn't
22.1519 + * cause the table to resize - disabled for now.
22.1520 + */
22.1521 + //if ( oSettings.oFeatures.bAutoWidth && oSettings.nTable.offsetWidth !== 0 )
22.1522 + //{
22.1523 + // //oSettings.nTable.style.width = oSettings.nTable.offsetWidth+"px";
22.1524 + //}
22.1525 }
22.1526
22.1527 /* Call all required callback functions for the end of a draw */
22.1528 for ( i=0, iLen=oSettings.aoDrawCallback.length ; i<iLen ; i++ )
22.1529 {
22.1530 - oSettings.aoDrawCallback[i].fn( oSettings );
22.1531 + oSettings.aoDrawCallback[i].fn.call( oSettings.oInstance, oSettings );
22.1532 }
22.1533
22.1534 /* Draw is complete, sorting and filtering must be as well */
22.1535 oSettings.bSorted = false;
22.1536 oSettings.bFiltered = false;
22.1537 -
22.1538 - /* Perform certain DOM operations after the table has been drawn for the first time */
22.1539 - if ( typeof oSettings._bInitComplete == "undefined" )
22.1540 - {
22.1541 - oSettings._bInitComplete = true;
22.1542 -
22.1543 - /* Set an absolute width for the table such that pagination doesn't
22.1544 - * cause the table to resize
22.1545 - */
22.1546 - if ( oSettings.oFeatures.bAutoWidth && oSettings.nTable.offsetWidth !== 0 )
22.1547 - {
22.1548 - oSettings.nTable.style.width = oSettings.nTable.offsetWidth+"px";
22.1549 - }
22.1550 - }
22.1551 }
22.1552
22.1553 /*
22.1554 @@ -2661,8 +3049,8 @@
22.1555 var i;
22.1556
22.1557 /* Paging and general */
22.1558 - oSettings.iServerDraw++;
22.1559 - aoData.push( { "name": "sEcho", "value": oSettings.iServerDraw } );
22.1560 + oSettings.iDraw++;
22.1561 + aoData.push( { "name": "sEcho", "value": oSettings.iDraw } );
22.1562 aoData.push( { "name": "iColumns", "value": iColumns } );
22.1563 aoData.push( { "name": "sColumns", "value": _fnColumnOrdering(oSettings) } );
22.1564 aoData.push( { "name": "iDisplayStart", "value": oSettings._iDisplayStart } );
22.1565 @@ -2672,13 +3060,13 @@
22.1566 /* Filtering */
22.1567 if ( oSettings.oFeatures.bFilter !== false )
22.1568 {
22.1569 - aoData.push( { "name": "sSearch", "value": oSettings.oPreviousSearch.sSearch } );
22.1570 - aoData.push( { "name": "bEscapeRegex", "value": oSettings.oPreviousSearch.bEscapeRegex } );
22.1571 + aoData.push( { "name": "sSearch", "value": oSettings.oPreviousSearch.sSearch } );
22.1572 + aoData.push( { "name": "bRegex", "value": oSettings.oPreviousSearch.bRegex } );
22.1573 for ( i=0 ; i<iColumns ; i++ )
22.1574 {
22.1575 - aoData.push( { "name": "sSearch_"+i, "value": oSettings.aoPreSearchCols[i].sSearch } );
22.1576 - aoData.push( { "name": "bEscapeRegex_"+i, "value": oSettings.aoPreSearchCols[i].bEscapeRegex } );
22.1577 - aoData.push( { "name": "bSearchable_"+i, "value": oSettings.aoColumns[i].bSearchable } );
22.1578 + aoData.push( { "name": "sSearch_"+i, "value": oSettings.aoPreSearchCols[i].sSearch } );
22.1579 + aoData.push( { "name": "bRegex_"+i, "value": oSettings.aoPreSearchCols[i].bRegex } );
22.1580 + aoData.push( { "name": "bSearchable_"+i, "value": oSettings.aoColumns[i].bSearchable } );
22.1581 }
22.1582 }
22.1583
22.1584 @@ -2706,9 +3094,10 @@
22.1585 }
22.1586 }
22.1587
22.1588 - oSettings.fnServerData( oSettings.sAjaxSource, aoData, function(json) {
22.1589 - _fnAjaxUpdateDraw( oSettings, json );
22.1590 - } );
22.1591 + oSettings.fnServerData.call( oSettings.oInstance, oSettings.sAjaxSource, aoData,
22.1592 + function(json) {
22.1593 + _fnAjaxUpdateDraw( oSettings, json );
22.1594 + } );
22.1595 return false;
22.1596 }
22.1597 else
22.1598 @@ -2735,13 +3124,13 @@
22.1599 /* Protect against old returns over-writing a new one. Possible when you get
22.1600 * very fast interaction, and later queires are completed much faster
22.1601 */
22.1602 - if ( json.sEcho*1 < oSettings.iServerDraw )
22.1603 + if ( json.sEcho*1 < oSettings.iDraw )
22.1604 {
22.1605 return;
22.1606 }
22.1607 else
22.1608 {
22.1609 - oSettings.iServerDraw = json.sEcho * 1;
22.1610 + oSettings.iDraw = json.sEcho * 1;
22.1611 }
22.1612 }
22.1613
22.1614 @@ -2807,22 +3196,18 @@
22.1615 * All DataTables are wrapped in a div - this is not currently optional - backwards
22.1616 * compatability. It can be removed if you don't want it.
22.1617 */
22.1618 - var nWrapper = document.createElement( 'div' );
22.1619 - nWrapper.className = oSettings.oClasses.sWrapper;
22.1620 + oSettings.nTableWrapper = document.createElement( 'div' );
22.1621 + oSettings.nTableWrapper.className = oSettings.oClasses.sWrapper;
22.1622 if ( oSettings.sTableId !== '' )
22.1623 {
22.1624 - nWrapper.setAttribute( 'id', oSettings.sTableId+'_wrapper' );
22.1625 + oSettings.nTableWrapper.setAttribute( 'id', oSettings.sTableId+'_wrapper' );
22.1626 }
22.1627
22.1628 /* Track where we want to insert the option */
22.1629 - var nInsertNode = nWrapper;
22.1630 -
22.1631 - /* Substitute any constants in the dom string */
22.1632 - var sDom = oSettings.sDom.replace( "H", "fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix" );
22.1633 - sDom = sDom.replace( "F", "fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix" );
22.1634 + var nInsertNode = oSettings.nTableWrapper;
22.1635
22.1636 /* Loop over the user set positioning and place the elements as needed */
22.1637 - var aDom = sDom.split('');
22.1638 + var aDom = oSettings.sDom.split('');
22.1639 var nTmp, iPushFeature, cOption, nNewNode, cNext, sClass, j;
22.1640 for ( var i=0 ; i<aDom.length ; i++ )
22.1641 {
22.1642 @@ -2845,6 +3230,17 @@
22.1643 sClass += aDom[i+j];
22.1644 j++;
22.1645 }
22.1646 +
22.1647 + /* Replace jQuery UI constants */
22.1648 + if ( sClass == "H" )
22.1649 + {
22.1650 + sClass = "fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";
22.1651 + }
22.1652 + else if ( sClass == "F" )
22.1653 + {
22.1654 + sClass = "fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";
22.1655 + }
22.1656 +
22.1657 nNewNode.className = sClass;
22.1658 i += j; /* Move along the position array */
22.1659 }
22.1660 @@ -2878,7 +3274,7 @@
22.1661 else if ( cOption == 't' )
22.1662 {
22.1663 /* Table */
22.1664 - nTmp = oSettings.nTable;
22.1665 + nTmp = _fnFeatureHtmlTable( oSettings );
22.1666 iPushFeature = 1;
22.1667 }
22.1668 else if ( cOption == 'i' && oSettings.oFeatures.bInfo )
22.1669 @@ -2924,7 +3320,410 @@
22.1670 }
22.1671
22.1672 /* Built our DOM structure - replace the holding div with what we want */
22.1673 - nHolding.parentNode.replaceChild( nWrapper, nHolding );
22.1674 + nHolding.parentNode.replaceChild( oSettings.nTableWrapper, nHolding );
22.1675 + }
22.1676 +
22.1677 +
22.1678 + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
22.1679 + * Section - Feature: Filtering
22.1680 + */
22.1681 +
22.1682 + /*
22.1683 + * Function: _fnFeatureHtmlTable
22.1684 + * Purpose: Add any control elements for the table - specifically scrolling
22.1685 + * Returns: node: - Node to add to the DOM
22.1686 + * Inputs: object:oSettings - dataTables settings object
22.1687 + */
22.1688 + function _fnFeatureHtmlTable ( oSettings )
22.1689 + {
22.1690 + /* Chack if scrolling is enabled or not - if not then leave the DOM unaltered */
22.1691 + if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY === "" )
22.1692 + {
22.1693 + return oSettings.nTable;
22.1694 + }
22.1695 +
22.1696 + /*
22.1697 + * The HTML structure that we want to generate in this function is:
22.1698 + * div - nScroller
22.1699 + * div - nScrollHead
22.1700 + * div - nScrollHeadInner
22.1701 + * table - nScrollHeadTable
22.1702 + * thead - nThead
22.1703 + * div - nScrollBody
22.1704 + * table - oSettings.nTable
22.1705 + * thead - nTheadSize
22.1706 + * tbody - nTbody
22.1707 + * div - nScrollFoot
22.1708 + * div - nScrollFootInner
22.1709 + * table - nScrollFootTable
22.1710 + * tfoot - nTfoot
22.1711 + */
22.1712 + var
22.1713 + nScroller = document.createElement('div'),
22.1714 + nScrollHead = document.createElement('div'),
22.1715 + nScrollHeadInner = document.createElement('div'),
22.1716 + nScrollBody = document.createElement('div'),
22.1717 + nScrollFoot = document.createElement('div'),
22.1718 + nScrollFootInner = document.createElement('div'),
22.1719 + nScrollHeadTable = oSettings.nTable.cloneNode(false),
22.1720 + nScrollFootTable = oSettings.nTable.cloneNode(false),
22.1721 + nThead = oSettings.nTable.getElementsByTagName('thead')[0],
22.1722 + nTfoot = oSettings.nTable.getElementsByTagName('tfoot').length === 0 ? null :
22.1723 + oSettings.nTable.getElementsByTagName('tfoot')[0],
22.1724 + oClasses = (typeof oInit.bJQueryUI != 'undefined' && oInit.bJQueryUI) ?
22.1725 + _oExt.oJUIClasses : _oExt.oStdClasses;
22.1726 +
22.1727 + nScrollHead.appendChild( nScrollHeadInner );
22.1728 + nScrollFoot.appendChild( nScrollFootInner );
22.1729 + nScrollBody.appendChild( oSettings.nTable );
22.1730 + nScroller.appendChild( nScrollHead );
22.1731 + nScroller.appendChild( nScrollBody );
22.1732 + nScrollHeadInner.appendChild( nScrollHeadTable );
22.1733 + nScrollHeadTable.appendChild( nThead );
22.1734 + if ( nTfoot !== null )
22.1735 + {
22.1736 + nScroller.appendChild( nScrollFoot );
22.1737 + nScrollFootInner.appendChild( nScrollFootTable );
22.1738 + nScrollFootTable.appendChild( nTfoot );
22.1739 + }
22.1740 +
22.1741 + nScroller.className = oClasses.sScrollWrapper;
22.1742 + nScrollHead.className = oClasses.sScrollHead;
22.1743 + nScrollHeadInner.className = oClasses.sScrollHeadInner;
22.1744 + nScrollBody.className = oClasses.sScrollBody;
22.1745 + nScrollFoot.className = oClasses.sScrollFoot;
22.1746 + nScrollFootInner.className = oClasses.sScrollFootInner;
22.1747 +
22.1748 + nScrollHead.style.overflow = "hidden";
22.1749 + nScrollFoot.style.overflow = "hidden";
22.1750 + nScrollBody.style.overflow = "auto";
22.1751 + nScrollHead.style.border = "0";
22.1752 + nScrollFoot.style.border = "0";
22.1753 + nScrollHeadInner.style.width = "150%"; /* will be overwritten */
22.1754 +
22.1755 + /* Modify attributes to respect the clones */
22.1756 + nScrollHeadTable.removeAttribute('id');
22.1757 + nScrollHeadTable.style.marginLeft = "0";
22.1758 + oSettings.nTable.style.marginLeft = "0";
22.1759 + if ( nTfoot !== null )
22.1760 + {
22.1761 + nScrollFootTable.removeAttribute('id');
22.1762 + nScrollFootTable.style.marginLeft = "0";
22.1763 + }
22.1764 +
22.1765 + /* Move any caption elements from the body to the header */
22.1766 + var nCaptions = $('>caption', oSettings.nTable);
22.1767 + for ( var i=0, iLen=nCaptions.length ; i<iLen ; i++ )
22.1768 + {
22.1769 + nScrollHeadTable.appendChild( nCaptions[i] );
22.1770 + }
22.1771 +
22.1772 + /*
22.1773 + * Sizing
22.1774 + */
22.1775 + /* When xscrolling add the width and a scroller to move the header with the body */
22.1776 + if ( oSettings.oScroll.sX !== "" )
22.1777 + {
22.1778 + nScrollHead.style.width = _fnStringToCss( oSettings.oScroll.sX );
22.1779 + nScrollBody.style.width = _fnStringToCss( oSettings.oScroll.sX );
22.1780 +
22.1781 + if ( nTfoot !== null )
22.1782 + {
22.1783 + nScrollFoot.style.width = _fnStringToCss( oSettings.oScroll.sX );
22.1784 + }
22.1785 +
22.1786 + /* When the body is scrolled, then we also want to scroll the headers */
22.1787 + $(nScrollBody).scroll( function (e) {
22.1788 + nScrollHead.scrollLeft = this.scrollLeft;
22.1789 +
22.1790 + if ( nTfoot !== null )
22.1791 + {
22.1792 + nScrollFoot.scrollLeft = this.scrollLeft;
22.1793 + }
22.1794 + } );
22.1795 + }
22.1796 +
22.1797 + /* When yscrolling, add the height */
22.1798 + if ( oSettings.oScroll.sY !== "" )
22.1799 + {
22.1800 + nScrollBody.style.height = _fnStringToCss( oSettings.oScroll.sY );
22.1801 + }
22.1802 +
22.1803 + /*
22.1804 + * Redraw - align columns across the tables
22.1805 + */
22.1806 + oSettings.aoDrawCallback.push( {
22.1807 + "fn": _fnScrollDraw,
22.1808 + "sName": "scrolling"
22.1809 + } );
22.1810 +
22.1811 + oSettings.nScrollHead = nScrollHead;
22.1812 + oSettings.nScrollFoot = nScrollFoot;
22.1813 +
22.1814 + return nScroller;
22.1815 + }
22.1816 +
22.1817 + /*
22.1818 + * Function: _fnScrollDraw
22.1819 + * Purpose: Update the various tables for resizing
22.1820 + * Returns: node: - Node to add to the DOM
22.1821 + * Inputs: object:o - dataTables settings object
22.1822 + * Notes: It's a bit of a pig this function, but basically the idea to:
22.1823 + * 1. Re-create the table inside the scrolling div
22.1824 + * 2. Take live measurements from the DOM
22.1825 + * 3. Apply the measurements
22.1826 + * 4. Clean up
22.1827 + */
22.1828 + function _fnScrollDraw ( o )
22.1829 + {
22.1830 + var
22.1831 + nScrollHeadInner = o.nScrollHead.getElementsByTagName('div')[0],
22.1832 + nScrollHeadTable = nScrollHeadInner.getElementsByTagName('table')[0],
22.1833 + nScrollBody = o.nTable.parentNode,
22.1834 + i, iLen, j, jLen, anHeadToSize, anHeadSizers, anFootSizers, anFootToSize, oStyle, iVis,
22.1835 + iWidth, aApplied=[], iSanityWidth;
22.1836 +
22.1837 + /*
22.1838 + * 1. Re-create the table inside the scrolling div
22.1839 + */
22.1840 +
22.1841 + /* Remove the old minimised thead and tfoot elements in the inner table */
22.1842 + var nTheadSize = o.nTable.getElementsByTagName('thead');
22.1843 + if ( nTheadSize.length > 0 )
22.1844 + {
22.1845 + o.nTable.removeChild( nTheadSize[0] );
22.1846 + }
22.1847 +
22.1848 + if ( o.nTFoot !== null )
22.1849 + {
22.1850 + /* Remove the old minimised footer element in the cloned header */
22.1851 + var nTfootSize = o.nTable.getElementsByTagName('tfoot');
22.1852 + if ( nTfootSize.length > 0 )
22.1853 + {
22.1854 + o.nTable.removeChild( nTfootSize[0] );
22.1855 + }
22.1856 + }
22.1857 +
22.1858 + /* Clone the current header and footer elements and then place it into the inner table */
22.1859 + nTheadSize = o.nTHead.cloneNode(true);
22.1860 + o.nTable.insertBefore( nTheadSize, o.nTable.childNodes[0] );
22.1861 +
22.1862 + if ( o.nTFoot !== null )
22.1863 + {
22.1864 + nTfootSize = o.nTFoot.cloneNode(true);
22.1865 + o.nTable.insertBefore( nTfootSize, o.nTable.childNodes[1] );
22.1866 + }
22.1867 +
22.1868 + /*
22.1869 + * 2. Take live measurements from the DOM - do not alter the DOM itself!
22.1870 + */
22.1871 +
22.1872 + /* Remove old sizing and apply the calculated column widths
22.1873 + * Get the unique column headers in the newly created (cloned) header. We want to apply the
22.1874 + * calclated sizes to this header
22.1875 + */
22.1876 + var nThs = _fnGetUniqueThs( nTheadSize );
22.1877 + for ( i=0, iLen=nThs.length ; i<iLen ; i++ )
22.1878 + {
22.1879 + iVis = _fnVisibleToColumnIndex( o, i );
22.1880 + nThs[i].style.width = o.aoColumns[iVis].sWidth;
22.1881 + }
22.1882 +
22.1883 + if ( o.nTFoot !== null )
22.1884 + {
22.1885 + _fnApplyToChildren( function(n) {
22.1886 + n.style.width = "";
22.1887 + }, nTfootSize.getElementsByTagName('tr') );
22.1888 + }
22.1889 +
22.1890 + /* Size the table as a whole */
22.1891 + iSanityWidth = $(o.nTable).outerWidth();
22.1892 + if ( o.oScroll.sX === "" )
22.1893 + {
22.1894 + /* No x scrolling */
22.1895 + o.nTable.style.width = "100%";
22.1896 +
22.1897 + /* I know this is rubbish - but IE7 will make the width of the table when 100% include
22.1898 + * the scrollbar - which is shouldn't. This needs feature detection in future - to do
22.1899 + */
22.1900 + if ( $.browser.msie && $.browser.version <= 7 )
22.1901 + {
22.1902 + o.nTable.style.width = _fnStringToCss( $(o.nTable).outerWidth()-o.oScroll.iBarWidth );
22.1903 + }
22.1904 + }
22.1905 + else
22.1906 + {
22.1907 + if ( o.oScroll.sXInner !== "" )
22.1908 + {
22.1909 + /* x scroll inner has been given - use it */
22.1910 + o.nTable.style.width = _fnStringToCss(o.oScroll.sXInner);
22.1911 + }
22.1912 + else if ( iSanityWidth == $(nScrollBody).width() &&
22.1913 + $(nScrollBody).height() < $(o.nTable).height() )
22.1914 + {
22.1915 + /* There is y-scrolling - try to take account of the y scroll bar */
22.1916 + o.nTable.style.width = _fnStringToCss( iSanityWidth-o.oScroll.iBarWidth );
22.1917 + if ( $(o.nTable).outerWidth() > iSanityWidth-o.oScroll.iBarWidth )
22.1918 + {
22.1919 + /* Not possible to take account of it */
22.1920 + o.nTable.style.width = _fnStringToCss( iSanityWidth );
22.1921 + }
22.1922 + }
22.1923 + else
22.1924 + {
22.1925 + /* All else fails */
22.1926 + o.nTable.style.width = _fnStringToCss( iSanityWidth );
22.1927 + }
22.1928 + }
22.1929 +
22.1930 + /* Recalculate the sanity width - now that we've applied the required width, before it was
22.1931 + * a temporary variable. This is required because the column width calculation is done
22.1932 + * before this table DOM is created.
22.1933 + */
22.1934 + iSanityWidth = $(o.nTable).outerWidth();
22.1935 +
22.1936 + /* We want the hidden header to have zero height, so remove padding and borders. Then
22.1937 + * set the width based on the real headers
22.1938 + */
22.1939 + anHeadToSize = o.nTHead.getElementsByTagName('tr');
22.1940 + anHeadSizers = nTheadSize.getElementsByTagName('tr');
22.1941 +
22.1942 + _fnApplyToChildren( function(nSizer, nToSize) {
22.1943 + oStyle = nSizer.style;
22.1944 + oStyle.paddingTop = "0";
22.1945 + oStyle.paddingBottom = "0";
22.1946 + oStyle.borderTopWidth = "0";
22.1947 + oStyle.borderBottomWidth = "0";
22.1948 + oStyle.height = 0;
22.1949 +
22.1950 + iWidth = $(nSizer).width();
22.1951 + nToSize.style.width = _fnStringToCss( iWidth );
22.1952 + aApplied.push( iWidth );
22.1953 + }, anHeadSizers, anHeadToSize );
22.1954 +
22.1955 + if ( o.nTFoot !== null )
22.1956 + {
22.1957 + /* Clone the current footer and then place it into the body table as a "hidden header" */
22.1958 + anFootSizers = nTfootSize.getElementsByTagName('tr');
22.1959 + anFootToSize = o.nTFoot.getElementsByTagName('tr');
22.1960 +
22.1961 + _fnApplyToChildren( function(nSizer, nToSize) {
22.1962 + oStyle = nSizer.style;
22.1963 + oStyle.paddingTop = "0";
22.1964 + oStyle.paddingBottom = "0";
22.1965 + oStyle.borderTopWidth = "0";
22.1966 + oStyle.borderBottomWidth = "0";
22.1967 +
22.1968 + iWidth = $(nSizer).width();
22.1969 + nToSize.style.width = _fnStringToCss( iWidth );
22.1970 + aApplied.push( iWidth );
22.1971 + }, anFootSizers, anFootToSize );
22.1972 + }
22.1973 +
22.1974 + /*
22.1975 + * 3. Apply the measurements
22.1976 + */
22.1977 +
22.1978 + /* "Hide" the header and footer that we used for the sizing. We want to also fix their width
22.1979 + * to what they currently are
22.1980 + */
22.1981 + _fnApplyToChildren( function(nSizer) {
22.1982 + nSizer.innerHTML = "";
22.1983 + nSizer.style.width = _fnStringToCss( aApplied.shift() );
22.1984 + }, anHeadSizers );
22.1985 +
22.1986 + if ( o.nTFoot !== null )
22.1987 + {
22.1988 + _fnApplyToChildren( function(nSizer) {
22.1989 + nSizer.innerHTML = "";
22.1990 + nSizer.style.width = _fnStringToCss( aApplied.shift() );
22.1991 + }, anFootSizers );
22.1992 + }
22.1993 +
22.1994 + /* Sanity check that the table is of a sensible width. If not then we are going to get
22.1995 + * misalignment
22.1996 + */
22.1997 + if ( $(o.nTable).outerWidth() < iSanityWidth )
22.1998 + {
22.1999 + if ( o.oScroll.sX === "" )
22.2000 + {
22.2001 + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
22.2002 + " misalignment. It is suggested that you enable x-scrolling or increase the width"+
22.2003 + " the table has in which to be drawn" );
22.2004 + }
22.2005 + else if ( o.oScroll.sXInner !== "" )
22.2006 + {
22.2007 + _fnLog( o, 1, "The table cannot fit into the current element which will cause column"+
22.2008 + " misalignment. It is suggested that you increase the sScrollXInner property to"+
22.2009 + " allow it to draw in a larger area, or simply remove that parameter to allow"+
22.2010 + " automatic calculation" );
22.2011 + }
22.2012 + }
22.2013 +
22.2014 +
22.2015 + /*
22.2016 + * 4. Clean up
22.2017 + */
22.2018 +
22.2019 + if ( o.oScroll.sY === "" )
22.2020 + {
22.2021 + /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
22.2022 + * the scrollbar height from the visible display, rather than adding it on. We need to
22.2023 + * set the height in order to sort this. Don't want to do it in any other browsers.
22.2024 + */
22.2025 + if ( $.browser.msie && $.browser.version <= 7 )
22.2026 + {
22.2027 + nScrollBody.style.height = _fnStringToCss( o.nTable.offsetHeight+o.oScroll.iBarWidth );
22.2028 + }
22.2029 + }
22.2030 +
22.2031 + if ( o.oScroll.sY !== "" && o.oScroll.bCollapse )
22.2032 + {
22.2033 + nScrollBody.style.height = _fnStringToCss( o.oScroll.sY );
22.2034 +
22.2035 + var iExtra = (o.oScroll.sX !== "" && o.nTable.offsetWidth > nScrollBody.offsetWidth) ?
22.2036 + o.oScroll.iBarWidth : 0;
22.2037 + if ( o.nTable.offsetHeight < nScrollBody.offsetHeight )
22.2038 + {
22.2039 + nScrollBody.style.height = _fnStringToCss( $(o.nTable).height()+iExtra );
22.2040 + }
22.2041 + }
22.2042 +
22.2043 + /* Finally set the width's of the header and footer tables */
22.2044 + nScrollHeadTable.style.width = _fnStringToCss( $(o.nTable).outerWidth() );
22.2045 + nScrollHeadInner.style.width = _fnStringToCss( $(o.nTable).outerWidth()+o.oScroll.iBarWidth );
22.2046 +
22.2047 + if ( o.nTFoot !== null )
22.2048 + {
22.2049 + var
22.2050 + nScrollFootInner = o.nScrollFoot.getElementsByTagName('div')[0],
22.2051 + nScrollFootTable = nScrollFootInner.getElementsByTagName('table')[0];
22.2052 +
22.2053 + nScrollFootInner.style.width = _fnStringToCss( o.nTable.offsetWidth+o.oScroll.iBarWidth );
22.2054 + nScrollFootTable.style.width = _fnStringToCss( o.nTable.offsetWidth );
22.2055 + }
22.2056 + }
22.2057 +
22.2058 + /*
22.2059 + * Function: _fnAjustColumnSizing
22.2060 + * Purpose: Ajust the table column widths for new data
22.2061 + * Returns: -
22.2062 + * Inputs: object:oSettings - dataTables settings object
22.2063 + * Notes: You would probably want to do a redraw after calling this function!
22.2064 + */
22.2065 + function _fnAjustColumnSizing ( oSettings )
22.2066 + {
22.2067 + /* Not interested in doing column width calculation if autowidth is disabled */
22.2068 + if ( oSettings.oFeatures.bAutoWidth === false )
22.2069 + {
22.2070 + return false;
22.2071 + }
22.2072 +
22.2073 + _fnCalculateColumnWidths( oSettings );
22.2074 + for ( var i=0 , iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
22.2075 + {
22.2076 + oSettings.aoColumns[i].nTh.style.width = oSettings.aoColumns[i].sWidth;
22.2077 + }
22.2078 }
22.2079
22.2080
22.2081 @@ -2965,7 +3764,8 @@
22.2082 /* Now do the filter */
22.2083 _fnFilterComplete( oSettings, {
22.2084 "sSearch": this.value,
22.2085 - "bEscapeRegex": oSettings.oPreviousSearch.bEscapeRegex
22.2086 + "bRegex": oSettings.oPreviousSearch.bRegex,
22.2087 + "bSmart": oSettings.oPreviousSearch.bSmart
22.2088 } );
22.2089 } );
22.2090
22.2091 @@ -2991,13 +3791,13 @@
22.2092 function _fnFilterComplete ( oSettings, oInput, iForce )
22.2093 {
22.2094 /* Filter on everything */
22.2095 - _fnFilter( oSettings, oInput.sSearch, iForce, oInput.bEscapeRegex );
22.2096 + _fnFilter( oSettings, oInput.sSearch, iForce, oInput.bRegex, oInput.bSmart );
22.2097
22.2098 /* Now do the individual column filter */
22.2099 for ( var i=0 ; i<oSettings.aoPreSearchCols.length ; i++ )
22.2100 {
22.2101 _fnFilterColumn( oSettings, oSettings.aoPreSearchCols[i].sSearch, i,
22.2102 - oSettings.aoPreSearchCols[i].bEscapeRegex );
22.2103 + oSettings.aoPreSearchCols[i].bRegex, oSettings.aoPreSearchCols[i].bSmart );
22.2104 }
22.2105
22.2106 /* Custom filtering */
22.2107 @@ -3051,9 +3851,10 @@
22.2108 * Inputs: object:oSettings - dataTables settings object
22.2109 * string:sInput - string to filter on
22.2110 * int:iColumn - column to filter
22.2111 - * bool:bEscapeRegex - escape regex or not
22.2112 + * bool:bRegex - treat search string as a regular expression or not
22.2113 + * bool:bSmart - use smart filtering or not
22.2114 */
22.2115 - function _fnFilterColumn ( oSettings, sInput, iColumn, bEscapeRegex )
22.2116 + function _fnFilterColumn ( oSettings, sInput, iColumn, bRegex, bSmart )
22.2117 {
22.2118 if ( sInput === "" )
22.2119 {
22.2120 @@ -3061,8 +3862,7 @@
22.2121 }
22.2122
22.2123 var iIndexCorrector = 0;
22.2124 - var sRegexMatch = bEscapeRegex ? _fnEscapeRegex( sInput ) : sInput;
22.2125 - var rpSearch = new RegExp( sRegexMatch, "i" );
22.2126 + var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart );
22.2127
22.2128 for ( var i=oSettings.aiDisplay.length-1 ; i>=0 ; i-- )
22.2129 {
22.2130 @@ -3083,11 +3883,13 @@
22.2131 * Inputs: object:oSettings - dataTables settings object
22.2132 * string:sInput - string to filter on
22.2133 * int:iForce - optional - force a research of the master array (1) or not (undefined or 0)
22.2134 - * bool:bEscapeRegex - escape regex or not
22.2135 + * bool:bRegex - treat as a regular expression or not
22.2136 + * bool:bSmart - perform smart filtering or not
22.2137 */
22.2138 - function _fnFilter( oSettings, sInput, iForce, bEscapeRegex )
22.2139 + function _fnFilter( oSettings, sInput, iForce, bRegex, bSmart )
22.2140 {
22.2141 var i;
22.2142 + var rpSearch = _fnFilterCreateSearch( sInput, bRegex, bSmart );
22.2143
22.2144 /* Check if we are forcing or not - optional parameter */
22.2145 if ( typeof iForce == 'undefined' || iForce === null )
22.2146 @@ -3095,21 +3897,12 @@
22.2147 iForce = 0;
22.2148 }
22.2149
22.2150 - /* Need to take account of custom filtering functions always */
22.2151 + /* Need to take account of custom filtering functions - always filter */
22.2152 if ( _oExt.afnFiltering.length !== 0 )
22.2153 {
22.2154 iForce = 1;
22.2155 }
22.2156
22.2157 - /* Generate the regular expression to use. Something along the lines of:
22.2158 - * ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$
22.2159 - */
22.2160 - var asSearch = bEscapeRegex ?
22.2161 - _fnEscapeRegex( sInput ).split( ' ' ) :
22.2162 - sInput.split( ' ' );
22.2163 - var sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$';
22.2164 - var rpSearch = new RegExp( sRegExpString, "i" ); /* case insensitive */
22.2165 -
22.2166 /*
22.2167 * If the input is blank - we want the full data set
22.2168 */
22.2169 @@ -3165,7 +3958,8 @@
22.2170 }
22.2171 }
22.2172 oSettings.oPreviousSearch.sSearch = sInput;
22.2173 - oSettings.oPreviousSearch.bEscapeRegex = bEscapeRegex;
22.2174 + oSettings.oPreviousSearch.bRegex = bRegex;
22.2175 + oSettings.oPreviousSearch.bSmart = bSmart;
22.2176 }
22.2177
22.2178 /*
22.2179 @@ -3180,6 +3974,7 @@
22.2180 /* Clear out the old data */
22.2181 oSettings.asDataSearch.splice( 0, oSettings.asDataSearch.length );
22.2182
22.2183 + var nTmp = document.createElement('div');
22.2184 var aArray = (typeof iMaster != 'undefined' && iMaster == 1) ?
22.2185 oSettings.aiDisplayMaster : oSettings.aiDisplay;
22.2186
22.2187 @@ -3191,9 +3986,44 @@
22.2188 if ( oSettings.aoColumns[j].bSearchable )
22.2189 {
22.2190 var sData = oSettings.aoData[ aArray[i] ]._aData[j];
22.2191 - oSettings.asDataSearch[i] += _fnDataToSearch( sData, oSettings.aoColumns[j].sType )+' ';
22.2192 + oSettings.asDataSearch[i] += _fnDataToSearch( sData, oSettings.aoColumns[j].sType )+' ';
22.2193 }
22.2194 }
22.2195 +
22.2196 + /* If it looks like there is an HTML entity in the string, attempt to decode it */
22.2197 + if ( oSettings.asDataSearch[i].indexOf('&') !== -1 )
22.2198 + {
22.2199 + nTmp.innerHTML = oSettings.asDataSearch[i];
22.2200 + oSettings.asDataSearch[i] = nTmp.textContent ? nTmp.textContent : nTmp.innerText;
22.2201 + }
22.2202 + }
22.2203 + }
22.2204 +
22.2205 + /*
22.2206 + * Function: _fnFilterCreateSearch
22.2207 + * Purpose: Build a regular expression object suitable for searching a table
22.2208 + * Returns: RegExp: - constructed object
22.2209 + * Inputs: string:sSearch - string to search for
22.2210 + * bool:bRegex - treat as a regular expression or not
22.2211 + * bool:bSmart - perform smart filtering or not
22.2212 + */
22.2213 + function _fnFilterCreateSearch( sSearch, bRegex, bSmart )
22.2214 + {
22.2215 + var asSearch, sRegExpString;
22.2216 +
22.2217 + if ( bSmart )
22.2218 + {
22.2219 + /* Generate the regular expression to use. Something along the lines of:
22.2220 + * ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$
22.2221 + */
22.2222 + asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' );
22.2223 + sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$';
22.2224 + return new RegExp( sRegExpString, "i" );
22.2225 + }
22.2226 + else
22.2227 + {
22.2228 + sSearch = bRegex ? sSearch : _fnEscapeRegex( sSearch );
22.2229 + return new RegExp( sSearch, "i" );
22.2230 }
22.2231 }
22.2232
22.2233 @@ -3206,7 +4036,6 @@
22.2234 */
22.2235 function _fnDataToSearch ( sData, sType )
22.2236 {
22.2237 -
22.2238 if ( typeof _oExt.ofnSearch[sType] == "function" )
22.2239 {
22.2240 return _oExt.ofnSearch[sType]( sData );
22.2241 @@ -3266,18 +4095,14 @@
22.2242 for ( i=0 ; i<aaSort.length ; i++ )
22.2243 {
22.2244 var iColumn = aaSort[i][0];
22.2245 + var iVisColumn = _fnColumnIndexToVisible( oSettings, iColumn );
22.2246 var sDataType = oSettings.aoColumns[ iColumn ].sSortDataType;
22.2247 if ( typeof _oExt.afnSortData[sDataType] != 'undefined' )
22.2248 {
22.2249 - var iCorrector = 0;
22.2250 - var aData = _oExt.afnSortData[sDataType]( oSettings, iColumn );
22.2251 + var aData = _oExt.afnSortData[sDataType]( oSettings, iColumn, iVisColumn );
22.2252 for ( j=0, jLen=aoData.length ; j<jLen ; j++ )
22.2253 {
22.2254 - if ( aoData[j] !== null )
22.2255 - {
22.2256 - aoData[j]._aData[iColumn] = aData[iCorrector];
22.2257 - iCorrector++;
22.2258 - }
22.2259 + aoData[j]._aData[iColumn] = aData[j];
22.2260 }
22.2261 }
22.2262 }
22.2263 @@ -3304,10 +4129,21 @@
22.2264 * So basically we have a test for each column, and if that column matches, test the
22.2265 * next one. If all columns match, then we use a numeric sort on the position the two
22.2266 * row have in the original data array in order to provide a stable sort.
22.2267 + *
22.2268 + * Note that for use with the Closure compiler, we need to be very careful how we deal
22.2269 + * with this eval. Closure will rename all of our local variables, resutling in breakage
22.2270 + * if the variables in the eval don't also reflect this. For this reason, we need to use
22.2271 + * 'this' to store the variables we need in the eval, so we can control them. A little
22.2272 + * nasty, but well worth it for using Closure.
22.2273 */
22.2274 - var fnLocalSorting;
22.2275 - var sDynamicSort = "fnLocalSorting = function(a,b){"+
22.2276 - "var iTest;";
22.2277 + this.ClosureDataTables = {
22.2278 + "fn": function(){},
22.2279 + "data": aoData,
22.2280 + "sort": _oExt.oSort
22.2281 + };
22.2282 + var sDynamicSort = "this.ClosureDataTables.fn = function(a,b){"+
22.2283 + "var iTest, oSort=this.ClosureDataTables.sort, "+
22.2284 + "aoData=this.ClosureDataTables.data;";
22.2285
22.2286 for ( i=0 ; i<aaSort.length-1 ; i++ )
22.2287 {
22.2288 @@ -3317,16 +4153,20 @@
22.2289 "( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] ); if ( iTest === 0 )";
22.2290 }
22.2291
22.2292 - iDataSort = oSettings.aoColumns[ aaSort[aaSort.length-1][0] ].iDataSort;
22.2293 - iDataType = oSettings.aoColumns[ iDataSort ].sType;
22.2294 - sDynamicSort += "iTest = oSort['"+iDataType+"-"+aaSort[aaSort.length-1][1]+"']"+
22.2295 - "( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] );"+
22.2296 - "if (iTest===0) return oSort['numeric-"+aaSort[aaSort.length-1][1]+"'](a, b); "+
22.2297 - "return iTest;}";
22.2298 -
22.2299 - /* The eval has to be done to a variable for IE */
22.2300 - eval( sDynamicSort );
22.2301 - oSettings.aiDisplayMaster.sort( fnLocalSorting );
22.2302 + if ( aaSort.length > 0 )
22.2303 + {
22.2304 + iDataSort = oSettings.aoColumns[ aaSort[aaSort.length-1][0] ].iDataSort;
22.2305 + iDataType = oSettings.aoColumns[ iDataSort ].sType;
22.2306 + sDynamicSort += "iTest = oSort['"+iDataType+"-"+aaSort[aaSort.length-1][1]+"']"+
22.2307 + "( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] );"+
22.2308 + "if (iTest===0) return oSort['numeric-"+aaSort[aaSort.length-1][1]+"'](a, b); "+
22.2309 + "return iTest;}";
22.2310 +
22.2311 + /* The eval has to be done to a variable for IE */
22.2312 + eval( sDynamicSort );
22.2313 + oSettings.aiDisplayMaster.sort( this.ClosureDataTables.fn );
22.2314 + }
22.2315 + this.ClosureDataTables = undefined;
22.2316 }
22.2317 else
22.2318 {
22.2319 @@ -3607,6 +4447,7 @@
22.2320 {
22.2321 var nTds = _fnGetTdNodes( oSettings );
22.2322
22.2323 + /* Remove the old classes */
22.2324 if ( nTds.length >= iColumns )
22.2325 {
22.2326 for ( i=0 ; i<iColumns ; i++ )
22.2327 @@ -3639,33 +4480,17 @@
22.2328 }
22.2329
22.2330 /* Add the new classes to the table */
22.2331 - var iClass = 1;
22.2332 - var nTrs = _fnGetTrNodes( oSettings );
22.2333 -
22.2334 + var iClass = 1, iTargetCol;
22.2335 for ( i=0 ; i<aaSort.length ; i++ )
22.2336 {
22.2337 - var iVis = _fnColumnIndexToVisible(oSettings, aaSort[i][0]);
22.2338 - if ( iVis !== null )
22.2339 + iTargetCol = parseInt( aaSort[i][0], 10 );
22.2340 + for ( j=0, jLen=(nTds.length/iColumns) ; j<jLen ; j++ )
22.2341 {
22.2342 - /* Limit the number of classes to three */
22.2343 - if ( iClass <= 2 )
22.2344 - {
22.2345 - /* Note that this is _much_ faster than $().addClass. We can do this since we
22.2346 - * control these classes and nodes - so there is no need for anything other than to
22.2347 - * add the new class immediatly
22.2348 - */
22.2349 - for ( j=0, jLen=nTrs.length ; j<jLen ; j++ )
22.2350 - {
22.2351 - nTrs[j].getElementsByTagName('td')[iVis].className += " "+sClass+iClass;
22.2352 - }
22.2353 - }
22.2354 - else
22.2355 - {
22.2356 - for ( j=0, jLen=nTrs.length ; j<jLen ; j++ )
22.2357 - {
22.2358 - nTrs[j].getElementsByTagName('td')[iVis].className += " "+sClass+'3';
22.2359 - }
22.2360 - }
22.2361 + nTds[(iColumns*j)+iTargetCol].className += " "+sClass+iClass;
22.2362 + }
22.2363 +
22.2364 + if ( iClass < 3 )
22.2365 + {
22.2366 iClass++;
22.2367 }
22.2368 }
22.2369 @@ -3715,12 +4540,14 @@
22.2370 /*
22.2371 * Function: _fnPageChange
22.2372 * Purpose: Alter the display settings to change the page
22.2373 - * Returns: -
22.2374 + * Returns: bool:true - page has changed, false - no change (no effect) eg 'first' on page 1
22.2375 * Inputs: object:oSettings - dataTables settings object
22.2376 * string:sAction - paging action to take: "first", "previous", "next" or "last"
22.2377 */
22.2378 function _fnPageChange ( oSettings, sAction )
22.2379 {
22.2380 + var iOldStart = oSettings._iDisplayStart;
22.2381 +
22.2382 if ( sAction == "first" )
22.2383 {
22.2384 oSettings._iDisplayStart = 0;
22.2385 @@ -3766,8 +4593,10 @@
22.2386 }
22.2387 else
22.2388 {
22.2389 - alert( "DataTables warning: unknown paging action: "+sAction );
22.2390 - }
22.2391 + _fnLog( oSettings, 0, "Unknown paging action: "+sAction );
22.2392 + }
22.2393 +
22.2394 + return iOldStart != oSettings._iDisplayStart;
22.2395 }
22.2396
22.2397
22.2398 @@ -3819,50 +4648,55 @@
22.2399 return;
22.2400 }
22.2401
22.2402 - var nFirst = oSettings.aanFeatures.i[0];
22.2403 + var jqFirst = $(oSettings.aanFeatures.i[0]);
22.2404 + var
22.2405 + sMax = oSettings.fnFormatNumber(oSettings.fnRecordsTotal()),
22.2406 + sStart = oSettings.fnFormatNumber(oSettings._iDisplayStart+1),
22.2407 + sEnd = oSettings.fnFormatNumber(oSettings.fnDisplayEnd()),
22.2408 + sTotal = oSettings.fnFormatNumber(oSettings.fnRecordsDisplay());
22.2409
22.2410 if ( oSettings.fnRecordsDisplay() === 0 &&
22.2411 oSettings.fnRecordsDisplay() == oSettings.fnRecordsTotal() )
22.2412 {
22.2413 /* Empty record set */
22.2414 - nFirst.innerHTML = oSettings.oLanguage.sInfoEmpty+ oSettings.oLanguage.sInfoPostFix;
22.2415 + jqFirst.html( oSettings.oLanguage.sInfoEmpty+ oSettings.oLanguage.sInfoPostFix );
22.2416 }
22.2417 else if ( oSettings.fnRecordsDisplay() === 0 )
22.2418 {
22.2419 /* Rmpty record set after filtering */
22.2420 - nFirst.innerHTML = oSettings.oLanguage.sInfoEmpty +' '+
22.2421 + jqFirst.html( oSettings.oLanguage.sInfoEmpty +' '+
22.2422 + oSettings.oLanguage.sInfoFiltered.replace('_MAX_', sMax)+
22.2423 + oSettings.oLanguage.sInfoPostFix );
22.2424 + }
22.2425 + else if ( oSettings.fnRecordsDisplay() == oSettings.fnRecordsTotal() )
22.2426 + {
22.2427 + /* Normal record set */
22.2428 + jqFirst.html( oSettings.oLanguage.sInfo.
22.2429 + replace('_START_', sStart).
22.2430 + replace('_END_', sEnd).
22.2431 + replace('_TOTAL_', sTotal)+
22.2432 + oSettings.oLanguage.sInfoPostFix );
22.2433 + }
22.2434 + else
22.2435 + {
22.2436 + /* Record set after filtering */
22.2437 + jqFirst.html( oSettings.oLanguage.sInfo.
22.2438 + replace('_START_', sStart).
22.2439 + replace('_END_', sEnd).
22.2440 + replace('_TOTAL_', sTotal) +' '+
22.2441 oSettings.oLanguage.sInfoFiltered.replace('_MAX_',
22.2442 - oSettings.fnRecordsTotal())+ oSettings.oLanguage.sInfoPostFix;
22.2443 - }
22.2444 - else if ( oSettings.fnRecordsDisplay() == oSettings.fnRecordsTotal() )
22.2445 - {
22.2446 - /* Normal record set */
22.2447 - nFirst.innerHTML = oSettings.oLanguage.sInfo.
22.2448 - replace('_START_',oSettings._iDisplayStart+1).
22.2449 - replace('_END_',oSettings.fnDisplayEnd()).
22.2450 - replace('_TOTAL_',oSettings.fnRecordsDisplay())+
22.2451 - oSettings.oLanguage.sInfoPostFix;
22.2452 - }
22.2453 - else
22.2454 - {
22.2455 - /* Record set after filtering */
22.2456 - nFirst.innerHTML =
22.2457 - oSettings.oLanguage.sInfo.
22.2458 - replace('_START_',oSettings._iDisplayStart+1).
22.2459 - replace('_END_',oSettings.fnDisplayEnd()).
22.2460 - replace('_TOTAL_',oSettings.fnRecordsDisplay()) +' '+
22.2461 - oSettings.oLanguage.sInfoFiltered.replace('_MAX_', oSettings.fnRecordsTotal())+
22.2462 - oSettings.oLanguage.sInfoPostFix;
22.2463 + oSettings.fnFormatNumber(oSettings.fnRecordsTotal()))+
22.2464 + oSettings.oLanguage.sInfoPostFix );
22.2465 }
22.2466
22.2467 /* No point in recalculating for the other info elements, just copy the first one in */
22.2468 var n = oSettings.aanFeatures.i;
22.2469 if ( n.length > 1 )
22.2470 {
22.2471 - var sInfo = nFirst.innerHTML;
22.2472 + var sInfo = jqFirst.html();
22.2473 for ( var i=1, iLen=n.length ; i<iLen ; i++ )
22.2474 {
22.2475 - n[i].innerHTML = sInfo;
22.2476 + $(n[i]).html( sInfo );
22.2477 }
22.2478 }
22.2479 }
22.2480 @@ -3882,13 +4716,27 @@
22.2481 {
22.2482 /* This can be overruled by not using the _MENU_ var/macro in the language variable */
22.2483 var sName = (oSettings.sTableId === "") ? "" : 'name="'+oSettings.sTableId+'_length"';
22.2484 - var sStdMenu =
22.2485 - '<select size="1" '+sName+'>'+
22.2486 - '<option value="10">10</option>'+
22.2487 - '<option value="25">25</option>'+
22.2488 - '<option value="50">50</option>'+
22.2489 - '<option value="100">100</option>'+
22.2490 - '</select>';
22.2491 + var sStdMenu = '<select size="1" '+sName+'>';
22.2492 + var i, iLen;
22.2493 +
22.2494 + if ( oSettings.aLengthMenu.length == 2 && typeof oSettings.aLengthMenu[0] == 'object' &&
22.2495 + typeof oSettings.aLengthMenu[1] == 'object' )
22.2496 + {
22.2497 + for ( i=0, iLen=oSettings.aLengthMenu[0].length ; i<iLen ; i++ )
22.2498 + {
22.2499 + sStdMenu += '<option value="'+oSettings.aLengthMenu[0][i]+'">'+
22.2500 + oSettings.aLengthMenu[1][i]+'</option>';
22.2501 + }
22.2502 + }
22.2503 + else
22.2504 + {
22.2505 + for ( i=0, iLen=oSettings.aLengthMenu.length ; i<iLen ; i++ )
22.2506 + {
22.2507 + sStdMenu += '<option value="'+oSettings.aLengthMenu[i]+'">'+
22.2508 + oSettings.aLengthMenu[i]+'</option>';
22.2509 + }
22.2510 + }
22.2511 + sStdMenu += '</select>';
22.2512
22.2513 var nLength = document.createElement( 'div' );
22.2514 if ( oSettings.sTableId !== '' && typeof oSettings.aanFeatures.l == "undefined" )
22.2515 @@ -3909,7 +4757,7 @@
22.2516
22.2517 /* Update all other length options for the new display */
22.2518 var n = oSettings.aanFeatures.l;
22.2519 - for ( var i=0, iLen=n.length ; i<iLen ; i++ )
22.2520 + for ( i=0, iLen=n.length ; i<iLen ; i++ )
22.2521 {
22.2522 if ( n[i] != this.parentNode )
22.2523 {
22.2524 @@ -3922,9 +4770,9 @@
22.2525 _fnCalculateEnd( oSettings );
22.2526
22.2527 /* If we have space to show extra rows (backing up from the end point - then do so */
22.2528 - if ( oSettings._iDisplayEnd == oSettings.aiDisplay.length )
22.2529 - {
22.2530 - oSettings._iDisplayStart = oSettings._iDisplayEnd - oSettings._iDisplayLength;
22.2531 + if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() )
22.2532 + {
22.2533 + oSettings._iDisplayStart = oSettings.fnDisplayEnd() - oSettings._iDisplayLength;
22.2534 if ( oSettings._iDisplayStart < 0 )
22.2535 {
22.2536 oSettings._iDisplayStart = 0;
22.2537 @@ -4057,9 +4905,23 @@
22.2538 */
22.2539 function _fnNodeToDataIndex( s, n )
22.2540 {
22.2541 - for ( var i=0, iLen=s.aoData.length ; i<iLen ; i++ )
22.2542 - {
22.2543 - if ( s.aoData[i] !== null && s.aoData[i].nTr == n )
22.2544 + var i, iLen;
22.2545 +
22.2546 + /* Optimisation - see if the nodes which are currently visible match, since that is
22.2547 + * the most likely node to be asked for (a selector or event for example)
22.2548 + */
22.2549 + for ( i=s._iDisplayStart, iLen=s._iDisplayEnd ; i<iLen ; i++ )
22.2550 + {
22.2551 + if ( s.aoData[ s.aiDisplay[i] ].nTr == n )
22.2552 + {
22.2553 + return s.aiDisplay[i];
22.2554 + }
22.2555 + }
22.2556 +
22.2557 + /* Otherwise we are in for a slog through the whole data cache */
22.2558 + for ( i=0, iLen=s.aoData.length ; i<iLen ; i++ )
22.2559 + {
22.2560 + if ( s.aoData[i].nTr == n )
22.2561 {
22.2562 return i;
22.2563 }
22.2564 @@ -4155,12 +5017,12 @@
22.2565 function _fnCalculateColumnWidths ( oSettings )
22.2566 {
22.2567 var iTableWidth = oSettings.nTable.offsetWidth;
22.2568 - var iTotalUserIpSize = 0;
22.2569 + var iUserInputs = 0;
22.2570 var iTmpWidth;
22.2571 var iVisibleColumns = 0;
22.2572 var iColums = oSettings.aoColumns.length;
22.2573 var i;
22.2574 - var oHeaders = $('thead:eq(0)>th', oSettings.nTable);
22.2575 + var oHeaders = $('th', oSettings.nTHead);
22.2576
22.2577 /* Convert any user input sizes into pixel sizes */
22.2578 for ( i=0 ; i<iColums ; i++ )
22.2579 @@ -4171,13 +5033,14 @@
22.2580
22.2581 if ( oSettings.aoColumns[i].sWidth !== null )
22.2582 {
22.2583 - iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidth,
22.2584 + iTmpWidth = _fnConvertToWidth( oSettings.aoColumns[i].sWidthOrig,
22.2585 oSettings.nTable.parentNode );
22.2586 -
22.2587 - /* Total up the user defined widths for later calculations */
22.2588 - iTotalUserIpSize += iTmpWidth;
22.2589 -
22.2590 - oSettings.aoColumns[i].sWidth = iTmpWidth+"px";
22.2591 + if ( iTmpWidth !== null )
22.2592 + {
22.2593 + oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
22.2594 + }
22.2595 +
22.2596 + iUserInputs++;
22.2597 }
22.2598 }
22.2599 }
22.2600 @@ -4187,104 +5050,267 @@
22.2601 * created by the web-browser. No custom sizes can be set in order for
22.2602 * this to happen
22.2603 */
22.2604 - if ( iColums == oHeaders.length && iTotalUserIpSize === 0 && iVisibleColumns == iColums )
22.2605 - {
22.2606 + if ( iColums == oHeaders.length && iUserInputs === 0 && iVisibleColumns == iColums )
22.2607 + {
22.2608 + _fnScrollingWidthAdjust( oSettings, oSettings.nTable );
22.2609 +
22.2610 for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
22.2611 {
22.2612 - oSettings.aoColumns[i].sWidth = oHeaders[i].offsetWidth+"px";
22.2613 + iTmpWidth = $(oHeaders[i]).width();
22.2614 + if ( iTmpWidth !== null )
22.2615 + {
22.2616 + oSettings.aoColumns[i].sWidth = _fnStringToCss( iTmpWidth );
22.2617 + }
22.2618 }
22.2619 }
22.2620 else
22.2621 {
22.2622 - /* Otherwise we are going to have to do some calculations to get
22.2623 - * the width of each column. Construct a 1 row table with the maximum
22.2624 - * string sizes in the data, and any user defined widths
22.2625 + /* Otherwise we are going to have to do some calculations to get the width of each column.
22.2626 + * Construct a 1 row table with the widest node in the data, and any user defined widths,
22.2627 + * then insert it into the DOM and allow the browser to do all the hard work of
22.2628 + * calculating table widths.
22.2629 */
22.2630 - var nCalcTmp = oSettings.nTable.cloneNode( false );
22.2631 - nCalcTmp.setAttribute( "id", '' );
22.2632 + var
22.2633 + nCalcTmp = oSettings.nTable.cloneNode( false ),
22.2634 + nBody = document.createElement( 'tbody' ),
22.2635 + nTr = document.createElement( 'tr' ),
22.2636 + nDivSizing;
22.2637
22.2638 - var sTableTmp = '<table class="'+nCalcTmp.className+'">';
22.2639 - var sCalcHead = "<tr>";
22.2640 - var sCalcHtml = "<tr>";
22.2641 + nCalcTmp.removeAttribute( "id" );
22.2642 + nCalcTmp.appendChild( oSettings.nTHead.cloneNode(true) );
22.2643 + if ( oSettings.nTFoot !== null )
22.2644 + {
22.2645 + nCalcTmp.appendChild( oSettings.nTFoot.cloneNode(true) );
22.2646 + _fnApplyToChildren( function(n) {
22.2647 + n.style.width = "";
22.2648 + }, nCalcTmp.getElementsByTagName('tr') );
22.2649 + }
22.2650
22.2651 - /* Construct a tempory table which we will inject (invisibly) into
22.2652 - * the dom - to let the browser do all the hard word
22.2653 - */
22.2654 + nCalcTmp.appendChild( nBody );
22.2655 + nBody.appendChild( nTr );
22.2656 +
22.2657 + /* Remove any sizing that was previously applied by the styles */
22.2658 + var jqColSizing = $('thead th', nCalcTmp);
22.2659 + if ( jqColSizing.length === 0 )
22.2660 + {
22.2661 + jqColSizing = $('tbody tr:eq(0)>td', nCalcTmp);
22.2662 + }
22.2663 + jqColSizing.each( function (i) {
22.2664 + this.style.width = "";
22.2665 +
22.2666 + var iIndex = _fnVisibleToColumnIndex( oSettings, i );
22.2667 + if ( iIndex !== null && oSettings.aoColumns[iIndex].sWidthOrig !== "" )
22.2668 + {
22.2669 + this.style.width = oSettings.aoColumns[iIndex].sWidthOrig;
22.2670 + }
22.2671 + } );
22.2672 +
22.2673 + /* Find the biggest td for each column and put it into the table */
22.2674 for ( i=0 ; i<iColums ; i++ )
22.2675 {
22.2676 if ( oSettings.aoColumns[i].bVisible )
22.2677 {
22.2678 - sCalcHead += '<th>'+oSettings.aoColumns[i].sTitle+'</th>';
22.2679 -
22.2680 - if ( oSettings.aoColumns[i].sWidth !== null )
22.2681 + var nTd = _fnGetWidestNode( oSettings, i );
22.2682 + if ( nTd !== null )
22.2683 {
22.2684 - var sWidth = '';
22.2685 - if ( oSettings.aoColumns[i].sWidth !== null )
22.2686 - {
22.2687 - sWidth = ' style="width:'+oSettings.aoColumns[i].sWidth+';"';
22.2688 - }
22.2689 -
22.2690 - sCalcHtml += '<td'+sWidth+' tag_index="'+i+'">'+fnGetMaxLenString( oSettings, i)+'</td>';
22.2691 - }
22.2692 - else
22.2693 - {
22.2694 - sCalcHtml += '<td tag_index="'+i+'">'+fnGetMaxLenString( oSettings, i)+'</td>';
22.2695 + nTd = nTd.cloneNode(true);
22.2696 + nTr.appendChild( nTd );
22.2697 }
22.2698 }
22.2699 }
22.2700
22.2701 - sCalcHead += "</tr>";
22.2702 - sCalcHtml += "</tr>";
22.2703 + /* Build the table and 'display' it */
22.2704 + var nWrapper = oSettings.nTable.parentNode;
22.2705 + nWrapper.appendChild( nCalcTmp );
22.2706
22.2707 - /* Create the tmp table node (thank you jQuery) */
22.2708 - nCalcTmp = $( sTableTmp + sCalcHead + sCalcHtml +'</table>' )[0];
22.2709 - nCalcTmp.style.width = iTableWidth + "px";
22.2710 + if ( oSettings.oScroll.sX !== "" && oSettings.oScroll.sXInner !== "" )
22.2711 + {
22.2712 + nCalcTmp.style.width = _fnStringToCss(oSettings.oScroll.sXInner);
22.2713 + }
22.2714 + else if ( oSettings.oScroll.sX !== "" )
22.2715 + {
22.2716 + nCalcTmp.style.width = "";
22.2717 + if ( $(nCalcTmp).width() < nWrapper.offsetWidth )
22.2718 + {
22.2719 + nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
22.2720 + }
22.2721 + }
22.2722 + else
22.2723 + {
22.2724 + nCalcTmp.style.width = _fnStringToCss( nWrapper.offsetWidth );
22.2725 + }
22.2726 nCalcTmp.style.visibility = "hidden";
22.2727 - nCalcTmp.style.position = "absolute"; /* Try to aviod scroll bar */
22.2728
22.2729 - oSettings.nTable.parentNode.appendChild( nCalcTmp );
22.2730 + /* Scrolling considerations */
22.2731 + _fnScrollingWidthAdjust( oSettings, nCalcTmp );
22.2732
22.2733 - var oNodes = $("tr:eq(1)>td", nCalcTmp);
22.2734 - var iIndex;
22.2735 + /* Read the width's calculated by the browser and store them for use by the caller. We
22.2736 + * first of all try to use the elements in the body, but it is possible that there are
22.2737 + * no elements there, under which circumstances we use the header elements
22.2738 + */
22.2739 + var oNodes = $("tbody tr:eq(0)>td", nCalcTmp);
22.2740 + if ( oNodes.length === 0 )
22.2741 + {
22.2742 + oNodes = $("thead tr:eq(0)>th", nCalcTmp);
22.2743 + }
22.2744
22.2745 - /* Gather in the browser calculated widths for the rows */
22.2746 - for ( i=0 ; i<oNodes.length ; i++ )
22.2747 - {
22.2748 - iIndex = oNodes[i].getAttribute('tag_index');
22.2749 -
22.2750 - oSettings.aoColumns[iIndex].sWidth = $("td", nCalcTmp)[i].offsetWidth +"px";
22.2751 + var iIndex, iCorrector = 0, iWidth;
22.2752 + for ( i=0 ; i<oSettings.aoColumns.length ; i++ )
22.2753 + {
22.2754 + if ( oSettings.aoColumns[i].bVisible )
22.2755 + {
22.2756 + iWidth = $(oNodes[iCorrector]).width();
22.2757 + if ( iWidth !== null && iWidth > 0 )
22.2758 + {
22.2759 + oSettings.aoColumns[i].sWidth = _fnStringToCss( iWidth );
22.2760 + }
22.2761 + iCorrector++;
22.2762 + }
22.2763 }
22.2764
22.2765 - oSettings.nTable.parentNode.removeChild( nCalcTmp );
22.2766 + oSettings.nTable.style.width = _fnStringToCss( $(nCalcTmp).outerWidth() );
22.2767 + nCalcTmp.parentNode.removeChild( nCalcTmp );
22.2768 }
22.2769 }
22.2770
22.2771 /*
22.2772 - * Function: fnGetMaxLenString
22.2773 + * Function: _fnScrollingWidthAdjust
22.2774 + * Purpose: Adjust a table's width to take account of scrolling
22.2775 + * Returns: -
22.2776 + * Inputs: object:oSettings - dataTables settings object
22.2777 + * node:n - table node
22.2778 + */
22.2779 + function _fnScrollingWidthAdjust ( oSettings, n )
22.2780 + {
22.2781 + if ( oSettings.oScroll.sX === "" && oSettings.oScroll.sY !== "" )
22.2782 + {
22.2783 + /* When y-scrolling only, we want to remove the width of the scroll bar so the table
22.2784 + * + scroll bar will fit into the area avaialble.
22.2785 + */
22.2786 + var iOrigWidth = $(n).width();
22.2787 + n.style.width = _fnStringToCss( $(n).outerWidth()-oSettings.oScroll.iBarWidth );
22.2788 + }
22.2789 + else if ( oSettings.oScroll.sX !== "" )
22.2790 + {
22.2791 + /* When x-scrolling both ways, fix the table at it's current size, without adjusting */
22.2792 + n.style.width = _fnStringToCss( $(n).outerWidth() );
22.2793 + }
22.2794 + }
22.2795 +
22.2796 + /*
22.2797 + * Function: _fnGetWidestNode
22.2798 + * Purpose: Get the widest node
22.2799 + * Returns: string: - max strlens for each column
22.2800 + * Inputs: object:oSettings - dataTables settings object
22.2801 + * int:iCol - column of interest
22.2802 + * boolean:bFast - Should we use fast (but non-accurate) calculation - optional,
22.2803 + * default true
22.2804 + * Notes: This operation is _expensive_ (!!!). It requires a lot of DOM interaction, but
22.2805 + * this is the only way to reliably get the widest string. For example 'mmm' would be wider
22.2806 + * than 'iiii' so we can't just ocunt characters. If this can be optimised it would be good
22.2807 + * to do so!
22.2808 + */
22.2809 + function _fnGetWidestNode( oSettings, iCol, bFast )
22.2810 + {
22.2811 + /* Use fast not non-accurate calculate based on the strlen */
22.2812 + if ( typeof bFast == 'undefined' || bFast )
22.2813 + {
22.2814 + var iMaxLen = _fnGetMaxLenString( oSettings, iCol );
22.2815 + var iFastVis = _fnColumnIndexToVisible( oSettings, iCol);
22.2816 + if ( iMaxLen < 0 )
22.2817 + {
22.2818 + return null;
22.2819 + }
22.2820 + return oSettings.aoData[iMaxLen].nTr.getElementsByTagName('td')[iFastVis];
22.2821 + }
22.2822 +
22.2823 + /* Use the slow approach, but get high quality answers - note that this code is not actually
22.2824 + * used by DataTables by default. If you want to use it you can alter the call to
22.2825 + * _fnGetWidestNode to pass 'false' as the third argument
22.2826 + */
22.2827 + var
22.2828 + iMax = -1, i, iLen,
22.2829 + iMaxIndex = -1,
22.2830 + n = document.createElement('div');
22.2831 +
22.2832 + n.style.visibility = "hidden";
22.2833 + n.style.position = "absolute";
22.2834 + document.body.appendChild( n );
22.2835 +
22.2836 + for ( i=0, iLen=oSettings.aoData.length ; i<iLen ; i++ )
22.2837 + {
22.2838 + n.innerHTML = oSettings.aoData[i]._aData[iCol];
22.2839 + if ( n.offsetWidth > iMax )
22.2840 + {
22.2841 + iMax = n.offsetWidth;
22.2842 + iMaxIndex = i;
22.2843 + }
22.2844 + }
22.2845 + document.body.removeChild( n );
22.2846 +
22.2847 + if ( iMaxIndex >= 0 )
22.2848 + {
22.2849 + var iVis = _fnColumnIndexToVisible( oSettings, iCol);
22.2850 + var nRet = oSettings.aoData[iMaxIndex].nTr.getElementsByTagName('td')[iVis];
22.2851 + if ( nRet )
22.2852 + {
22.2853 + return nRet;
22.2854 + }
22.2855 + }
22.2856 + return null;
22.2857 + }
22.2858 +
22.2859 + /*
22.2860 + * Function: _fnGetMaxLenString
22.2861 * Purpose: Get the maximum strlen for each data column
22.2862 * Returns: string: - max strlens for each column
22.2863 * Inputs: object:oSettings - dataTables settings object
22.2864 * int:iCol - column of interest
22.2865 */
22.2866 - function fnGetMaxLenString( oSettings, iCol )
22.2867 + function _fnGetMaxLenString( oSettings, iCol )
22.2868 {
22.2869 var iMax = 0;
22.2870 var iMaxIndex = -1;
22.2871
22.2872 for ( var i=0 ; i<oSettings.aoData.length ; i++ )
22.2873 {
22.2874 - if ( oSettings.aoData[i]._aData[iCol].length > iMax )
22.2875 - {
22.2876 - iMax = oSettings.aoData[i]._aData[iCol].length;
22.2877 + var s = oSettings.aoData[i]._aData[iCol];
22.2878 + if ( s.length > iMax )
22.2879 + {
22.2880 + iMax = s.length;
22.2881 iMaxIndex = i;
22.2882 }
22.2883 }
22.2884
22.2885 - if ( iMaxIndex >= 0 )
22.2886 - {
22.2887 - return oSettings.aoData[iMaxIndex]._aData[iCol];
22.2888 - }
22.2889 - return '';
22.2890 + return iMaxIndex;
22.2891 + }
22.2892 +
22.2893 + /*
22.2894 + * Function: _fnStringToCss
22.2895 + * Purpose: Append a CSS unit (only if required) to a string
22.2896 + * Returns: 0 if match, 1 if length is different, 2 if no match
22.2897 + * Inputs: array:aArray1 - first array
22.2898 + * array:aArray2 - second array
22.2899 + */
22.2900 + function _fnStringToCss( s )
22.2901 + {
22.2902 + if ( s === null )
22.2903 + {
22.2904 + return "0px";
22.2905 + }
22.2906 +
22.2907 + if ( typeof s == 'number' )
22.2908 + {
22.2909 + return s+"px";
22.2910 + }
22.2911 +
22.2912 + if ( s.indexOf('em') != -1 || s.indexOf('%') != -1 || s.indexOf('ex') != -1 ||
22.2913 + s.indexOf('px') != -1 )
22.2914 + {
22.2915 + return s;
22.2916 + }
22.2917 +
22.2918 + return s+"px";
22.2919 }
22.2920
22.2921 /*
22.2922 @@ -4368,14 +5394,7 @@
22.2923 var iLen = oSettings.aoData.length;
22.2924 for ( var i=0 ; i<iLen; i++ )
22.2925 {
22.2926 - if ( oSettings.aoData[i] === null )
22.2927 - {
22.2928 - aData.push( null );
22.2929 - }
22.2930 - else
22.2931 - {
22.2932 - aData.push( oSettings.aoData[i]._aData );
22.2933 - }
22.2934 + aData.push( oSettings.aoData[i]._aData );
22.2935 }
22.2936 return aData;
22.2937 }
22.2938 @@ -4392,14 +5411,7 @@
22.2939 var iLen = oSettings.aoData.length;
22.2940 for ( var i=0 ; i<iLen ; i++ )
22.2941 {
22.2942 - if ( oSettings.aoData[i] === null )
22.2943 - {
22.2944 - aNodes.push( null );
22.2945 - }
22.2946 - else
22.2947 - {
22.2948 - aNodes.push( oSettings.aoData[i].nTr );
22.2949 - }
22.2950 + aNodes.push( oSettings.aoData[i].nTr );
22.2951 }
22.2952 return aNodes;
22.2953 }
22.2954 @@ -4424,7 +5436,7 @@
22.2955 for ( iColumn=0, iColumns=nTrs[iRow].childNodes.length ; iColumn<iColumns ; iColumn++ )
22.2956 {
22.2957 nTd = nTrs[iRow].childNodes[iColumn];
22.2958 - if ( nTd.nodeName == "TD" )
22.2959 + if ( nTd.nodeName.toUpperCase() == "TD" )
22.2960 {
22.2961 nTds.push( nTd );
22.2962 }
22.2963 @@ -4461,6 +5473,36 @@
22.2964 }
22.2965
22.2966 /*
22.2967 + * Function: _fnDeleteIndex
22.2968 + * Purpose: Take an array of integers (index array) and remove a target integer (value - not
22.2969 + * the key!)
22.2970 + * Returns: -
22.2971 + * Inputs: a:array int - Index array to target
22.2972 + * int:iTarget - value to find
22.2973 + */
22.2974 + function _fnDeleteIndex( a, iTarget )
22.2975 + {
22.2976 + var iTargetIndex = -1;
22.2977 +
22.2978 + for ( var i=0, iLen=a.length ; i<iLen ; i++ )
22.2979 + {
22.2980 + if ( a[i] == iTarget )
22.2981 + {
22.2982 + iTargetIndex = i;
22.2983 + }
22.2984 + else if ( a[i] > iTarget )
22.2985 + {
22.2986 + a[i]--;
22.2987 + }
22.2988 + }
22.2989 +
22.2990 + if ( iTargetIndex != -1 )
22.2991 + {
22.2992 + a.splice( iTargetIndex, 1 );
22.2993 + }
22.2994 + }
22.2995 +
22.2996 + /*
22.2997 * Function: _fnReOrderIndex
22.2998 * Purpose: Figure out how to reorder a display list
22.2999 * Returns: array int:aiReturn - index list for reordering
22.3000 @@ -4507,6 +5549,37 @@
22.3001 }
22.3002
22.3003 /*
22.3004 + * Function: _fnLog
22.3005 + * Purpose: Log an error message
22.3006 + * Returns: -
22.3007 + * Inputs: int:iLevel - log error messages, or display them to the user
22.3008 + * string:sMesg - error message
22.3009 + */
22.3010 + function _fnLog( oSettings, iLevel, sMesg )
22.3011 + {
22.3012 + var sAlert = oSettings.sTableId === "" ?
22.3013 + "DataTables warning: " +sMesg :
22.3014 + "DataTables warning (table id = '"+oSettings.sTableId+"'): " +sMesg;
22.3015 +
22.3016 + if ( iLevel === 0 )
22.3017 + {
22.3018 + if ( _oExt.sErrMode == 'alert' )
22.3019 + {
22.3020 + alert( sAlert );
22.3021 + }
22.3022 + else
22.3023 + {
22.3024 + throw sAlert;
22.3025 + }
22.3026 + return;
22.3027 + }
22.3028 + else if ( typeof console != 'undefined' && typeof console.log != 'undefined' )
22.3029 + {
22.3030 + console.log( sAlert );
22.3031 + }
22.3032 + }
22.3033 +
22.3034 + /*
22.3035 * Function: _fnClearTable
22.3036 * Purpose: Nuke the table
22.3037 * Returns: -
22.3038 @@ -4536,11 +5609,12 @@
22.3039 /* Store the interesting variables */
22.3040 var i;
22.3041 var sValue = "{";
22.3042 + sValue += '"iCreate": '+new Date().getTime()+',';
22.3043 sValue += '"iStart": '+oSettings._iDisplayStart+',';
22.3044 sValue += '"iEnd": '+oSettings._iDisplayEnd+',';
22.3045 sValue += '"iLength": '+oSettings._iDisplayLength+',';
22.3046 sValue += '"sFilter": "'+oSettings.oPreviousSearch.sSearch.replace('"','\\"')+'",';
22.3047 - sValue += '"sFilterEsc": '+oSettings.oPreviousSearch.bEscapeRegex+',';
22.3048 + sValue += '"sFilterEsc": '+!oSettings.oPreviousSearch.bRegex+',';
22.3049
22.3050 sValue += '"aaSorting": [ ';
22.3051 for ( i=0 ; i<oSettings.aaSorting.length ; i++ )
22.3052 @@ -4554,7 +5628,7 @@
22.3053 for ( i=0 ; i<oSettings.aoPreSearchCols.length ; i++ )
22.3054 {
22.3055 sValue += "['"+oSettings.aoPreSearchCols[i].sSearch.replace("'","\'")+
22.3056 - "',"+oSettings.aoPreSearchCols[i].bEscapeRegex+"],";
22.3057 + "',"+!oSettings.aoPreSearchCols[i].bRegex+"],";
22.3058 }
22.3059 sValue = sValue.substring(0, sValue.length-1);
22.3060 sValue += "],";
22.3061 @@ -4568,8 +5642,8 @@
22.3062 sValue += "]";
22.3063
22.3064 sValue += "}";
22.3065 - _fnCreateCookie( "SpryMedia_DataTables_"+oSettings.sInstance, sValue,
22.3066 - oSettings.iCookieDuration );
22.3067 + _fnCreateCookie( oSettings.sCookiePrefix+oSettings.sInstance, sValue,
22.3068 + oSettings.iCookieDuration, oSettings.sCookiePrefix );
22.3069 }
22.3070
22.3071 /*
22.3072 @@ -4587,7 +5661,7 @@
22.3073 }
22.3074
22.3075 var oData;
22.3076 - var sData = _fnReadCookie( "SpryMedia_DataTables_"+oSettings.sInstance );
22.3077 + var sData = _fnReadCookie( oSettings.sCookiePrefix+oSettings.sInstance );
22.3078 if ( sData !== null && sData !== '' )
22.3079 {
22.3080 /* Try/catch the JSON eval - if it is bad then we ignore it */
22.3081 @@ -4619,11 +5693,16 @@
22.3082 oSettings._iDisplayLength = oData.iLength;
22.3083 oSettings.oPreviousSearch.sSearch = oData.sFilter;
22.3084 oSettings.aaSorting = oData.aaSorting.slice();
22.3085 + oSettings.saved_aaSorting = oData.aaSorting.slice();
22.3086
22.3087 - /* Search filtering - global reference added in 1.4.1 */
22.3088 + /*
22.3089 + * Search filtering - global reference added in 1.4.1
22.3090 + * Note that we use a 'not' for the value of the regular expression indicator to maintain
22.3091 + * compatibility with pre 1.7 versions, where this was basically inverted. Added in 1.7.0
22.3092 + */
22.3093 if ( typeof oData.sFilterEsc != 'undefined' )
22.3094 {
22.3095 - oSettings.oPreviousSearch.bEscapeRegex = oData.sFilterEsc;
22.3096 + oSettings.oPreviousSearch.bRegex = !oData.sFilterEsc;
22.3097 }
22.3098
22.3099 /* Column filtering - added in 1.5.0 beta 6 */
22.3100 @@ -4633,7 +5712,7 @@
22.3101 {
22.3102 oSettings.aoPreSearchCols[i] = {
22.3103 "sSearch": oData.aaSearchCols[i][0],
22.3104 - "bEscapeRegex": oData.aaSearchCols[i][1]
22.3105 + "bRegex": !oData.aaSearchCols[i][1]
22.3106 };
22.3107 }
22.3108 }
22.3109 @@ -4661,21 +5740,60 @@
22.3110 * Inputs: string:sName - name of the cookie to create
22.3111 * string:sValue - the value the cookie should take
22.3112 * int:iSecs - duration of the cookie
22.3113 + * string:sBaseName - sName is made up of the base + file name - this is the base
22.3114 */
22.3115 - function _fnCreateCookie ( sName, sValue, iSecs )
22.3116 + function _fnCreateCookie ( sName, sValue, iSecs, sBaseName )
22.3117 {
22.3118 var date = new Date();
22.3119 date.setTime( date.getTime()+(iSecs*1000) );
22.3120
22.3121 /*
22.3122 - * Shocking but true - it would appear IE has major issues with having the path being
22.3123 - * set to anything but root. We need the cookie to be available based on the path, so we
22.3124 - * have to append the pathname to the cookie name. Appalling.
22.3125 + * Shocking but true - it would appear IE has major issues with having the path not having
22.3126 + * a trailing slash on it. We need the cookie to be available based on the path, so we
22.3127 + * have to append the file name to the cookie name. Appalling. Thanks to vex for adding the
22.3128 + * patch to use at least some of the path
22.3129 */
22.3130 - sName += '_'+window.location.pathname.replace(/[\/:]/g,"").toLowerCase();
22.3131 -
22.3132 - document.cookie = sName+"="+encodeURIComponent(sValue)+
22.3133 - "; expires="+date.toGMTString()+"; path=/";
22.3134 + var aParts = window.location.pathname.split('/');
22.3135 + var sNameFile = sName + '_' + aParts.pop().replace(/[\/:]/g,"").toLowerCase();
22.3136 + var sFullCookie = sNameFile + "=" + encodeURIComponent(sValue) +
22.3137 + "; expires=" + date.toGMTString() +
22.3138 + "; path=" + aParts.join('/') + "/";
22.3139 +
22.3140 + /* Are we going to go over the cookie limit of 4KiB? If so, try to delete a cookies
22.3141 + * belonging to DataTables. This is FAR from bullet proof
22.3142 + */
22.3143 + var sOldName="", iOldTime=9999999999999, oData;
22.3144 + var iLength = _fnReadCookie( sNameFile )!==null ? document.cookie.length :
22.3145 + sFullCookie.length + document.cookie.length;
22.3146 +
22.3147 + if ( iLength+10 > 4096 ) /* Magic 10 for padding */
22.3148 + {
22.3149 + var aCookies =document.cookie.split(';');
22.3150 + for ( var i=0, iLen=aCookies.length ; i<iLen ; i++ )
22.3151 + {
22.3152 + if ( aCookies[i].indexOf( sBaseName ) != -1 )
22.3153 + {
22.3154 + /* It's a DataTables cookie, so eval it and check the time stamp */
22.3155 + var aSplitCookie = aCookies[i].split('=');
22.3156 + try { oData = eval( '('+decodeURIComponent(aSplitCookie[1])+')' ); }
22.3157 + catch( e ) { continue; }
22.3158 +
22.3159 + if ( typeof oData.iCreate != 'undefined' && oData.iCreate < iOldTime )
22.3160 + {
22.3161 + sOldName = aSplitCookie[0];
22.3162 + iOldTime = oData.iCreate;
22.3163 + }
22.3164 + }
22.3165 + }
22.3166 +
22.3167 + if ( sOldName !== "" )
22.3168 + {
22.3169 + document.cookie = sOldName+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+
22.3170 + aParts.join('/') + "/";
22.3171 + }
22.3172 + }
22.3173 +
22.3174 + document.cookie = sFullCookie;
22.3175 }
22.3176
22.3177 /*
22.3178 @@ -4686,8 +5804,10 @@
22.3179 */
22.3180 function _fnReadCookie ( sName )
22.3181 {
22.3182 - var sNameEQ = sName +'_'+ window.location.pathname.replace(/[\/:]/g,"").toLowerCase() + "=";
22.3183 - var sCookieContents = document.cookie.split(';');
22.3184 + var
22.3185 + aParts = window.location.pathname.split('/'),
22.3186 + sNameEQ = sName + '_' + aParts[aParts.length-1].replace(/[\/:]/g,"").toLowerCase() + '=',
22.3187 + sCookieContents = document.cookie.split(';');
22.3188
22.3189 for( var i=0 ; i<sCookieContents.length ; i++ )
22.3190 {
22.3191 @@ -4747,7 +5867,8 @@
22.3192
22.3193 for ( j=0, jLen=nTrs[i].childNodes.length ; j<jLen ; j++ )
22.3194 {
22.3195 - if ( nTrs[i].childNodes[j].nodeName == "TD" || nTrs[i].childNodes[j].nodeName == "TH" )
22.3196 + if ( nTrs[i].childNodes[j].nodeName.toUpperCase() == "TD" ||
22.3197 + nTrs[i].childNodes[j].nodeName.toUpperCase() == "TH" )
22.3198 {
22.3199 nTds.push( nTrs[i].childNodes[j] );
22.3200 }
22.3201 @@ -4761,7 +5882,7 @@
22.3202 if ( !iColspan || iColspan===0 || iColspan===1 )
22.3203 {
22.3204 iColumnShifted = fnShiftCol( aLayout, i, iColumn );
22.3205 - aLayout[i][iColumnShifted] = (nTds[j].nodeName=="TD") ? TDELEM : nTds[j];
22.3206 + aLayout[i][iColumnShifted] = (nTds[j].nodeName.toUpperCase()=="TD") ? TDELEM : nTds[j];
22.3207 if ( iRowspan || iRowspan===0 || iRowspan===1 )
22.3208 {
22.3209 for ( k=1 ; k<iRowspan ; k++ )
22.3210 @@ -4804,6 +5925,75 @@
22.3211 }
22.3212
22.3213 /*
22.3214 + * Function: _fnScrollBarWidth
22.3215 + * Purpose: Get the width of a scroll bar in this browser being used
22.3216 + * Returns: int: - width in pixels
22.3217 + * Inputs: -
22.3218 + * Notes: All credit for this function belongs to Alexandre Gomes. Thanks for sharing!
22.3219 + * http://www.alexandre-gomes.com/?p=115
22.3220 + */
22.3221 + function _fnScrollBarWidth ()
22.3222 + {
22.3223 + var inner = document.createElement('p');
22.3224 + var style = inner.style;
22.3225 + style.width = "100%";
22.3226 + style.height = "200px";
22.3227 +
22.3228 + var outer = document.createElement('div');
22.3229 + style = outer.style;
22.3230 + style.position = "absolute";
22.3231 + style.top = "0px";
22.3232 + style.left = "0px";
22.3233 + style.visibility = "hidden";
22.3234 + style.width = "200px";
22.3235 + style.height = "150px";
22.3236 + style.overflow = "hidden";
22.3237 + outer.appendChild(inner);
22.3238 +
22.3239 + document.body.appendChild(outer);
22.3240 + var w1 = inner.offsetWidth;
22.3241 + outer.style.overflow = 'scroll';
22.3242 + var w2 = inner.offsetWidth;
22.3243 + if ( w1 == w2 )
22.3244 + {
22.3245 + w2 = outer.clientWidth;
22.3246 + }
22.3247 +
22.3248 + document.body.removeChild(outer);
22.3249 + return (w1 - w2);
22.3250 + }
22.3251 +
22.3252 + /*
22.3253 + * Function: _fnApplyToChildren
22.3254 + * Purpose: Apply a given function to the display child nodes of an element array (typically
22.3255 + * TD children of TR rows
22.3256 + * Returns: - (done by reference)
22.3257 + * Inputs: function:fn - Method to apply to the objects
22.3258 + * array nodes:an1 - List of elements to look through for display children
22.3259 + * array nodes:an2 - Another list (identical structure to the first) - optional
22.3260 + */
22.3261 + function _fnApplyToChildren( fn, an1, an2 )
22.3262 + {
22.3263 + for ( var i=0, iLen=an1.length ; i<iLen ; i++ )
22.3264 + {
22.3265 + for ( var j=0, jLen=an1[i].childNodes.length ; j<jLen ; j++ )
22.3266 + {
22.3267 + if ( an1[i].childNodes[j].nodeType == 1 )
22.3268 + {
22.3269 + if ( typeof an2 != 'undefined' )
22.3270 + {
22.3271 + fn( an1[i].childNodes[j], an2[i].childNodes[j] );
22.3272 + }
22.3273 + else
22.3274 + {
22.3275 + fn( an1[i].childNodes[j] );
22.3276 + }
22.3277 + }
22.3278 + }
22.3279 + }
22.3280 + }
22.3281 +
22.3282 + /*
22.3283 * Function: _fnMap
22.3284 * Purpose: See if a property is defined on one object, if so assign it to the other object
22.3285 * Returns: - (done by reference)
22.3286 @@ -4832,70 +6022,120 @@
22.3287 * appear to be possible. Bonkers. A better solution would be to provide a 'bind' type object
22.3288 * To do - bind type method in DTs 2.x.
22.3289 */
22.3290 + this.oApi._fnExternApiFunc = _fnExternApiFunc;
22.3291 this.oApi._fnInitalise = _fnInitalise;
22.3292 this.oApi._fnLanguageProcess = _fnLanguageProcess;
22.3293 this.oApi._fnAddColumn = _fnAddColumn;
22.3294 + this.oApi._fnColumnOptions = _fnColumnOptions;
22.3295 this.oApi._fnAddData = _fnAddData;
22.3296 this.oApi._fnGatherData = _fnGatherData;
22.3297 this.oApi._fnDrawHead = _fnDrawHead;
22.3298 this.oApi._fnDraw = _fnDraw;
22.3299 + this.oApi._fnReDraw = _fnReDraw;
22.3300 this.oApi._fnAjaxUpdate = _fnAjaxUpdate;
22.3301 + this.oApi._fnAjaxUpdateDraw = _fnAjaxUpdateDraw;
22.3302 this.oApi._fnAddOptionsHtml = _fnAddOptionsHtml;
22.3303 + this.oApi._fnFeatureHtmlTable = _fnFeatureHtmlTable;
22.3304 + this.oApi._fnScrollDraw = _fnScrollDraw;
22.3305 + this.oApi._fnAjustColumnSizing = _fnAjustColumnSizing;
22.3306 this.oApi._fnFeatureHtmlFilter = _fnFeatureHtmlFilter;
22.3307 - this.oApi._fnFeatureHtmlInfo = _fnFeatureHtmlInfo;
22.3308 + this.oApi._fnFilterComplete = _fnFilterComplete;
22.3309 + this.oApi._fnFilterCustom = _fnFilterCustom;
22.3310 + this.oApi._fnFilterColumn = _fnFilterColumn;
22.3311 + this.oApi._fnFilter = _fnFilter;
22.3312 + this.oApi._fnBuildSearchArray = _fnBuildSearchArray;
22.3313 + this.oApi._fnFilterCreateSearch = _fnFilterCreateSearch;
22.3314 + this.oApi._fnDataToSearch = _fnDataToSearch;
22.3315 + this.oApi._fnSort = _fnSort;
22.3316 + this.oApi._fnSortAttachListener = _fnSortAttachListener;
22.3317 + this.oApi._fnSortingClasses = _fnSortingClasses;
22.3318 this.oApi._fnFeatureHtmlPaginate = _fnFeatureHtmlPaginate;
22.3319 this.oApi._fnPageChange = _fnPageChange;
22.3320 + this.oApi._fnFeatureHtmlInfo = _fnFeatureHtmlInfo;
22.3321 + this.oApi._fnUpdateInfo = _fnUpdateInfo;
22.3322 this.oApi._fnFeatureHtmlLength = _fnFeatureHtmlLength;
22.3323 this.oApi._fnFeatureHtmlProcessing = _fnFeatureHtmlProcessing;
22.3324 this.oApi._fnProcessingDisplay = _fnProcessingDisplay;
22.3325 - this.oApi._fnFilterComplete = _fnFilterComplete;
22.3326 - this.oApi._fnFilterColumn = _fnFilterColumn;
22.3327 - this.oApi._fnFilter = _fnFilter;
22.3328 - this.oApi._fnSortingClasses = _fnSortingClasses;
22.3329 this.oApi._fnVisibleToColumnIndex = _fnVisibleToColumnIndex;
22.3330 this.oApi._fnColumnIndexToVisible = _fnColumnIndexToVisible;
22.3331 this.oApi._fnNodeToDataIndex = _fnNodeToDataIndex;
22.3332 this.oApi._fnVisbleColumns = _fnVisbleColumns;
22.3333 - this.oApi._fnBuildSearchArray = _fnBuildSearchArray;
22.3334 - this.oApi._fnDataToSearch = _fnDataToSearch;
22.3335 this.oApi._fnCalculateEnd = _fnCalculateEnd;
22.3336 this.oApi._fnConvertToWidth = _fnConvertToWidth;
22.3337 this.oApi._fnCalculateColumnWidths = _fnCalculateColumnWidths;
22.3338 + this.oApi._fnScrollingWidthAdjust = _fnScrollingWidthAdjust;
22.3339 + this.oApi._fnGetWidestNode = _fnGetWidestNode;
22.3340 + this.oApi._fnGetMaxLenString = _fnGetMaxLenString;
22.3341 + this.oApi._fnStringToCss = _fnStringToCss;
22.3342 this.oApi._fnArrayCmp = _fnArrayCmp;
22.3343 this.oApi._fnDetectType = _fnDetectType;
22.3344 + this.oApi._fnSettingsFromNode = _fnSettingsFromNode;
22.3345 this.oApi._fnGetDataMaster = _fnGetDataMaster;
22.3346 this.oApi._fnGetTrNodes = _fnGetTrNodes;
22.3347 this.oApi._fnGetTdNodes = _fnGetTdNodes;
22.3348 this.oApi._fnEscapeRegex = _fnEscapeRegex;
22.3349 + this.oApi._fnDeleteIndex = _fnDeleteIndex;
22.3350 this.oApi._fnReOrderIndex = _fnReOrderIndex;
22.3351 this.oApi._fnColumnOrdering = _fnColumnOrdering;
22.3352 + this.oApi._fnLog = _fnLog;
22.3353 this.oApi._fnClearTable = _fnClearTable;
22.3354 this.oApi._fnSaveState = _fnSaveState;
22.3355 this.oApi._fnLoadState = _fnLoadState;
22.3356 this.oApi._fnCreateCookie = _fnCreateCookie;
22.3357 this.oApi._fnReadCookie = _fnReadCookie;
22.3358 this.oApi._fnGetUniqueThs = _fnGetUniqueThs;
22.3359 - this.oApi._fnReDraw = _fnReDraw;
22.3360 -
22.3361 - /* Want to be able to reference "this" inside the this.each function */
22.3362 - var _that = this;
22.3363 + this.oApi._fnScrollBarWidth = _fnScrollBarWidth;
22.3364 + this.oApi._fnApplyToChildren = _fnApplyToChildren;
22.3365 + this.oApi._fnMap = _fnMap;
22.3366
22.3367
22.3368 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
22.3369 * Section - Constructor
22.3370 */
22.3371 +
22.3372 + /* Want to be able to reference "this" inside the this.each function */
22.3373 + var _that = this;
22.3374 return this.each(function()
22.3375 {
22.3376 - var i=0, iLen, j, jLen;
22.3377 -
22.3378 - /* Sanity check that we are not re-initialising a table - if we are, alert an error */
22.3379 + var i=0, iLen, j, jLen, k, kLen;
22.3380 +
22.3381 + /* Check to see if we are re-initalising a table */
22.3382 for ( i=0, iLen=_aoSettings.length ; i<iLen ; i++ )
22.3383 {
22.3384 + /* Base check on table node */
22.3385 if ( _aoSettings[i].nTable == this )
22.3386 {
22.3387 - alert( "DataTables warning: Unable to re-initialise DataTable. "+
22.3388 - "Please use the API to make any configuration changes required." );
22.3389 - return _aoSettings[i];
22.3390 + if ( typeof oInit == 'undefined' ||
22.3391 + ( typeof oInit.bRetrieve != 'undefined' && oInit.bRetrieve === true ) )
22.3392 + {
22.3393 + return _aoSettings[i].oInstance;
22.3394 + }
22.3395 + else if ( typeof oInit.bDestroy != 'undefined' && oInit.bDestroy === true )
22.3396 + {
22.3397 + _aoSettings[i].oInstance.fnDestroy();
22.3398 + break;
22.3399 + }
22.3400 + else
22.3401 + {
22.3402 + _fnLog( _aoSettings[i], 0, "Cannot reinitialise DataTable.\n\n"+
22.3403 + "To retrieve the DataTables object for this table, please pass either no arguments "+
22.3404 + "to the dataTable() function, or set bRetrieve to true. Alternatively, to destory "+
22.3405 + "the old table and create a new one, set bDestroy to true (note that a lot of "+
22.3406 + "changes to the configuration can be made through the API which is usually much "+
22.3407 + "faster)." );
22.3408 + return;
22.3409 + }
22.3410 + }
22.3411 +
22.3412 + /* If the element we are initialising has the same ID as a table which was previously
22.3413 + * initialised, but the table nodes don't match (from before) then we destory the old
22.3414 + * instance by simply deleting it. This is under the assumption that the table has been
22.3415 + * destroyed by other methods. Anyone using non-id selectors will need to do this manually
22.3416 + */
22.3417 + if ( _aoSettings[i].sTableId !== "" && _aoSettings[i].sTableId == this.getAttribute('id') )
22.3418 + {
22.3419 + _aoSettings.splice( i, 1 );
22.3420 + break;
22.3421 }
22.3422 }
22.3423
22.3424 @@ -4918,6 +6158,9 @@
22.3425 oSettings.sInstance = _oExt._oExternConfig.iNextUnique ++;
22.3426 }
22.3427
22.3428 + /* Store 'this' in the settings object for later retrieval */
22.3429 + oSettings.oInstance = _that;
22.3430 +
22.3431 /* Set the table node */
22.3432 oSettings.nTable = this;
22.3433
22.3434 @@ -4929,6 +6172,7 @@
22.3435 /* Store the features that we have available */
22.3436 if ( typeof oInit != 'undefined' && oInit !== null )
22.3437 {
22.3438 + oSettings.oInit = oInit;
22.3439 _fnMap( oSettings.oFeatures, oInit, "bPaginate" );
22.3440 _fnMap( oSettings.oFeatures, oInit, "bLengthChange" );
22.3441 _fnMap( oSettings.oFeatures, oInit, "bFilter" );
22.3442 @@ -4938,17 +6182,24 @@
22.3443 _fnMap( oSettings.oFeatures, oInit, "bAutoWidth" );
22.3444 _fnMap( oSettings.oFeatures, oInit, "bSortClasses" );
22.3445 _fnMap( oSettings.oFeatures, oInit, "bServerSide" );
22.3446 + _fnMap( oSettings.oScroll, oInit, "sScrollX", "sX" );
22.3447 + _fnMap( oSettings.oScroll, oInit, "sScrollXInner", "sXInner" );
22.3448 + _fnMap( oSettings.oScroll, oInit, "sScrollY", "sY" );
22.3449 + _fnMap( oSettings.oScroll, oInit, "bScrollCollapse", "bCollapse" );
22.3450 _fnMap( oSettings, oInit, "asStripClasses" );
22.3451 _fnMap( oSettings, oInit, "fnRowCallback" );
22.3452 _fnMap( oSettings, oInit, "fnHeaderCallback" );
22.3453 _fnMap( oSettings, oInit, "fnFooterCallback" );
22.3454 _fnMap( oSettings, oInit, "fnInitComplete" );
22.3455 _fnMap( oSettings, oInit, "fnServerData" );
22.3456 + _fnMap( oSettings, oInit, "fnFormatNumber" );
22.3457 _fnMap( oSettings, oInit, "aaSorting" );
22.3458 _fnMap( oSettings, oInit, "aaSortingFixed" );
22.3459 + _fnMap( oSettings, oInit, "aLengthMenu" );
22.3460 _fnMap( oSettings, oInit, "sPaginationType" );
22.3461 _fnMap( oSettings, oInit, "sAjaxSource" );
22.3462 _fnMap( oSettings, oInit, "iCookieDuration" );
22.3463 + _fnMap( oSettings, oInit, "sCookiePrefix" );
22.3464 _fnMap( oSettings, oInit, "sDom" );
22.3465 _fnMap( oSettings, oInit, "oSearch", "oPreviousSearch" );
22.3466 _fnMap( oSettings, oInit, "aoSearchCols", "aoPreSearchCols" );
22.3467 @@ -4990,6 +6241,12 @@
22.3468 }
22.3469 }
22.3470
22.3471 + /* Calculate the scroll bar width and cache it for use later on */
22.3472 + if ( oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "" )
22.3473 + {
22.3474 + oSettings.oScroll.iBarWidth = _fnScrollBarWidth();
22.3475 + }
22.3476 +
22.3477 if ( typeof oInit.iDisplayStart != 'undefined' &&
22.3478 typeof oSettings.iInitDisplayStart == 'undefined' )
22.3479 {
22.3480 @@ -5048,23 +6305,65 @@
22.3481 /* Create a dummy object for quick manipulation later on. */
22.3482 oInit = {};
22.3483 }
22.3484 -
22.3485 - /* Add the strip classes now that we know which classes to apply - unless overruled */
22.3486 +
22.3487 + /*
22.3488 + * Stripes
22.3489 + * Add the strip classes now that we know which classes to apply - unless overruled
22.3490 + */
22.3491 if ( typeof oInit.asStripClasses == 'undefined' )
22.3492 {
22.3493 oSettings.asStripClasses.push( oSettings.oClasses.sStripOdd );
22.3494 oSettings.asStripClasses.push( oSettings.oClasses.sStripEven );
22.3495 }
22.3496
22.3497 - /* See if we should load columns automatically or use defined ones - a bit messy this... */
22.3498 + /* Remove row stripe classes if they are already on the table row */
22.3499 + var bStripeRemove = false;
22.3500 + var anRows = $('tbody>tr', this);
22.3501 + for ( i=0, iLen=oSettings.asStripClasses.length ; i<iLen ; i++ )
22.3502 + {
22.3503 + if ( anRows.filter(":lt(2)").hasClass( oSettings.asStripClasses[i]) )
22.3504 + {
22.3505 + bStripeRemove = true;
22.3506 + break;
22.3507 + }
22.3508 + }
22.3509 +
22.3510 + if ( bStripeRemove )
22.3511 + {
22.3512 + /* Store the classes which we are about to remove so they can be readded on destory */
22.3513 + oSettings.asDestoryStrips = [ '', '' ];
22.3514 + if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripOdd) )
22.3515 + {
22.3516 + oSettings.asDestoryStrips[0] += oSettings.oClasses.sStripOdd+" ";
22.3517 + }
22.3518 + if ( $(anRows[0]).hasClass(oSettings.oClasses.sStripEven) )
22.3519 + {
22.3520 + oSettings.asDestoryStrips[0] += oSettings.oClasses.sStripEven;
22.3521 + }
22.3522 + if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripOdd) )
22.3523 + {
22.3524 + oSettings.asDestoryStrips[1] += oSettings.oClasses.sStripOdd+" ";
22.3525 + }
22.3526 + if ( $(anRows[1]).hasClass(oSettings.oClasses.sStripEven) )
22.3527 + {
22.3528 + oSettings.asDestoryStrips[1] += oSettings.oClasses.sStripEven;
22.3529 + }
22.3530 +
22.3531 + anRows.removeClass( oSettings.asStripClasses.join(' ') );
22.3532 + }
22.3533 +
22.3534 + /*
22.3535 + * Columns
22.3536 + * See if we should load columns automatically or use defined ones - a bit messy this...
22.3537 + */
22.3538 var nThead = this.getElementsByTagName('thead');
22.3539 - var nThs = nThead.length===0 ? null : _fnGetUniqueThs( nThead[0] );
22.3540 + var anThs = nThead.length===0 ? [] : _fnGetUniqueThs( nThead[0] );
22.3541 var bUseCols = typeof oInit.aoColumns != 'undefined';
22.3542
22.3543 - for ( i=0, iLen=bUseCols ? oInit.aoColumns.length : nThs.length ; i<iLen ; i++ )
22.3544 + for ( i=0, iLen=bUseCols ? oInit.aoColumns.length : anThs.length ; i<iLen ; i++ )
22.3545 {
22.3546 var oCol = bUseCols ? oInit.aoColumns[i] : null;
22.3547 - var nTh = nThs ? nThs[i] : null;
22.3548 + var nTh = anThs ? anThs[i] : null;
22.3549
22.3550 /* Check if we have column visibilty state to restore, and also that the length of the
22.3551 * state saved columns matches the currently know number of columns
22.3552 @@ -5078,10 +6377,66 @@
22.3553 oCol.bVisible = oInit.saved_aoColumns[i].bVisible;
22.3554 }
22.3555
22.3556 - _fnAddColumn( oSettings, oCol, nTh );
22.3557 - }
22.3558 -
22.3559 - /* Check the aaSorting array */
22.3560 + _fnAddColumn( oSettings, nTh );
22.3561 + }
22.3562 +
22.3563 + /* Add options from column definations */
22.3564 + if ( typeof oInit.aoColumnDefs != 'undefined' )
22.3565 + {
22.3566 + /* Loop over the column defs array - loop in reverse so first instace has priority */
22.3567 + for ( i=oInit.aoColumnDefs.length-1 ; i>=0 ; i-- )
22.3568 + {
22.3569 + /* Each column def can target multiple columns, as it is an array */
22.3570 + var aTargets = oInit.aoColumnDefs[i].aTargets;
22.3571 + for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
22.3572 + {
22.3573 + if ( typeof aTargets[j] == 'number' && aTargets[j] >= 0 )
22.3574 + {
22.3575 + /* 0+ integer, left to right column counting. We add columns which are unknown
22.3576 + * automatically. Is this the right behaviour for this? We should at least
22.3577 + * log it in future. We cannot do this for the negative or class targets, only here.
22.3578 + */
22.3579 + while( oSettings.aoColumns.length <= aTargets[j] )
22.3580 + {
22.3581 + _fnAddColumn( oSettings );
22.3582 + }
22.3583 + _fnColumnOptions( oSettings, aTargets[j], oInit.aoColumnDefs[i] );
22.3584 + }
22.3585 + else if ( typeof aTargets[j] == 'number' && aTargets[j] < 0 )
22.3586 + {
22.3587 + /* Negative integer, right to left column counting */
22.3588 + _fnColumnOptions( oSettings, oSettings.aoColumns.length+aTargets[j],
22.3589 + oInit.aoColumnDefs[i] );
22.3590 + }
22.3591 + else if ( typeof aTargets[j] == 'string' )
22.3592 + {
22.3593 + /* Class name matching on TH element */
22.3594 + for ( k=0, kLen=oSettings.aoColumns.length ; k<kLen ; k++ )
22.3595 + {
22.3596 + if ( aTargets[j] == "_all" ||
22.3597 + oSettings.aoColumns[k].nTh.className.indexOf( aTargets[j] ) != -1 )
22.3598 + {
22.3599 + _fnColumnOptions( oSettings, k, oInit.aoColumnDefs[i] );
22.3600 + }
22.3601 + }
22.3602 + }
22.3603 + }
22.3604 + }
22.3605 + }
22.3606 +
22.3607 + /* Add options from column array - after the defs array so this has priority */
22.3608 + if ( typeof oInit.aoColumns != 'undefined' )
22.3609 + {
22.3610 + for ( i=0, iLen=oInit.aoColumns.length ; i<iLen ; i++ )
22.3611 + {
22.3612 + _fnColumnOptions( oSettings, i, oInit.aoColumns[i] );
22.3613 + }
22.3614 + }
22.3615 +
22.3616 + /*
22.3617 + * Sorting
22.3618 + * Check the aaSorting array
22.3619 + */
22.3620 for ( i=0, iLen=oSettings.aaSorting.length ; i<iLen ; i++ )
22.3621 {
22.3622 var oColumn = oSettings.aoColumns[ oSettings.aaSorting[i][0] ];
22.3623 @@ -5093,7 +6448,8 @@
22.3624 }
22.3625
22.3626 /* If aaSorting is not defined, then we use the first indicator in asSorting */
22.3627 - if ( typeof oInit.aaSorting == "undefined" )
22.3628 + if ( typeof oInit.aaSorting == "undefined" &&
22.3629 + typeof oSettings.saved_aaSorting == "undefined" )
22.3630 {
22.3631 oSettings.aaSorting[i][1] = oColumn.asSorting[0];
22.3632 }
22.3633 @@ -5109,7 +6465,10 @@
22.3634 }
22.3635 }
22.3636
22.3637 - /* Sanity check that there is a thead and tfoot. If not let's just create them */
22.3638 + /*
22.3639 + * Final init
22.3640 + * Sanity check that there is a thead and tfoot. If not let's just create them
22.3641 + */
22.3642 if ( this.getElementsByTagName('thead').length === 0 )
22.3643 {
22.3644 this.appendChild( document.createElement( 'thead' ) );
22.3645 @@ -5120,6 +6479,13 @@
22.3646 this.appendChild( document.createElement( 'tbody' ) );
22.3647 }
22.3648
22.3649 + oSettings.nTHead = this.getElementsByTagName('thead')[0];
22.3650 + oSettings.nTBody = this.getElementsByTagName('tbody')[0];
22.3651 + if ( this.getElementsByTagName('tfoot').length > 0 )
22.3652 + {
22.3653 + oSettings.nTFoot = this.getElementsByTagName('tfoot')[0];
22.3654 + }
22.3655 +
22.3656 /* Check if there is data passing into the constructor */
22.3657 if ( bUsePassedData )
22.3658 {
22.3659 @@ -5155,4 +6521,4 @@
22.3660 }
22.3661 });
22.3662 };
22.3663 -})(jQuery);
22.3664 +})(jQuery, window, document);
23.1 --- a/static/dataTables/media/js/jquery.dataTables.min.js Mon Aug 16 14:55:21 2010 +0200
23.2 +++ b/static/dataTables/media/js/jquery.dataTables.min.js Fri Aug 20 17:39:19 2010 +0200
23.3 @@ -1,6 +1,6 @@
23.4 /*
23.5 * File: jquery.dataTables.min.js
23.6 - * Version: 1.6.1
23.7 + * Version: 1.7.0
23.8 * Author: Allan Jardine (www.sprymedia.co.uk)
23.9 * Info: www.datatables.net
23.10 *
23.11 @@ -13,573 +13,124 @@
23.12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
23.13 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
23.14 */
23.15 -(function($){$.fn.dataTableSettings=[];var _aoSettings=$.fn.dataTableSettings;$.fn.dataTableExt={};
23.16 -var _oExt=$.fn.dataTableExt;_oExt.sVersion="1.6.1";_oExt.iApiIndex=0;_oExt.oApi={};
23.17 -_oExt.afnFiltering=[];_oExt.aoFeatures=[];_oExt.ofnSearch={};_oExt.afnSortData=[];
23.18 -_oExt.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:""};
23.19 -_oExt.oJUIClasses={sPagePrevEnabled:"fg-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-state-default",sPageButtonActive:"fg-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset fg-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s"};
23.20 -_oExt.oPagination={two_button:{fnInit:function(oSettings,nPaging,fnCallbackDraw){var nPrevious,nNext,nPreviousInner,nNextInner;
23.21 -if(!oSettings.bJUI){nPrevious=document.createElement("div");nNext=document.createElement("div")
23.22 -}else{nPrevious=document.createElement("a");nNext=document.createElement("a");nNextInner=document.createElement("span");
23.23 -nNextInner.className=oSettings.oClasses.sPageJUINext;nNext.appendChild(nNextInner);
23.24 -nPreviousInner=document.createElement("span");nPreviousInner.className=oSettings.oClasses.sPageJUIPrev;
23.25 -nPrevious.appendChild(nPreviousInner)}nPrevious.className=oSettings.oClasses.sPagePrevDisabled;
23.26 -nNext.className=oSettings.oClasses.sPageNextDisabled;nPrevious.title=oSettings.oLanguage.oPaginate.sPrevious;
23.27 -nNext.title=oSettings.oLanguage.oPaginate.sNext;nPaging.appendChild(nPrevious);nPaging.appendChild(nNext);
23.28 -$(nPrevious).click(function(){oSettings.oApi._fnPageChange(oSettings,"previous");
23.29 -fnCallbackDraw(oSettings)});$(nNext).click(function(){oSettings.oApi._fnPageChange(oSettings,"next");
23.30 -fnCallbackDraw(oSettings)});$(nPrevious).bind("selectstart",function(){return false
23.31 -});$(nNext).bind("selectstart",function(){return false});if(oSettings.sTableId!==""&&typeof oSettings.aanFeatures.p=="undefined"){nPaging.setAttribute("id",oSettings.sTableId+"_paginate");
23.32 -nPrevious.setAttribute("id",oSettings.sTableId+"_previous");nNext.setAttribute("id",oSettings.sTableId+"_next")
23.33 -}},fnUpdate:function(oSettings,fnCallbackDraw){if(!oSettings.aanFeatures.p){return
23.34 -}var an=oSettings.aanFeatures.p;for(var i=0,iLen=an.length;i<iLen;i++){if(an[i].childNodes.length!==0){an[i].childNodes[0].className=(oSettings._iDisplayStart===0)?oSettings.oClasses.sPagePrevDisabled:oSettings.oClasses.sPagePrevEnabled;
23.35 -an[i].childNodes[1].className=(oSettings.fnDisplayEnd()==oSettings.fnRecordsDisplay())?oSettings.oClasses.sPageNextDisabled:oSettings.oClasses.sPageNextEnabled
23.36 -}}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(oSettings,nPaging,fnCallbackDraw){var nFirst=document.createElement("span");
23.37 -var nPrevious=document.createElement("span");var nList=document.createElement("span");
23.38 -var nNext=document.createElement("span");var nLast=document.createElement("span");
23.39 -nFirst.innerHTML=oSettings.oLanguage.oPaginate.sFirst;nPrevious.innerHTML=oSettings.oLanguage.oPaginate.sPrevious;
23.40 -nNext.innerHTML=oSettings.oLanguage.oPaginate.sNext;nLast.innerHTML=oSettings.oLanguage.oPaginate.sLast;
23.41 -var oClasses=oSettings.oClasses;nFirst.className=oClasses.sPageButton+" "+oClasses.sPageFirst;
23.42 -nPrevious.className=oClasses.sPageButton+" "+oClasses.sPagePrevious;nNext.className=oClasses.sPageButton+" "+oClasses.sPageNext;
23.43 -nLast.className=oClasses.sPageButton+" "+oClasses.sPageLast;nPaging.appendChild(nFirst);
23.44 -nPaging.appendChild(nPrevious);nPaging.appendChild(nList);nPaging.appendChild(nNext);
23.45 -nPaging.appendChild(nLast);$(nFirst).click(function(){oSettings.oApi._fnPageChange(oSettings,"first");
23.46 -fnCallbackDraw(oSettings)});$(nPrevious).click(function(){oSettings.oApi._fnPageChange(oSettings,"previous");
23.47 -fnCallbackDraw(oSettings)});$(nNext).click(function(){oSettings.oApi._fnPageChange(oSettings,"next");
23.48 -fnCallbackDraw(oSettings)});$(nLast).click(function(){oSettings.oApi._fnPageChange(oSettings,"last");
23.49 -fnCallbackDraw(oSettings)});$("span",nPaging).bind("mousedown",function(){return false
23.50 -}).bind("selectstart",function(){return false});if(oSettings.sTableId!==""&&typeof oSettings.aanFeatures.p=="undefined"){nPaging.setAttribute("id",oSettings.sTableId+"_paginate");
23.51 -nFirst.setAttribute("id",oSettings.sTableId+"_first");nPrevious.setAttribute("id",oSettings.sTableId+"_previous");
23.52 -nNext.setAttribute("id",oSettings.sTableId+"_next");nLast.setAttribute("id",oSettings.sTableId+"_last")
23.53 -}},fnUpdate:function(oSettings,fnCallbackDraw){if(!oSettings.aanFeatures.p){return
23.54 -}var iPageCount=_oExt.oPagination.iFullNumbersShowPages;var iPageCountHalf=Math.floor(iPageCount/2);
23.55 -var iPages=Math.ceil((oSettings.fnRecordsDisplay())/oSettings._iDisplayLength);var iCurrentPage=Math.ceil(oSettings._iDisplayStart/oSettings._iDisplayLength)+1;
23.56 -var sList="";var iStartButton,iEndButton,i,iLen;var oClasses=oSettings.oClasses;if(iPages<iPageCount){iStartButton=1;
23.57 -iEndButton=iPages}else{if(iCurrentPage<=iPageCountHalf){iStartButton=1;iEndButton=iPageCount
23.58 -}else{if(iCurrentPage>=(iPages-iPageCountHalf)){iStartButton=iPages-iPageCount+1;
23.59 -iEndButton=iPages}else{iStartButton=iCurrentPage-Math.ceil(iPageCount/2)+1;iEndButton=iStartButton+iPageCount-1
23.60 -}}}for(i=iStartButton;i<=iEndButton;i++){if(iCurrentPage!=i){sList+='<span class="'+oClasses.sPageButton+'">'+i+"</span>"
23.61 -}else{sList+='<span class="'+oClasses.sPageButtonActive+'">'+i+"</span>"}}var an=oSettings.aanFeatures.p;
23.62 -var anButtons,anStatic,nPaginateList;var fnClick=function(){var iTarget=(this.innerHTML*1)-1;
23.63 -oSettings._iDisplayStart=iTarget*oSettings._iDisplayLength;fnCallbackDraw(oSettings);
23.64 -return false};var fnFalse=function(){return false};for(i=0,iLen=an.length;i<iLen;
23.65 -i++){if(an[i].childNodes.length===0){continue}nPaginateList=an[i].childNodes[2];nPaginateList.innerHTML=sList;
23.66 -$("span",nPaginateList).click(fnClick).bind("mousedown",fnFalse).bind("selectstart",fnFalse);
23.67 -anButtons=an[i].getElementsByTagName("span");anStatic=[anButtons[0],anButtons[1],anButtons[anButtons.length-2],anButtons[anButtons.length-1]];
23.68 -$(anStatic).removeClass(oClasses.sPageButton+" "+oClasses.sPageButtonActive+" "+oClasses.sPageButtonStaticDisabled);
23.69 -if(iCurrentPage==1){anStatic[0].className+=" "+oClasses.sPageButtonStaticDisabled;
23.70 -anStatic[1].className+=" "+oClasses.sPageButtonStaticDisabled}else{anStatic[0].className+=" "+oClasses.sPageButton;
23.71 -anStatic[1].className+=" "+oClasses.sPageButton}if(iCurrentPage==iPages||oSettings._iDisplayLength==-1){anStatic[2].className+=" "+oClasses.sPageButtonStaticDisabled;
23.72 -anStatic[3].className+=" "+oClasses.sPageButtonStaticDisabled}else{anStatic[2].className+=" "+oClasses.sPageButton;
23.73 -anStatic[3].className+=" "+oClasses.sPageButton}}}}};_oExt.oSort={"string-asc":function(a,b){var x=a.toLowerCase();
23.74 -var y=b.toLowerCase();return((x<y)?-1:((x>y)?1:0))},"string-desc":function(a,b){var x=a.toLowerCase();
23.75 -var y=b.toLowerCase();return((x<y)?1:((x>y)?-1:0))},"html-asc":function(a,b){var x=a.replace(/<.*?>/g,"").toLowerCase();
23.76 -var y=b.replace(/<.*?>/g,"").toLowerCase();return((x<y)?-1:((x>y)?1:0))},"html-desc":function(a,b){var x=a.replace(/<.*?>/g,"").toLowerCase();
23.77 -var y=b.replace(/<.*?>/g,"").toLowerCase();return((x<y)?1:((x>y)?-1:0))},"date-asc":function(a,b){var x=Date.parse(a);
23.78 -var y=Date.parse(b);if(isNaN(x)){x=Date.parse("01/01/1970 00:00:00")}if(isNaN(y)){y=Date.parse("01/01/1970 00:00:00")
23.79 -}return x-y},"date-desc":function(a,b){var x=Date.parse(a);var y=Date.parse(b);if(isNaN(x)){x=Date.parse("01/01/1970 00:00:00")
23.80 -}if(isNaN(y)){y=Date.parse("01/01/1970 00:00:00")}return y-x},"numeric-asc":function(a,b){var x=a=="-"?0:a;
23.81 -var y=b=="-"?0:b;return x-y},"numeric-desc":function(a,b){var x=a=="-"?0:a;var y=b=="-"?0:b;
23.82 -return y-x}};_oExt.aTypes=[function(sData){if(typeof sData=="number"){return"numeric"
23.83 -}else{if(typeof sData.charAt!="function"){return null}}var sValidFirstChars="0123456789-";
23.84 -var sValidChars="0123456789.";var Char;var bDecimal=false;Char=sData.charAt(0);if(sValidFirstChars.indexOf(Char)==-1){return null
23.85 -}for(var i=1;i<sData.length;i++){Char=sData.charAt(i);if(sValidChars.indexOf(Char)==-1){return null
23.86 -}if(Char=="."){if(bDecimal){return null}bDecimal=true}}return"numeric"},function(sData){var iParse=Date.parse(sData);
23.87 -if(iParse!==null&&!isNaN(iParse)){return"date"}return null}];_oExt._oExternConfig={iNextUnique:0};
23.88 -$.fn.dataTable=function(oInit){function classSettings(){this.fnRecordsTotal=function(){if(this.oFeatures.bServerSide){return this._iRecordsTotal
23.89 -}else{return this.aiDisplayMaster.length}};this.fnRecordsDisplay=function(){if(this.oFeatures.bServerSide){return this._iRecordsDisplay
23.90 -}else{return this.aiDisplay.length}};this.fnDisplayEnd=function(){if(this.oFeatures.bServerSide){return this._iDisplayStart+this.aiDisplay.length
23.91 -}else{return this._iDisplayEnd}};this.sInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};
23.92 -this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"}};
23.93 -this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.iNextId=0;
23.94 -this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bEscapeRegex:true};this.aoPreSearchCols=[];
23.95 -this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.fnRowCallback=null;
23.96 -this.fnHeaderCallback=null;this.fnFooterCallback=null;this.aoDrawCallback=[];this.fnInitComplete=null;
23.97 -this.sTableId="";this.nTable=null;this.iDefaultSortIndex=0;this.bInitialised=false;
23.98 -this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=60*60*2;
23.99 -this.sAjaxSource=null;this.bAjaxDataGet=true;this.fnServerData=$.getJSON;this.iServerDraw=0;
23.100 -this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsTotal=0;
23.101 -this._iRecordsDisplay=0;this.bJUI=false;this.oClasses=_oExt.oStdClasses;this.bFiltered=false;
23.102 -this.bSorted=false}this.oApi={};this.fnDraw=function(bComplete){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.103 -if(typeof bComplete!="undefined"&&bComplete===false){_fnCalculateEnd(oSettings);_fnDraw(oSettings)
23.104 -}else{_fnReDraw(oSettings)}};this.fnFilter=function(sInput,iColumn,bEscapeRegex){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.105 -if(typeof bEscapeRegex=="undefined"){bEscapeRegex=true}if(typeof iColumn=="undefined"||iColumn===null){_fnFilterComplete(oSettings,{sSearch:sInput,bEscapeRegex:bEscapeRegex},1)
23.106 -}else{oSettings.aoPreSearchCols[iColumn].sSearch=sInput;oSettings.aoPreSearchCols[iColumn].bEscapeRegex=bEscapeRegex;
23.107 -_fnFilterComplete(oSettings,oSettings.oPreviousSearch,1)}};this.fnSettings=function(nNode){return _fnSettingsFromNode(this[_oExt.iApiIndex])
23.108 -};this.fnVersionCheck=function(sVersion){var fnZPad=function(Zpad,count){while(Zpad.length<count){Zpad+="0"
23.109 -}return Zpad};var aThis=_oExt.sVersion.split(".");var aThat=sVersion.split(".");var sThis="",sThat="";
23.110 -for(var i=0,iLen=aThat.length;i<iLen;i++){sThis+=fnZPad(aThis[i],3);sThat+=fnZPad(aThat[i],3)
23.111 -}return parseInt(sThis,10)>=parseInt(sThat,10)};this.fnSort=function(aaSort){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.112 -oSettings.aaSorting=aaSort;_fnSort(oSettings)};this.fnSortListener=function(nNode,iColumn,fnCallback){_fnSortAttachListener(_fnSettingsFromNode(this[_oExt.iApiIndex]),nNode,iColumn,fnCallback)
23.113 -};this.fnAddData=function(mData,bRedraw){if(mData.length===0){return[]}var aiReturn=[];
23.114 -var iTest;var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);if(typeof mData[0]=="object"){for(var i=0;
23.115 -i<mData.length;i++){iTest=_fnAddData(oSettings,mData[i]);if(iTest==-1){return aiReturn
23.116 -}aiReturn.push(iTest)}}else{iTest=_fnAddData(oSettings,mData);if(iTest==-1){return aiReturn
23.117 -}aiReturn.push(iTest)}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();_fnBuildSearchArray(oSettings,1);
23.118 -if(typeof bRedraw=="undefined"||bRedraw){_fnReDraw(oSettings)}return aiReturn};this.fnDeleteRow=function(mTarget,fnCallBack,bNullRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.119 -var i,iAODataIndex;iAODataIndex=(typeof mTarget=="object")?_fnNodeToDataIndex(oSettings,mTarget):mTarget;
23.120 -for(i=0;i<oSettings.aiDisplayMaster.length;i++){if(oSettings.aiDisplayMaster[i]==iAODataIndex){oSettings.aiDisplayMaster.splice(i,1);
23.121 -break}}for(i=0;i<oSettings.aiDisplay.length;i++){if(oSettings.aiDisplay[i]==iAODataIndex){oSettings.aiDisplay.splice(i,1);
23.122 -break}}_fnBuildSearchArray(oSettings,1);if(typeof fnCallBack=="function"){fnCallBack.call(this)
23.123 -}if(oSettings._iDisplayStart>=oSettings.aiDisplay.length){oSettings._iDisplayStart-=oSettings._iDisplayLength;
23.124 -if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}}_fnCalculateEnd(oSettings);
23.125 -_fnDraw(oSettings);var aData=oSettings.aoData[iAODataIndex]._aData.slice();if(typeof bNullRow!="undefined"&&bNullRow===true){oSettings.aoData[iAODataIndex]=null
23.126 -}return aData};this.fnClearTable=function(bRedraw){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.127 -_fnClearTable(oSettings);if(typeof bRedraw=="undefined"||bRedraw){_fnDraw(oSettings)
23.128 -}};this.fnOpen=function(nTr,sHtml,sClass){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.129 -this.fnClose(nTr);var nNewRow=document.createElement("tr");var nNewCell=document.createElement("td");
23.130 -nNewRow.appendChild(nNewCell);nNewCell.className=sClass;nNewCell.colSpan=_fnVisbleColumns(oSettings);
23.131 -nNewCell.innerHTML=sHtml;var nTrs=$("tbody tr",oSettings.nTable);if($.inArray(nTr,nTrs)!=-1){$(nNewRow).insertAfter(nTr)
23.132 -}if(!oSettings.oFeatures.bServerSide){oSettings.aoOpenRows.push({nTr:nNewRow,nParent:nTr})
23.133 -}return nNewRow};this.fnClose=function(nTr){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.134 -for(var i=0;i<oSettings.aoOpenRows.length;i++){if(oSettings.aoOpenRows[i].nParent==nTr){var nTrParent=oSettings.aoOpenRows[i].nTr.parentNode;
23.135 -if(nTrParent){nTrParent.removeChild(oSettings.aoOpenRows[i].nTr)}oSettings.aoOpenRows.splice(i,1);
23.136 -return 0}}return 1};this.fnGetData=function(mRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.137 -if(typeof mRow!="undefined"){var iRow=(typeof mRow=="object")?_fnNodeToDataIndex(oSettings,mRow):mRow;
23.138 -return oSettings.aoData[iRow]._aData}return _fnGetDataMaster(oSettings)};this.fnGetNodes=function(iRow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.139 -if(typeof iRow!="undefined"){return oSettings.aoData[iRow].nTr}return _fnGetTrNodes(oSettings)
23.140 -};this.fnGetPosition=function(nNode){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.141 -var i;if(nNode.nodeName=="TR"){return _fnNodeToDataIndex(oSettings,nNode)}else{if(nNode.nodeName=="TD"){var iDataIndex=_fnNodeToDataIndex(oSettings,nNode.parentNode);
23.142 -var iCorrector=0;for(var j=0;j<oSettings.aoColumns.length;j++){if(oSettings.aoColumns[j].bVisible){if(oSettings.aoData[iDataIndex].nTr.getElementsByTagName("td")[j-iCorrector]==nNode){return[iDataIndex,j-iCorrector,j]
23.143 -}}else{iCorrector++}}}}return null};this.fnUpdate=function(mData,mRow,iColumn,bRedraw){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.144 -var iVisibleColumn;var sDisplay;var iRow=(typeof mRow=="object")?_fnNodeToDataIndex(oSettings,mRow):mRow;
23.145 -if(typeof mData!="object"){sDisplay=mData;oSettings.aoData[iRow]._aData[iColumn]=sDisplay;
23.146 -if(oSettings.aoColumns[iColumn].fnRender!==null){sDisplay=oSettings.aoColumns[iColumn].fnRender({iDataRow:iRow,iDataColumn:iColumn,aData:oSettings.aoData[iRow]._aData,oSettings:oSettings});
23.147 -if(oSettings.aoColumns[iColumn].bUseRendered){oSettings.aoData[iRow]._aData[iColumn]=sDisplay
23.148 -}}iVisibleColumn=_fnColumnIndexToVisible(oSettings,iColumn);if(iVisibleColumn!==null){oSettings.aoData[iRow].nTr.getElementsByTagName("td")[iVisibleColumn].innerHTML=sDisplay
23.149 -}}else{if(mData.length!=oSettings.aoColumns.length){alert("DataTables warning: An array passed to fnUpdate must have the same number of columns as the table in question - in this case "+oSettings.aoColumns.length);
23.150 -return 1}for(var i=0;i<mData.length;i++){sDisplay=mData[i];oSettings.aoData[iRow]._aData[i]=sDisplay;
23.151 -if(oSettings.aoColumns[i].fnRender!==null){sDisplay=oSettings.aoColumns[i].fnRender({iDataRow:iRow,iDataColumn:i,aData:oSettings.aoData[iRow]._aData,oSettings:oSettings});
23.152 -if(oSettings.aoColumns[i].bUseRendered){oSettings.aoData[iRow]._aData[i]=sDisplay
23.153 -}}iVisibleColumn=_fnColumnIndexToVisible(oSettings,i);if(iVisibleColumn!==null){oSettings.aoData[iRow].nTr.getElementsByTagName("td")[iVisibleColumn].innerHTML=sDisplay
23.154 -}}}_fnBuildSearchArray(oSettings,1);if(typeof bRedraw!="undefined"&&bRedraw){_fnReDraw(oSettings)
23.155 -}return 0};this.fnSetColumnVis=function(iCol,bShow){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.156 -var i,iLen;var iColumns=oSettings.aoColumns.length;var nTd;if(oSettings.aoColumns[iCol].bVisible==bShow){return
23.157 -}var nTrHead=$("thead:eq(0)>tr",oSettings.nTable)[0];var nTrFoot=$("tfoot:eq(0)>tr",oSettings.nTable)[0];
23.158 -var anTheadTh=[];var anTfootTh=[];for(i=0;i<iColumns;i++){anTheadTh.push(oSettings.aoColumns[i].nTh);
23.159 -anTfootTh.push(oSettings.aoColumns[i].nTf)}if(bShow){var iInsert=0;for(i=0;i<iCol;
23.160 -i++){if(oSettings.aoColumns[i].bVisible){iInsert++}}if(iInsert>=_fnVisbleColumns(oSettings)){nTrHead.appendChild(anTheadTh[iCol]);
23.161 -if(nTrFoot){nTrFoot.appendChild(anTfootTh[iCol])}for(i=0,iLen=oSettings.aoData.length;
23.162 -i<iLen;i++){nTd=oSettings.aoData[i]._anHidden[iCol];oSettings.aoData[i].nTr.appendChild(nTd)
23.163 -}}else{var iBefore;for(i=iCol;i<iColumns;i++){iBefore=_fnColumnIndexToVisible(oSettings,i);
23.164 -if(iBefore!==null){break}}nTrHead.insertBefore(anTheadTh[iCol],nTrHead.getElementsByTagName("th")[iBefore]);
23.165 -if(nTrFoot){nTrFoot.insertBefore(anTfootTh[iCol],nTrFoot.getElementsByTagName("th")[iBefore])
23.166 -}for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){nTd=oSettings.aoData[i]._anHidden[iCol];
23.167 -oSettings.aoData[i].nTr.insertBefore(nTd,oSettings.aoData[i].nTr.getElementsByTagName("td")[iBefore])
23.168 -}}oSettings.aoColumns[iCol].bVisible=true}else{nTrHead.removeChild(anTheadTh[iCol]);
23.169 -if(nTrFoot){nTrFoot.removeChild(anTfootTh[iCol])}var iVisCol=_fnColumnIndexToVisible(oSettings,iCol);
23.170 -for(i=0,iLen=oSettings.aoData.length;i<iLen;i++){nTd=oSettings.aoData[i].nTr.getElementsByTagName("td")[iVisCol];
23.171 -oSettings.aoData[i]._anHidden[iCol]=nTd;nTd.parentNode.removeChild(nTd)}oSettings.aoColumns[iCol].bVisible=false
23.172 -}for(i=0,iLen=oSettings.aoOpenRows.length;i<iLen;i++){oSettings.aoOpenRows[i].nTr.colSpan=_fnVisbleColumns(oSettings)
23.173 -}_fnSaveState(oSettings)};this.fnPageChange=function(sAction,bRedraw){var oSettings=_fnSettingsFromNode(this[_oExt.iApiIndex]);
23.174 -_fnPageChange(oSettings,sAction);if(typeof bRedraw=="undefined"||bRedraw){_fnReDraw(oSettings)
23.175 -}};function _fnExternApiFunc(sFunc){return function(){var aArgs=[_fnSettingsFromNode(this[_oExt.iApiIndex])].concat(Array.prototype.slice.call(arguments));
23.176 -return _oExt.oApi[sFunc].apply(this,aArgs)}}for(var sFunc in _oExt.oApi){if(sFunc){this[sFunc]=_fnExternApiFunc(sFunc)
23.177 -}}function _fnInitalise(oSettings){if(oSettings.bInitialised===false){setTimeout(function(){_fnInitalise(oSettings)
23.178 -},200);return}_fnAddOptionsHtml(oSettings);_fnDrawHead(oSettings);if(oSettings.oFeatures.bSort){_fnSort(oSettings,false);
23.179 -_fnSortingClasses(oSettings)}else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
23.180 -_fnCalculateEnd(oSettings);_fnDraw(oSettings)}if(oSettings.sAjaxSource!==null&&!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,true);
23.181 -oSettings.fnServerData(oSettings.sAjaxSource,null,function(json){for(var i=0;i<json.aaData.length;
23.182 -i++){_fnAddData(oSettings,json.aaData[i])}oSettings.iInitDisplayStart=oSettings._iDisplayStart;
23.183 -if(oSettings.oFeatures.bSort){_fnSort(oSettings)}else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
23.184 -_fnCalculateEnd(oSettings);_fnDraw(oSettings)}_fnProcessingDisplay(oSettings,false);
23.185 -if(typeof oSettings.fnInitComplete=="function"){oSettings.fnInitComplete(oSettings,json)
23.186 -}});return}if(typeof oSettings.fnInitComplete=="function"){oSettings.fnInitComplete(oSettings)
23.187 -}if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false)}}function _fnLanguageProcess(oSettings,oLanguage,bInit){_fnMap(oSettings.oLanguage,oLanguage,"sProcessing");
23.188 -_fnMap(oSettings.oLanguage,oLanguage,"sLengthMenu");_fnMap(oSettings.oLanguage,oLanguage,"sZeroRecords");
23.189 -_fnMap(oSettings.oLanguage,oLanguage,"sInfo");_fnMap(oSettings.oLanguage,oLanguage,"sInfoEmpty");
23.190 -_fnMap(oSettings.oLanguage,oLanguage,"sInfoFiltered");_fnMap(oSettings.oLanguage,oLanguage,"sInfoPostFix");
23.191 -_fnMap(oSettings.oLanguage,oLanguage,"sSearch");if(typeof oLanguage.oPaginate!="undefined"){_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sFirst");
23.192 -_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sPrevious");_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sNext");
23.193 -_fnMap(oSettings.oLanguage.oPaginate,oLanguage.oPaginate,"sLast")}if(bInit){_fnInitalise(oSettings)
23.194 -}}function _fnAddColumn(oSettings,oOptions,nTh){oSettings.aoColumns[oSettings.aoColumns.length++]={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:oSettings.oClasses.sSortable,sSortingClassJUI:oSettings.oClasses.sSortJUI,sTitle:nTh?nTh.innerHTML:"",sName:"",sWidth:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:oSettings.aoColumns.length-1,sSortDataType:"std",nTh:nTh?nTh:document.createElement("th"),nTf:null};
23.195 -var iLength=oSettings.aoColumns.length-1;var oCol=oSettings.aoColumns[iLength];if(typeof oOptions!="undefined"&&oOptions!==null){if(typeof oOptions.sType!="undefined"){oCol.sType=oOptions.sType;
23.196 -oCol._bAutoType=false}_fnMap(oCol,oOptions,"bVisible");_fnMap(oCol,oOptions,"bSearchable");
23.197 -_fnMap(oCol,oOptions,"bSortable");_fnMap(oCol,oOptions,"sTitle");_fnMap(oCol,oOptions,"sName");
23.198 -_fnMap(oCol,oOptions,"sWidth");_fnMap(oCol,oOptions,"sClass");_fnMap(oCol,oOptions,"fnRender");
23.199 -_fnMap(oCol,oOptions,"bUseRendered");_fnMap(oCol,oOptions,"iDataSort");_fnMap(oCol,oOptions,"asSorting");
23.200 -_fnMap(oCol,oOptions,"sSortDataType")}if(!oSettings.oFeatures.bSort){oCol.bSortable=false
23.201 -}if(!oCol.bSortable||($.inArray("asc",oCol.asSorting)==-1&&$.inArray("desc",oCol.asSorting)==-1)){oCol.sSortingClass=oSettings.oClasses.sSortableNone;
23.202 -oCol.sSortingClassJUI=""}else{if($.inArray("asc",oCol.asSorting)!=-1&&$.inArray("desc",oCol.asSorting)==-1){oCol.sSortingClass=oSettings.oClasses.sSortableAsc;
23.203 -oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIAscAllowed}else{if($.inArray("asc",oCol.asSorting)==-1&&$.inArray("desc",oCol.asSorting)!=-1){oCol.sSortingClass=oSettings.oClasses.sSortableDesc;
23.204 -oCol.sSortingClassJUI=oSettings.oClasses.sSortJUIDescAllowed}}}if(typeof oSettings.aoPreSearchCols[iLength]=="undefined"||oSettings.aoPreSearchCols[iLength]===null){oSettings.aoPreSearchCols[iLength]={sSearch:"",bEscapeRegex:true}
23.205 -}else{if(typeof oSettings.aoPreSearchCols[iLength].bEscapeRegex=="undefined"){oSettings.aoPreSearchCols[iLength].bEscapeRegex=true
23.206 -}}}function _fnAddData(oSettings,aData){if(aData.length!=oSettings.aoColumns.length){alert("DataTables warning: Added data does not match known number of columns");
23.207 -return -1}var iThisIndex=oSettings.aoData.length;oSettings.aoData.push({nTr:document.createElement("tr"),_iId:oSettings.iNextId++,_aData:aData.slice(),_anHidden:[],_sRowStripe:""});
23.208 -var nTd;for(var i=0;i<aData.length;i++){nTd=document.createElement("td");if(typeof oSettings.aoColumns[i].fnRender=="function"){var sRendered=oSettings.aoColumns[i].fnRender({iDataRow:iThisIndex,iDataColumn:i,aData:aData,oSettings:oSettings});
23.209 -nTd.innerHTML=sRendered;if(oSettings.aoColumns[i].bUseRendered){oSettings.aoData[iThisIndex]._aData[i]=sRendered
23.210 -}}else{nTd.innerHTML=aData[i]}if(oSettings.aoColumns[i].sClass!==null){nTd.className=oSettings.aoColumns[i].sClass
23.211 -}if(oSettings.aoColumns[i]._bAutoType&&oSettings.aoColumns[i].sType!="string"){if(oSettings.aoColumns[i].sType===null){oSettings.aoColumns[i].sType=_fnDetectType(aData[i])
23.212 -}else{if(oSettings.aoColumns[i].sType=="date"||oSettings.aoColumns[i].sType=="numeric"){oSettings.aoColumns[i].sType=_fnDetectType(aData[i])
23.213 -}}}if(oSettings.aoColumns[i].bVisible){oSettings.aoData[iThisIndex].nTr.appendChild(nTd)
23.214 -}else{oSettings.aoData[iThisIndex]._anHidden[i]=nTd}}oSettings.aiDisplayMaster.push(iThisIndex);
23.215 -return iThisIndex}function _fnGatherData(oSettings){var iLoop,i,iLen,j,jLen,jInner,nTds,nTrs,nTd,aLocalData,iThisIndex,iRow,iRows,iColumn,iColumns;
23.216 -if(oSettings.sAjaxSource===null){nTrs=oSettings.nTable.getElementsByTagName("tbody")[0].childNodes;
23.217 -for(i=0,iLen=nTrs.length;i<iLen;i++){if(nTrs[i].nodeName=="TR"){iThisIndex=oSettings.aoData.length;
23.218 -oSettings.aoData.push({nTr:nTrs[i],_iId:oSettings.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});
23.219 -oSettings.aiDisplayMaster.push(iThisIndex);aLocalData=oSettings.aoData[iThisIndex]._aData;
23.220 -nTds=nTrs[i].childNodes;jInner=0;for(j=0,jLen=nTds.length;j<jLen;j++){if(nTds[j].nodeName=="TD"){aLocalData[jInner]=nTds[j].innerHTML;
23.221 -jInner++}}}}}nTrs=_fnGetTrNodes(oSettings);nTds=[];for(i=0,iLen=nTrs.length;i<iLen;
23.222 -i++){for(j=0,jLen=nTrs[i].childNodes.length;j<jLen;j++){nTd=nTrs[i].childNodes[j];
23.223 -if(nTd.nodeName=="TD"){nTds.push(nTd)}}}if(nTds.length!=nTrs.length*oSettings.aoColumns.length){alert("DataTables warning: Unexpected number of TD elements. Expected "+nTds.length+" and got "+(nTrs.length*oSettings.aoColumns.length)+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.")
23.224 -}for(iColumn=0,iColumns=oSettings.aoColumns.length;iColumn<iColumns;iColumn++){if(oSettings.aoColumns[iColumn].sTitle===null){oSettings.aoColumns[iColumn].sTitle=oSettings.aoColumns[iColumn].nTh.innerHTML
23.225 -}var bAutoType=oSettings.aoColumns[iColumn]._bAutoType,bRender=typeof oSettings.aoColumns[iColumn].fnRender=="function",bClass=oSettings.aoColumns[iColumn].sClass!==null,bVisible=oSettings.aoColumns[iColumn].bVisible,nCell,sThisType,sRendered;
23.226 -if(bAutoType||bRender||bClass||!bVisible){for(iRow=0,iRows=oSettings.aoData.length;
23.227 -iRow<iRows;iRow++){nCell=nTds[(iRow*iColumns)+iColumn];if(bAutoType){if(oSettings.aoColumns[iColumn].sType!="string"){sThisType=_fnDetectType(oSettings.aoData[iRow]._aData[iColumn]);
23.228 -if(oSettings.aoColumns[iColumn].sType===null){oSettings.aoColumns[iColumn].sType=sThisType
23.229 -}else{if(oSettings.aoColumns[iColumn].sType!=sThisType){oSettings.aoColumns[iColumn].sType="string"
23.230 -}}}}if(bRender){sRendered=oSettings.aoColumns[iColumn].fnRender({iDataRow:iRow,iDataColumn:iColumn,aData:oSettings.aoData[iRow]._aData,oSettings:oSettings});
23.231 -nCell.innerHTML=sRendered;if(oSettings.aoColumns[iColumn].bUseRendered){oSettings.aoData[iRow]._aData[iColumn]=sRendered
23.232 -}}if(bClass){nCell.className+=" "+oSettings.aoColumns[iColumn].sClass}if(!bVisible){oSettings.aoData[iRow]._anHidden[iColumn]=nCell;
23.233 -nCell.parentNode.removeChild(nCell)}}}}}function _fnDrawHead(oSettings){var i,nTh,iLen;
23.234 -var iThs=oSettings.nTable.getElementsByTagName("thead")[0].getElementsByTagName("th").length;
23.235 -var iCorrector=0;if(iThs!==0){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;
23.236 -if(oSettings.aoColumns[i].bVisible){if(oSettings.aoColumns[i].sWidth!==null){nTh.style.width=oSettings.aoColumns[i].sWidth
23.237 -}if(oSettings.aoColumns[i].sTitle!=nTh.innerHTML){nTh.innerHTML=oSettings.aoColumns[i].sTitle
23.238 -}}else{nTh.parentNode.removeChild(nTh);iCorrector++}}}else{var nTr=document.createElement("tr");
23.239 -for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){nTh=oSettings.aoColumns[i].nTh;
23.240 -nTh.innerHTML=oSettings.aoColumns[i].sTitle;if(oSettings.aoColumns[i].bVisible){if(oSettings.aoColumns[i].sClass!==null){nTh.className=oSettings.aoColumns[i].sClass
23.241 -}if(oSettings.aoColumns[i].sWidth!==null){nTh.style.width=oSettings.aoColumns[i].sWidth
23.242 -}nTr.appendChild(nTh)}}$("thead:eq(0)",oSettings.nTable).html("")[0].appendChild(nTr)
23.243 -}if(oSettings.bJUI){for(i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){oSettings.aoColumns[i].nTh.insertBefore(document.createElement("span"),oSettings.aoColumns[i].nTh.firstChild)
23.244 -}}if(oSettings.oFeatures.bSort){for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable!==false){_fnSortAttachListener(oSettings,oSettings.aoColumns[i].nTh,i)
23.245 -}else{$(oSettings.aoColumns[i].nTh).addClass(oSettings.oClasses.sSortableNone)}}$("thead:eq(0) th",oSettings.nTable).mousedown(function(e){if(e.shiftKey){this.onselectstart=function(){return false
23.246 -};return false}})}var nTfoot=oSettings.nTable.getElementsByTagName("tfoot");if(nTfoot.length!==0){iCorrector=0;
23.247 -var nTfs=nTfoot[0].getElementsByTagName("th");for(i=0,iLen=nTfs.length;i<iLen;i++){oSettings.aoColumns[i].nTf=nTfs[i-iCorrector];
23.248 -if(!oSettings.aoColumns[i].bVisible){nTfs[i-iCorrector].parentNode.removeChild(nTfs[i-iCorrector]);
23.249 -iCorrector++}}}}function _fnDraw(oSettings){var i,iLen;var anRows=[];var iRowCount=0;
23.250 -var bRowError=false;var iStrips=oSettings.asStripClasses.length;var iOpenRows=oSettings.aoOpenRows.length;
23.251 -if(oSettings.oFeatures.bServerSide&&!_fnAjaxUpdate(oSettings)){return}if(typeof oSettings.iInitDisplayStart!="undefined"&&oSettings.iInitDisplayStart!=-1){oSettings._iDisplayStart=oSettings.iInitDisplayStart;
23.252 -oSettings.iInitDisplayStart=-1;_fnCalculateEnd(oSettings)}if(oSettings.aiDisplay.length!==0){var iStart=oSettings._iDisplayStart;
23.253 -var iEnd=oSettings._iDisplayEnd;if(oSettings.oFeatures.bServerSide){iStart=0;iEnd=oSettings.aoData.length
23.254 -}for(var j=iStart;j<iEnd;j++){var aoData=oSettings.aoData[oSettings.aiDisplay[j]];
23.255 -var nRow=aoData.nTr;if(iStrips!==0){var sStrip=oSettings.asStripClasses[iRowCount%iStrips];
23.256 -if(aoData._sRowStripe!=sStrip){$(nRow).removeClass(aoData._sRowStripe).addClass(sStrip);
23.257 -aoData._sRowStripe=sStrip}}if(typeof oSettings.fnRowCallback=="function"){nRow=oSettings.fnRowCallback(nRow,oSettings.aoData[oSettings.aiDisplay[j]]._aData,iRowCount,j);
23.258 -if(!nRow&&!bRowError){alert("DataTables warning: A node was not returned by fnRowCallback");
23.259 -bRowError=true}}anRows.push(nRow);iRowCount++;if(iOpenRows!==0){for(var k=0;k<iOpenRows;
23.260 -k++){if(nRow==oSettings.aoOpenRows[k].nParent){anRows.push(oSettings.aoOpenRows[k].nTr)
23.261 -}}}}}else{anRows[0]=document.createElement("tr");if(typeof oSettings.asStripClasses[0]!="undefined"){anRows[0].className=oSettings.asStripClasses[0]
23.262 -}var nTd=document.createElement("td");nTd.setAttribute("valign","top");nTd.colSpan=oSettings.aoColumns.length;
23.263 -nTd.className=oSettings.oClasses.sRowEmpty;nTd.innerHTML=oSettings.oLanguage.sZeroRecords;
23.264 -anRows[iRowCount].appendChild(nTd)}if(typeof oSettings.fnHeaderCallback=="function"){oSettings.fnHeaderCallback($("thead:eq(0)>tr",oSettings.nTable)[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay)
23.265 -}if(typeof oSettings.fnFooterCallback=="function"){oSettings.fnFooterCallback($("tfoot:eq(0)>tr",oSettings.nTable)[0],_fnGetDataMaster(oSettings),oSettings._iDisplayStart,oSettings.fnDisplayEnd(),oSettings.aiDisplay)
23.266 -}var nBody=oSettings.nTable.getElementsByTagName("tbody");if(nBody[0]){var nTrs=nBody[0].childNodes;
23.267 -for(i=nTrs.length-1;i>=0;i--){nTrs[i].parentNode.removeChild(nTrs[i])}for(i=0,iLen=anRows.length;
23.268 -i<iLen;i++){nBody[0].appendChild(anRows[i])}}for(i=0,iLen=oSettings.aoDrawCallback.length;
23.269 -i<iLen;i++){oSettings.aoDrawCallback[i].fn(oSettings)}oSettings.bSorted=false;oSettings.bFiltered=false;
23.270 -if(typeof oSettings._bInitComplete=="undefined"){oSettings._bInitComplete=true;if(oSettings.oFeatures.bAutoWidth&&oSettings.nTable.offsetWidth!==0){oSettings.nTable.style.width=oSettings.nTable.offsetWidth+"px"
23.271 -}}}function _fnReDraw(oSettings){if(oSettings.oFeatures.bSort){_fnSort(oSettings,oSettings.oPreviousSearch)
23.272 -}else{if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch)
23.273 -}else{_fnCalculateEnd(oSettings);_fnDraw(oSettings)}}}function _fnAjaxUpdate(oSettings){if(oSettings.bAjaxDataGet){_fnProcessingDisplay(oSettings,true);
23.274 -var iColumns=oSettings.aoColumns.length;var aoData=[];var i;oSettings.iServerDraw++;
23.275 -aoData.push({name:"sEcho",value:oSettings.iServerDraw});aoData.push({name:"iColumns",value:iColumns});
23.276 -aoData.push({name:"sColumns",value:_fnColumnOrdering(oSettings)});aoData.push({name:"iDisplayStart",value:oSettings._iDisplayStart});
23.277 -aoData.push({name:"iDisplayLength",value:oSettings.oFeatures.bPaginate!==false?oSettings._iDisplayLength:-1});
23.278 -if(oSettings.oFeatures.bFilter!==false){aoData.push({name:"sSearch",value:oSettings.oPreviousSearch.sSearch});
23.279 -aoData.push({name:"bEscapeRegex",value:oSettings.oPreviousSearch.bEscapeRegex});for(i=0;
23.280 -i<iColumns;i++){aoData.push({name:"sSearch_"+i,value:oSettings.aoPreSearchCols[i].sSearch});
23.281 -aoData.push({name:"bEscapeRegex_"+i,value:oSettings.aoPreSearchCols[i].bEscapeRegex});
23.282 -aoData.push({name:"bSearchable_"+i,value:oSettings.aoColumns[i].bSearchable})}}if(oSettings.oFeatures.bSort!==false){var iFixed=oSettings.aaSortingFixed!==null?oSettings.aaSortingFixed.length:0;
23.283 -var iUser=oSettings.aaSorting.length;aoData.push({name:"iSortingCols",value:iFixed+iUser});
23.284 -for(i=0;i<iFixed;i++){aoData.push({name:"iSortCol_"+i,value:oSettings.aaSortingFixed[i][0]});
23.285 -aoData.push({name:"sSortDir_"+i,value:oSettings.aaSortingFixed[i][1]})}for(i=0;i<iUser;
23.286 -i++){aoData.push({name:"iSortCol_"+(i+iFixed),value:oSettings.aaSorting[i][0]});aoData.push({name:"sSortDir_"+(i+iFixed),value:oSettings.aaSorting[i][1]})
23.287 -}for(i=0;i<iColumns;i++){aoData.push({name:"bSortable_"+i,value:oSettings.aoColumns[i].bSortable})
23.288 -}}oSettings.fnServerData(oSettings.sAjaxSource,aoData,function(json){_fnAjaxUpdateDraw(oSettings,json)
23.289 -});return false}else{return true}}function _fnAjaxUpdateDraw(oSettings,json){if(typeof json.sEcho!="undefined"){if(json.sEcho*1<oSettings.iServerDraw){return
23.290 -}else{oSettings.iServerDraw=json.sEcho*1}}_fnClearTable(oSettings);oSettings._iRecordsTotal=json.iTotalRecords;
23.291 -oSettings._iRecordsDisplay=json.iTotalDisplayRecords;var sOrdering=_fnColumnOrdering(oSettings);
23.292 -var bReOrder=(typeof json.sColumns!="undefined"&&sOrdering!==""&&json.sColumns!=sOrdering);
23.293 -if(bReOrder){var aiIndex=_fnReOrderIndex(oSettings,json.sColumns)}for(var i=0,iLen=json.aaData.length;
23.294 -i<iLen;i++){if(bReOrder){var aData=[];for(var j=0,jLen=oSettings.aoColumns.length;
23.295 -j<jLen;j++){aData.push(json.aaData[i][aiIndex[j]])}_fnAddData(oSettings,aData)}else{_fnAddData(oSettings,json.aaData[i])
23.296 -}}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings.bAjaxDataGet=false;
23.297 -_fnDraw(oSettings);oSettings.bAjaxDataGet=true;_fnProcessingDisplay(oSettings,false)
23.298 -}function _fnAddOptionsHtml(oSettings){var nHolding=document.createElement("div");
23.299 -oSettings.nTable.parentNode.insertBefore(nHolding,oSettings.nTable);var nWrapper=document.createElement("div");
23.300 -nWrapper.className=oSettings.oClasses.sWrapper;if(oSettings.sTableId!==""){nWrapper.setAttribute("id",oSettings.sTableId+"_wrapper")
23.301 -}var nInsertNode=nWrapper;var sDom=oSettings.sDom.replace("H","fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix");
23.302 -sDom=sDom.replace("F","fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");
23.303 -var aDom=sDom.split("");var nTmp,iPushFeature,cOption,nNewNode,cNext,sClass,j;for(var i=0;
23.304 -i<aDom.length;i++){iPushFeature=0;cOption=aDom[i];if(cOption=="<"){nNewNode=document.createElement("div");
23.305 -cNext=aDom[i+1];if(cNext=="'"||cNext=='"'){sClass="";j=2;while(aDom[i+j]!=cNext){sClass+=aDom[i+j];
23.306 -j++}nNewNode.className=sClass;i+=j}nInsertNode.appendChild(nNewNode);nInsertNode=nNewNode
23.307 -}else{if(cOption==">"){nInsertNode=nInsertNode.parentNode}else{if(cOption=="l"&&oSettings.oFeatures.bPaginate&&oSettings.oFeatures.bLengthChange){nTmp=_fnFeatureHtmlLength(oSettings);
23.308 -iPushFeature=1}else{if(cOption=="f"&&oSettings.oFeatures.bFilter){nTmp=_fnFeatureHtmlFilter(oSettings);
23.309 -iPushFeature=1}else{if(cOption=="r"&&oSettings.oFeatures.bProcessing){nTmp=_fnFeatureHtmlProcessing(oSettings);
23.310 -iPushFeature=1}else{if(cOption=="t"){nTmp=oSettings.nTable;iPushFeature=1}else{if(cOption=="i"&&oSettings.oFeatures.bInfo){nTmp=_fnFeatureHtmlInfo(oSettings);
23.311 -iPushFeature=1}else{if(cOption=="p"&&oSettings.oFeatures.bPaginate){nTmp=_fnFeatureHtmlPaginate(oSettings);
23.312 -iPushFeature=1}else{if(_oExt.aoFeatures.length!==0){var aoFeatures=_oExt.aoFeatures;
23.313 -for(var k=0,kLen=aoFeatures.length;k<kLen;k++){if(cOption==aoFeatures[k].cFeature){nTmp=aoFeatures[k].fnInit(oSettings);
23.314 -if(nTmp){iPushFeature=1}break}}}}}}}}}}}if(iPushFeature==1){if(typeof oSettings.aanFeatures[cOption]!="object"){oSettings.aanFeatures[cOption]=[]
23.315 -}oSettings.aanFeatures[cOption].push(nTmp);nInsertNode.appendChild(nTmp)}}nHolding.parentNode.replaceChild(nWrapper,nHolding)
23.316 -}function _fnFeatureHtmlFilter(oSettings){var nFilter=document.createElement("div");
23.317 -if(oSettings.sTableId!==""&&typeof oSettings.aanFeatures.f=="undefined"){nFilter.setAttribute("id",oSettings.sTableId+"_filter")
23.318 -}nFilter.className=oSettings.oClasses.sFilter;var sSpace=oSettings.oLanguage.sSearch===""?"":" ";
23.319 -nFilter.innerHTML=oSettings.oLanguage.sSearch+sSpace+'<input type="text" />';var jqFilter=$("input",nFilter);
23.320 -jqFilter.val(oSettings.oPreviousSearch.sSearch.replace('"',"""));jqFilter.keyup(function(e){var n=oSettings.aanFeatures.f;
23.321 -for(var i=0,iLen=n.length;i<iLen;i++){if(n[i]!=this.parentNode){$("input",n[i]).val(this.value)
23.322 -}}_fnFilterComplete(oSettings,{sSearch:this.value,bEscapeRegex:oSettings.oPreviousSearch.bEscapeRegex})
23.323 -});jqFilter.keypress(function(e){if(e.keyCode==13){return false}});return nFilter
23.324 -}function _fnFilterComplete(oSettings,oInput,iForce){_fnFilter(oSettings,oInput.sSearch,iForce,oInput.bEscapeRegex);
23.325 -for(var i=0;i<oSettings.aoPreSearchCols.length;i++){_fnFilterColumn(oSettings,oSettings.aoPreSearchCols[i].sSearch,i,oSettings.aoPreSearchCols[i].bEscapeRegex)
23.326 -}if(_oExt.afnFiltering.length!==0){_fnFilterCustom(oSettings)}oSettings.bFiltered=true;
23.327 -oSettings._iDisplayStart=0;_fnCalculateEnd(oSettings);_fnDraw(oSettings);_fnBuildSearchArray(oSettings,0)
23.328 -}function _fnFilterCustom(oSettings){var afnFilters=_oExt.afnFiltering;for(var i=0,iLen=afnFilters.length;
23.329 -i<iLen;i++){var iCorrector=0;for(var j=0,jLen=oSettings.aiDisplay.length;j<jLen;j++){var iDisIndex=oSettings.aiDisplay[j-iCorrector];
23.330 -if(!afnFilters[i](oSettings,oSettings.aoData[iDisIndex]._aData,iDisIndex)){oSettings.aiDisplay.splice(j-iCorrector,1);
23.331 -iCorrector++}}}}function _fnFilterColumn(oSettings,sInput,iColumn,bEscapeRegex){if(sInput===""){return
23.332 -}var iIndexCorrector=0;var sRegexMatch=bEscapeRegex?_fnEscapeRegex(sInput):sInput;
23.333 -var rpSearch=new RegExp(sRegexMatch,"i");for(var i=oSettings.aiDisplay.length-1;i>=0;
23.334 -i--){var sData=_fnDataToSearch(oSettings.aoData[oSettings.aiDisplay[i]]._aData[iColumn],oSettings.aoColumns[iColumn].sType);
23.335 -if(!rpSearch.test(sData)){oSettings.aiDisplay.splice(i,1);iIndexCorrector++}}}function _fnFilter(oSettings,sInput,iForce,bEscapeRegex){var i;
23.336 -if(typeof iForce=="undefined"||iForce===null){iForce=0}if(_oExt.afnFiltering.length!==0){iForce=1
23.337 -}var asSearch=bEscapeRegex?_fnEscapeRegex(sInput).split(" "):sInput.split(" ");var sRegExpString="^(?=.*?"+asSearch.join(")(?=.*?")+").*$";
23.338 -var rpSearch=new RegExp(sRegExpString,"i");if(sInput.length<=0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);
23.339 -oSettings.aiDisplay=oSettings.aiDisplayMaster.slice()}else{if(oSettings.aiDisplay.length==oSettings.aiDisplayMaster.length||oSettings.oPreviousSearch.sSearch.length>sInput.length||iForce==1||sInput.indexOf(oSettings.oPreviousSearch.sSearch)!==0){oSettings.aiDisplay.splice(0,oSettings.aiDisplay.length);
23.340 -_fnBuildSearchArray(oSettings,1);for(i=0;i<oSettings.aiDisplayMaster.length;i++){if(rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.push(oSettings.aiDisplayMaster[i])
23.341 -}}}else{var iIndexCorrector=0;for(i=0;i<oSettings.asDataSearch.length;i++){if(!rpSearch.test(oSettings.asDataSearch[i])){oSettings.aiDisplay.splice(i-iIndexCorrector,1);
23.342 -iIndexCorrector++}}}}oSettings.oPreviousSearch.sSearch=sInput;oSettings.oPreviousSearch.bEscapeRegex=bEscapeRegex
23.343 -}function _fnBuildSearchArray(oSettings,iMaster){oSettings.asDataSearch.splice(0,oSettings.asDataSearch.length);
23.344 -var aArray=(typeof iMaster!="undefined"&&iMaster==1)?oSettings.aiDisplayMaster:oSettings.aiDisplay;
23.345 -for(var i=0,iLen=aArray.length;i<iLen;i++){oSettings.asDataSearch[i]="";for(var j=0,jLen=oSettings.aoColumns.length;
23.346 -j<jLen;j++){if(oSettings.aoColumns[j].bSearchable){var sData=oSettings.aoData[aArray[i]]._aData[j];
23.347 -oSettings.asDataSearch[i]+=_fnDataToSearch(sData,oSettings.aoColumns[j].sType)+" "
23.348 -}}}}function _fnDataToSearch(sData,sType){if(typeof _oExt.ofnSearch[sType]=="function"){return _oExt.ofnSearch[sType](sData)
23.349 -}else{if(sType=="html"){return sData.replace(/\n/g," ").replace(/<.*?>/g,"")}else{if(typeof sData=="string"){return sData.replace(/\n/g," ")
23.350 -}}}return sData}function _fnSort(oSettings,bApplyClasses){var aaSort=[];var oSort=_oExt.oSort;
23.351 -var aoData=oSettings.aoData;var iDataSort;var iDataType;var i,j,jLen;if(!oSettings.oFeatures.bServerSide&&(oSettings.aaSorting.length!==0||oSettings.aaSortingFixed!==null)){if(oSettings.aaSortingFixed!==null){aaSort=oSettings.aaSortingFixed.concat(oSettings.aaSorting)
23.352 -}else{aaSort=oSettings.aaSorting.slice()}for(i=0;i<aaSort.length;i++){var iColumn=aaSort[i][0];
23.353 -var sDataType=oSettings.aoColumns[iColumn].sSortDataType;if(typeof _oExt.afnSortData[sDataType]!="undefined"){var iCorrector=0;
23.354 -var aData=_oExt.afnSortData[sDataType](oSettings,iColumn);for(j=0,jLen=aoData.length;
23.355 -j<jLen;j++){if(aoData[j]!==null){aoData[j]._aData[iColumn]=aData[iCorrector];iCorrector++
23.356 -}}}}if(!window.runtime){var fnLocalSorting;var sDynamicSort="fnLocalSorting = function(a,b){var iTest;";
23.357 -for(i=0;i<aaSort.length-1;i++){iDataSort=oSettings.aoColumns[aaSort[i][0]].iDataSort;
23.358 -iDataType=oSettings.aoColumns[iDataSort].sType;sDynamicSort+="iTest = oSort['"+iDataType+"-"+aaSort[i][1]+"']( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] ); if ( iTest === 0 )"
23.359 -}iDataSort=oSettings.aoColumns[aaSort[aaSort.length-1][0]].iDataSort;iDataType=oSettings.aoColumns[iDataSort].sType;
23.360 -sDynamicSort+="iTest = oSort['"+iDataType+"-"+aaSort[aaSort.length-1][1]+"']( aoData[a]._aData["+iDataSort+"], aoData[b]._aData["+iDataSort+"] );if (iTest===0) return oSort['numeric-"+aaSort[aaSort.length-1][1]+"'](a, b); return iTest;}";
23.361 -eval(sDynamicSort);oSettings.aiDisplayMaster.sort(fnLocalSorting)}else{var aAirSort=[];
23.362 -var iLen=aaSort.length;for(i=0;i<iLen;i++){iDataSort=oSettings.aoColumns[aaSort[i][0]].iDataSort;
23.363 -aAirSort.push([iDataSort,oSettings.aoColumns[iDataSort].sType+"-"+aaSort[i][1]])}oSettings.aiDisplayMaster.sort(function(a,b){var iTest;
23.364 -for(var i=0;i<iLen;i++){iTest=oSort[aAirSort[i][1]](aoData[a]._aData[aAirSort[i][0]],aoData[b]._aData[aAirSort[i][0]]);
23.365 -if(iTest!==0){return iTest}}return 0})}}if(typeof bApplyClasses=="undefined"||bApplyClasses){_fnSortingClasses(oSettings)
23.366 -}oSettings.bSorted=true;if(oSettings.oFeatures.bFilter){_fnFilterComplete(oSettings,oSettings.oPreviousSearch,1)
23.367 -}else{oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();oSettings._iDisplayStart=0;
23.368 -_fnCalculateEnd(oSettings);_fnDraw(oSettings)}}function _fnSortAttachListener(oSettings,nNode,iDataIndex,fnCallback){$(nNode).click(function(e){if(oSettings.aoColumns[iDataIndex].bSortable===false){return
23.369 -}var fnInnerSorting=function(){var iColumn,iNextSort;if(e.shiftKey){var bFound=false;
23.370 -for(var i=0;i<oSettings.aaSorting.length;i++){if(oSettings.aaSorting[i][0]==iDataIndex){bFound=true;
23.371 -iColumn=oSettings.aaSorting[i][0];iNextSort=oSettings.aaSorting[i][2]+1;if(typeof oSettings.aoColumns[iColumn].asSorting[iNextSort]=="undefined"){oSettings.aaSorting.splice(i,1)
23.372 -}else{oSettings.aaSorting[i][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];
23.373 -oSettings.aaSorting[i][2]=iNextSort}break}}if(bFound===false){oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0])
23.374 -}}else{if(oSettings.aaSorting.length==1&&oSettings.aaSorting[0][0]==iDataIndex){iColumn=oSettings.aaSorting[0][0];
23.375 -iNextSort=oSettings.aaSorting[0][2]+1;if(typeof oSettings.aoColumns[iColumn].asSorting[iNextSort]=="undefined"){iNextSort=0
23.376 -}oSettings.aaSorting[0][1]=oSettings.aoColumns[iColumn].asSorting[iNextSort];oSettings.aaSorting[0][2]=iNextSort
23.377 -}else{oSettings.aaSorting.splice(0,oSettings.aaSorting.length);oSettings.aaSorting.push([iDataIndex,oSettings.aoColumns[iDataIndex].asSorting[0],0])
23.378 -}}_fnSort(oSettings)};if(!oSettings.oFeatures.bProcessing){fnInnerSorting()}else{_fnProcessingDisplay(oSettings,true);
23.379 -setTimeout(function(){fnInnerSorting();if(!oSettings.oFeatures.bServerSide){_fnProcessingDisplay(oSettings,false)
23.380 -}},0)}if(typeof fnCallback=="function"){fnCallback(oSettings)}})}function _fnSortingClasses(oSettings){var i,iLen,j,jLen,iFound;
23.381 -var aaSort,sClass;var iColumns=oSettings.aoColumns.length;var oClasses=oSettings.oClasses;
23.382 -for(i=0;i<iColumns;i++){if(oSettings.aoColumns[i].bSortable){$(oSettings.aoColumns[i].nTh).removeClass(oClasses.sSortAsc+" "+oClasses.sSortDesc+" "+oSettings.aoColumns[i].sSortingClass)
23.383 -}}if(oSettings.aaSortingFixed!==null){aaSort=oSettings.aaSortingFixed.concat(oSettings.aaSorting)
23.384 -}else{aaSort=oSettings.aaSorting.slice()}for(i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bSortable){sClass=oSettings.aoColumns[i].sSortingClass;
23.385 -iFound=-1;for(j=0;j<aaSort.length;j++){if(aaSort[j][0]==i){sClass=(aaSort[j][1]=="asc")?oClasses.sSortAsc:oClasses.sSortDesc;
23.386 -iFound=j;break}}$(oSettings.aoColumns[i].nTh).addClass(sClass);if(oSettings.bJUI){var jqSpan=$("span",oSettings.aoColumns[i].nTh);
23.387 -jqSpan.removeClass(oClasses.sSortJUIAsc+" "+oClasses.sSortJUIDesc+" "+oClasses.sSortJUI+" "+oClasses.sSortJUIAscAllowed+" "+oClasses.sSortJUIDescAllowed);
23.388 -var sSpanClass;if(iFound==-1){sSpanClass=oSettings.aoColumns[i].sSortingClassJUI}else{if(aaSort[iFound][1]=="asc"){sSpanClass=oClasses.sSortJUIAsc
23.389 -}else{sSpanClass=oClasses.sSortJUIDesc}}jqSpan.addClass(sSpanClass)}}else{$(oSettings.aoColumns[i].nTh).addClass(oSettings.aoColumns[i].sSortingClass)
23.390 -}}sClass=oClasses.sSortColumn;if(oSettings.oFeatures.bSort&&oSettings.oFeatures.bSortClasses){var nTds=_fnGetTdNodes(oSettings);
23.391 -if(nTds.length>=iColumns){for(i=0;i<iColumns;i++){if(nTds[i].className.indexOf(sClass+"1")!=-1){for(j=0,jLen=(nTds.length/iColumns);
23.392 -j<jLen;j++){nTds[(iColumns*j)+i].className=nTds[(iColumns*j)+i].className.replace(" "+sClass+"1","")
23.393 -}}else{if(nTds[i].className.indexOf(sClass+"2")!=-1){for(j=0,jLen=(nTds.length/iColumns);
23.394 -j<jLen;j++){nTds[(iColumns*j)+i].className=nTds[(iColumns*j)+i].className.replace(" "+sClass+"2","")
23.395 -}}else{if(nTds[i].className.indexOf(sClass+"3")!=-1){for(j=0,jLen=(nTds.length/iColumns);
23.396 -j<jLen;j++){nTds[(iColumns*j)+i].className=nTds[(iColumns*j)+i].className.replace(" "+sClass+"3","")
23.397 -}}}}}}var iClass=1;var nTrs=_fnGetTrNodes(oSettings);for(i=0;i<aaSort.length;i++){var iVis=_fnColumnIndexToVisible(oSettings,aaSort[i][0]);
23.398 -if(iVis!==null){if(iClass<=2){for(j=0,jLen=nTrs.length;j<jLen;j++){nTrs[j].getElementsByTagName("td")[iVis].className+=" "+sClass+iClass
23.399 -}}else{for(j=0,jLen=nTrs.length;j<jLen;j++){nTrs[j].getElementsByTagName("td")[iVis].className+=" "+sClass+"3"
23.400 -}}iClass++}}}}function _fnFeatureHtmlPaginate(oSettings){var nPaginate=document.createElement("div");
23.401 -nPaginate.className=oSettings.oClasses.sPaging+oSettings.sPaginationType;_oExt.oPagination[oSettings.sPaginationType].fnInit(oSettings,nPaginate,function(oSettings){_fnCalculateEnd(oSettings);
23.402 -_fnDraw(oSettings)});if(typeof oSettings.aanFeatures.p=="undefined"){oSettings.aoDrawCallback.push({fn:function(oSettings){_oExt.oPagination[oSettings.sPaginationType].fnUpdate(oSettings,function(oSettings){_fnCalculateEnd(oSettings);
23.403 -_fnDraw(oSettings)})},sName:"pagination"})}return nPaginate}function _fnPageChange(oSettings,sAction){if(sAction=="first"){oSettings._iDisplayStart=0
23.404 -}else{if(sAction=="previous"){oSettings._iDisplayStart=oSettings._iDisplayLength>=0?oSettings._iDisplayStart-oSettings._iDisplayLength:0;
23.405 -if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}}else{if(sAction=="next"){if(oSettings._iDisplayLength>=0){if(oSettings._iDisplayStart+oSettings._iDisplayLength<oSettings.fnRecordsDisplay()){oSettings._iDisplayStart+=oSettings._iDisplayLength
23.406 -}}else{oSettings._iDisplayStart=0}}else{if(sAction=="last"){if(oSettings._iDisplayLength>=0){var iPages=parseInt((oSettings.fnRecordsDisplay()-1)/oSettings._iDisplayLength,10)+1;
23.407 -oSettings._iDisplayStart=(iPages-1)*oSettings._iDisplayLength}else{oSettings._iDisplayStart=0
23.408 -}}else{alert("DataTables warning: unknown paging action: "+sAction)}}}}}function _fnFeatureHtmlInfo(oSettings){var nInfo=document.createElement("div");
23.409 -nInfo.className=oSettings.oClasses.sInfo;if(typeof oSettings.aanFeatures.i=="undefined"){oSettings.aoDrawCallback.push({fn:_fnUpdateInfo,sName:"information"});
23.410 -if(oSettings.sTableId!==""){nInfo.setAttribute("id",oSettings.sTableId+"_info")}}return nInfo
23.411 -}function _fnUpdateInfo(oSettings){if(!oSettings.oFeatures.bInfo||oSettings.aanFeatures.i.length===0){return
23.412 -}var nFirst=oSettings.aanFeatures.i[0];if(oSettings.fnRecordsDisplay()===0&&oSettings.fnRecordsDisplay()==oSettings.fnRecordsTotal()){nFirst.innerHTML=oSettings.oLanguage.sInfoEmpty+oSettings.oLanguage.sInfoPostFix
23.413 -}else{if(oSettings.fnRecordsDisplay()===0){nFirst.innerHTML=oSettings.oLanguage.sInfoEmpty+" "+oSettings.oLanguage.sInfoFiltered.replace("_MAX_",oSettings.fnRecordsTotal())+oSettings.oLanguage.sInfoPostFix
23.414 -}else{if(oSettings.fnRecordsDisplay()==oSettings.fnRecordsTotal()){nFirst.innerHTML=oSettings.oLanguage.sInfo.replace("_START_",oSettings._iDisplayStart+1).replace("_END_",oSettings.fnDisplayEnd()).replace("_TOTAL_",oSettings.fnRecordsDisplay())+oSettings.oLanguage.sInfoPostFix
23.415 -}else{nFirst.innerHTML=oSettings.oLanguage.sInfo.replace("_START_",oSettings._iDisplayStart+1).replace("_END_",oSettings.fnDisplayEnd()).replace("_TOTAL_",oSettings.fnRecordsDisplay())+" "+oSettings.oLanguage.sInfoFiltered.replace("_MAX_",oSettings.fnRecordsTotal())+oSettings.oLanguage.sInfoPostFix
23.416 -}}}var n=oSettings.aanFeatures.i;if(n.length>1){var sInfo=nFirst.innerHTML;for(var i=1,iLen=n.length;
23.417 -i<iLen;i++){n[i].innerHTML=sInfo}}}function _fnFeatureHtmlLength(oSettings){var sName=(oSettings.sTableId==="")?"":'name="'+oSettings.sTableId+'_length"';
23.418 -var sStdMenu='<select size="1" '+sName+'><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select>';
23.419 -var nLength=document.createElement("div");if(oSettings.sTableId!==""&&typeof oSettings.aanFeatures.l=="undefined"){nLength.setAttribute("id",oSettings.sTableId+"_length")
23.420 -}nLength.className=oSettings.oClasses.sLength;nLength.innerHTML=oSettings.oLanguage.sLengthMenu.replace("_MENU_",sStdMenu);
23.421 -$('select option[value="'+oSettings._iDisplayLength+'"]',nLength).attr("selected",true);
23.422 -$("select",nLength).change(function(e){var iVal=$(this).val();var n=oSettings.aanFeatures.l;
23.423 -for(var i=0,iLen=n.length;i<iLen;i++){if(n[i]!=this.parentNode){$("select",n[i]).val(iVal)
23.424 -}}oSettings._iDisplayLength=parseInt(iVal,10);_fnCalculateEnd(oSettings);if(oSettings._iDisplayEnd==oSettings.aiDisplay.length){oSettings._iDisplayStart=oSettings._iDisplayEnd-oSettings._iDisplayLength;
23.425 -if(oSettings._iDisplayStart<0){oSettings._iDisplayStart=0}}if(oSettings._iDisplayLength==-1){oSettings._iDisplayStart=0
23.426 -}_fnDraw(oSettings)});return nLength}function _fnFeatureHtmlProcessing(oSettings){var nProcessing=document.createElement("div");
23.427 -if(oSettings.sTableId!==""&&typeof oSettings.aanFeatures.r=="undefined"){nProcessing.setAttribute("id",oSettings.sTableId+"_processing")
23.428 -}nProcessing.innerHTML=oSettings.oLanguage.sProcessing;nProcessing.className=oSettings.oClasses.sProcessing;
23.429 -oSettings.nTable.parentNode.insertBefore(nProcessing,oSettings.nTable);return nProcessing
23.430 -}function _fnProcessingDisplay(oSettings,bShow){if(oSettings.oFeatures.bProcessing){var an=oSettings.aanFeatures.r;
23.431 -for(var i=0,iLen=an.length;i<iLen;i++){an[i].style.visibility=bShow?"visible":"hidden"
23.432 -}}}function _fnVisibleToColumnIndex(oSettings,iMatch){var iColumn=-1;for(var i=0;
23.433 -i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible===true){iColumn++
23.434 -}if(iColumn==iMatch){return i}}return null}function _fnColumnIndexToVisible(oSettings,iMatch){var iVisible=-1;
23.435 -for(var i=0;i<oSettings.aoColumns.length;i++){if(oSettings.aoColumns[i].bVisible===true){iVisible++
23.436 -}if(i==iMatch){return oSettings.aoColumns[i].bVisible===true?iVisible:null}}return null
23.437 -}function _fnNodeToDataIndex(s,n){for(var i=0,iLen=s.aoData.length;i<iLen;i++){if(s.aoData[i]!==null&&s.aoData[i].nTr==n){return i
23.438 -}}return null}function _fnVisbleColumns(oS){var iVis=0;for(var i=0;i<oS.aoColumns.length;
23.439 -i++){if(oS.aoColumns[i].bVisible===true){iVis++}}return iVis}function _fnCalculateEnd(oSettings){if(oSettings.oFeatures.bPaginate===false){oSettings._iDisplayEnd=oSettings.aiDisplay.length
23.440 -}else{if(oSettings._iDisplayStart+oSettings._iDisplayLength>oSettings.aiDisplay.length||oSettings._iDisplayLength==-1){oSettings._iDisplayEnd=oSettings.aiDisplay.length
23.441 -}else{oSettings._iDisplayEnd=oSettings._iDisplayStart+oSettings._iDisplayLength}}}function _fnConvertToWidth(sWidth,nParent){if(!sWidth||sWidth===null||sWidth===""){return 0
23.442 -}if(typeof nParent=="undefined"){nParent=document.getElementsByTagName("body")[0]
23.443 -}var iWidth;var nTmp=document.createElement("div");nTmp.style.width=sWidth;nParent.appendChild(nTmp);
23.444 -iWidth=nTmp.offsetWidth;nParent.removeChild(nTmp);return(iWidth)}function _fnCalculateColumnWidths(oSettings){var iTableWidth=oSettings.nTable.offsetWidth;
23.445 -var iTotalUserIpSize=0;var iTmpWidth;var iVisibleColumns=0;var iColums=oSettings.aoColumns.length;
23.446 -var i;var oHeaders=$("thead:eq(0)>th",oSettings.nTable);for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){iVisibleColumns++;
23.447 -if(oSettings.aoColumns[i].sWidth!==null){iTmpWidth=_fnConvertToWidth(oSettings.aoColumns[i].sWidth,oSettings.nTable.parentNode);
23.448 -iTotalUserIpSize+=iTmpWidth;oSettings.aoColumns[i].sWidth=iTmpWidth+"px"}}}if(iColums==oHeaders.length&&iTotalUserIpSize===0&&iVisibleColumns==iColums){for(i=0;
23.449 -i<oSettings.aoColumns.length;i++){oSettings.aoColumns[i].sWidth=oHeaders[i].offsetWidth+"px"
23.450 -}}else{var nCalcTmp=oSettings.nTable.cloneNode(false);nCalcTmp.setAttribute("id","");
23.451 -var sTableTmp='<table class="'+nCalcTmp.className+'">';var sCalcHead="<tr>";var sCalcHtml="<tr>";
23.452 -for(i=0;i<iColums;i++){if(oSettings.aoColumns[i].bVisible){sCalcHead+="<th>"+oSettings.aoColumns[i].sTitle+"</th>";
23.453 -if(oSettings.aoColumns[i].sWidth!==null){var sWidth="";if(oSettings.aoColumns[i].sWidth!==null){sWidth=' style="width:'+oSettings.aoColumns[i].sWidth+';"'
23.454 -}sCalcHtml+="<td"+sWidth+' tag_index="'+i+'">'+fnGetMaxLenString(oSettings,i)+"</td>"
23.455 -}else{sCalcHtml+='<td tag_index="'+i+'">'+fnGetMaxLenString(oSettings,i)+"</td>"}}}sCalcHead+="</tr>";
23.456 -sCalcHtml+="</tr>";nCalcTmp=$(sTableTmp+sCalcHead+sCalcHtml+"</table>")[0];nCalcTmp.style.width=iTableWidth+"px";
23.457 -nCalcTmp.style.visibility="hidden";nCalcTmp.style.position="absolute";oSettings.nTable.parentNode.appendChild(nCalcTmp);
23.458 -var oNodes=$("tr:eq(1)>td",nCalcTmp);var iIndex;for(i=0;i<oNodes.length;i++){iIndex=oNodes[i].getAttribute("tag_index");
23.459 -oSettings.aoColumns[iIndex].sWidth=$("td",nCalcTmp)[i].offsetWidth+"px"}oSettings.nTable.parentNode.removeChild(nCalcTmp)
23.460 -}}function fnGetMaxLenString(oSettings,iCol){var iMax=0;var iMaxIndex=-1;for(var i=0;
23.461 -i<oSettings.aoData.length;i++){if(oSettings.aoData[i]._aData[iCol].length>iMax){iMax=oSettings.aoData[i]._aData[iCol].length;
23.462 -iMaxIndex=i}}if(iMaxIndex>=0){return oSettings.aoData[iMaxIndex]._aData[iCol]}return""
23.463 -}function _fnArrayCmp(aArray1,aArray2){if(aArray1.length!=aArray2.length){return 1
23.464 -}for(var i=0;i<aArray1.length;i++){if(aArray1[i]!=aArray2[i]){return 2}}return 0}function _fnDetectType(sData){var aTypes=_oExt.aTypes;
23.465 -var iLen=aTypes.length;for(var i=0;i<iLen;i++){var sType=aTypes[i](sData);if(sType!==null){return sType
23.466 -}}return"string"}function _fnSettingsFromNode(nTable){for(var i=0;i<_aoSettings.length;
23.467 -i++){if(_aoSettings[i].nTable==nTable){return _aoSettings[i]}}return null}function _fnGetDataMaster(oSettings){var aData=[];
23.468 -var iLen=oSettings.aoData.length;for(var i=0;i<iLen;i++){if(oSettings.aoData[i]===null){aData.push(null)
23.469 -}else{aData.push(oSettings.aoData[i]._aData)}}return aData}function _fnGetTrNodes(oSettings){var aNodes=[];
23.470 -var iLen=oSettings.aoData.length;for(var i=0;i<iLen;i++){if(oSettings.aoData[i]===null){aNodes.push(null)
23.471 -}else{aNodes.push(oSettings.aoData[i].nTr)}}return aNodes}function _fnGetTdNodes(oSettings){var nTrs=_fnGetTrNodes(oSettings);
23.472 -var nTds=[],nTd;var anReturn=[];var iCorrector;var iRow,iRows,iColumn,iColumns;for(iRow=0,iRows=nTrs.length;
23.473 -iRow<iRows;iRow++){nTds=[];for(iColumn=0,iColumns=nTrs[iRow].childNodes.length;iColumn<iColumns;
23.474 -iColumn++){nTd=nTrs[iRow].childNodes[iColumn];if(nTd.nodeName=="TD"){nTds.push(nTd)
23.475 -}}iCorrector=0;for(iColumn=0,iColumns=oSettings.aoColumns.length;iColumn<iColumns;
23.476 -iColumn++){if(oSettings.aoColumns[iColumn].bVisible){anReturn.push(nTds[iColumn-iCorrector])
23.477 -}else{anReturn.push(oSettings.aoData[iRow]._anHidden[iColumn]);iCorrector++}}}return anReturn
23.478 -}function _fnEscapeRegex(sVal){var acEscape=["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"];
23.479 -var reReplace=new RegExp("(\\"+acEscape.join("|\\")+")","g");return sVal.replace(reReplace,"\\$1")
23.480 -}function _fnReOrderIndex(oSettings,sColumns){var aColumns=sColumns.split(",");var aiReturn=[];
23.481 -for(var i=0,iLen=oSettings.aoColumns.length;i<iLen;i++){for(var j=0;j<iLen;j++){if(oSettings.aoColumns[i].sName==aColumns[j]){aiReturn.push(j);
23.482 -break}}}return aiReturn}function _fnColumnOrdering(oSettings){var sNames="";for(var i=0,iLen=oSettings.aoColumns.length;
23.483 -i<iLen;i++){sNames+=oSettings.aoColumns[i].sName+","}if(sNames.length==iLen){return""
23.484 -}return sNames.slice(0,-1)}function _fnClearTable(oSettings){oSettings.aoData.length=0;
23.485 -oSettings.aiDisplayMaster.length=0;oSettings.aiDisplay.length=0;_fnCalculateEnd(oSettings)
23.486 -}function _fnSaveState(oSettings){if(!oSettings.oFeatures.bStateSave){return}var i;
23.487 -var sValue="{";sValue+='"iStart": '+oSettings._iDisplayStart+",";sValue+='"iEnd": '+oSettings._iDisplayEnd+",";
23.488 -sValue+='"iLength": '+oSettings._iDisplayLength+",";sValue+='"sFilter": "'+oSettings.oPreviousSearch.sSearch.replace('"','\\"')+'",';
23.489 -sValue+='"sFilterEsc": '+oSettings.oPreviousSearch.bEscapeRegex+",";sValue+='"aaSorting": [ ';
23.490 -for(i=0;i<oSettings.aaSorting.length;i++){sValue+="["+oSettings.aaSorting[i][0]+",'"+oSettings.aaSorting[i][1]+"'],"
23.491 -}sValue=sValue.substring(0,sValue.length-1);sValue+="],";sValue+='"aaSearchCols": [ ';
23.492 -for(i=0;i<oSettings.aoPreSearchCols.length;i++){sValue+="['"+oSettings.aoPreSearchCols[i].sSearch.replace("'","'")+"',"+oSettings.aoPreSearchCols[i].bEscapeRegex+"],"
23.493 -}sValue=sValue.substring(0,sValue.length-1);sValue+="],";sValue+='"abVisCols": [ ';
23.494 -for(i=0;i<oSettings.aoColumns.length;i++){sValue+=oSettings.aoColumns[i].bVisible+","
23.495 -}sValue=sValue.substring(0,sValue.length-1);sValue+="]";sValue+="}";_fnCreateCookie("SpryMedia_DataTables_"+oSettings.sInstance,sValue,oSettings.iCookieDuration)
23.496 -}function _fnLoadState(oSettings,oInit){if(!oSettings.oFeatures.bStateSave){return
23.497 -}var oData;var sData=_fnReadCookie("SpryMedia_DataTables_"+oSettings.sInstance);if(sData!==null&&sData!==""){try{if(typeof JSON=="object"&&typeof JSON.parse=="function"){oData=JSON.parse(sData.replace(/'/g,'"'))
23.498 -}else{oData=eval("("+sData+")")}}catch(e){return}oSettings._iDisplayStart=oData.iStart;
23.499 -oSettings.iInitDisplayStart=oData.iStart;oSettings._iDisplayEnd=oData.iEnd;oSettings._iDisplayLength=oData.iLength;
23.500 -oSettings.oPreviousSearch.sSearch=oData.sFilter;oSettings.aaSorting=oData.aaSorting.slice();
23.501 -if(typeof oData.sFilterEsc!="undefined"){oSettings.oPreviousSearch.bEscapeRegex=oData.sFilterEsc
23.502 -}if(typeof oData.aaSearchCols!="undefined"){for(var i=0;i<oData.aaSearchCols.length;
23.503 -i++){oSettings.aoPreSearchCols[i]={sSearch:oData.aaSearchCols[i][0],bEscapeRegex:oData.aaSearchCols[i][1]}
23.504 -}}if(typeof oData.abVisCols!="undefined"){oInit.saved_aoColumns=[];for(i=0;i<oData.abVisCols.length;
23.505 -i++){oInit.saved_aoColumns[i]={};oInit.saved_aoColumns[i].bVisible=oData.abVisCols[i]
23.506 -}}}}function _fnCreateCookie(sName,sValue,iSecs){var date=new Date();date.setTime(date.getTime()+(iSecs*1000));
23.507 -sName+="_"+window.location.pathname.replace(/[\/:]/g,"").toLowerCase();document.cookie=sName+"="+encodeURIComponent(sValue)+"; expires="+date.toGMTString()+"; path=/"
23.508 -}function _fnReadCookie(sName){var sNameEQ=sName+"_"+window.location.pathname.replace(/[\/:]/g,"").toLowerCase()+"=";
23.509 -var sCookieContents=document.cookie.split(";");for(var i=0;i<sCookieContents.length;
23.510 -i++){var c=sCookieContents[i];while(c.charAt(0)==" "){c=c.substring(1,c.length)}if(c.indexOf(sNameEQ)===0){return decodeURIComponent(c.substring(sNameEQ.length,c.length))
23.511 -}}return null}function _fnGetUniqueThs(nThead){var nTrs=nThead.getElementsByTagName("tr");
23.512 -if(nTrs.length==1){return nTrs[0].getElementsByTagName("th")}var aLayout=[],aReturn=[];
23.513 -var ROWSPAN=2,COLSPAN=3,TDELEM=4;var i,j,k,iLen,jLen,iColumnShifted;var fnShiftCol=function(a,i,j){while(typeof a[i][j]!="undefined"){j++
23.514 -}return j};var fnAddRow=function(i){if(typeof aLayout[i]=="undefined"){aLayout[i]=[]
23.515 -}};for(i=0,iLen=nTrs.length;i<iLen;i++){fnAddRow(i);var iColumn=0;var nTds=[];for(j=0,jLen=nTrs[i].childNodes.length;
23.516 -j<jLen;j++){if(nTrs[i].childNodes[j].nodeName=="TD"||nTrs[i].childNodes[j].nodeName=="TH"){nTds.push(nTrs[i].childNodes[j])
23.517 -}}for(j=0,jLen=nTds.length;j<jLen;j++){var iColspan=nTds[j].getAttribute("colspan")*1;
23.518 -var iRowspan=nTds[j].getAttribute("rowspan")*1;if(!iColspan||iColspan===0||iColspan===1){iColumnShifted=fnShiftCol(aLayout,i,iColumn);
23.519 -aLayout[i][iColumnShifted]=(nTds[j].nodeName=="TD")?TDELEM:nTds[j];if(iRowspan||iRowspan===0||iRowspan===1){for(k=1;
23.520 -k<iRowspan;k++){fnAddRow(i+k);aLayout[i+k][iColumnShifted]=ROWSPAN}}iColumn++}else{iColumnShifted=fnShiftCol(aLayout,i,iColumn);
23.521 -for(k=0;k<iColspan;k++){aLayout[i][iColumnShifted+k]=COLSPAN}iColumn+=iColspan}}}for(i=0,iLen=aLayout[0].length;
23.522 -i<iLen;i++){for(j=0,jLen=aLayout.length;j<jLen;j++){if(typeof aLayout[j][i]=="object"){aReturn.push(aLayout[j][i])
23.523 -}}}return aReturn}function _fnMap(oRet,oSrc,sName,sMappedName){if(typeof sMappedName=="undefined"){sMappedName=sName
23.524 -}if(typeof oSrc[sName]!="undefined"){oRet[sMappedName]=oSrc[sName]}}this.oApi._fnInitalise=_fnInitalise;
23.525 -this.oApi._fnLanguageProcess=_fnLanguageProcess;this.oApi._fnAddColumn=_fnAddColumn;
23.526 -this.oApi._fnAddData=_fnAddData;this.oApi._fnGatherData=_fnGatherData;this.oApi._fnDrawHead=_fnDrawHead;
23.527 -this.oApi._fnDraw=_fnDraw;this.oApi._fnAjaxUpdate=_fnAjaxUpdate;this.oApi._fnAddOptionsHtml=_fnAddOptionsHtml;
23.528 -this.oApi._fnFeatureHtmlFilter=_fnFeatureHtmlFilter;this.oApi._fnFeatureHtmlInfo=_fnFeatureHtmlInfo;
23.529 -this.oApi._fnFeatureHtmlPaginate=_fnFeatureHtmlPaginate;this.oApi._fnPageChange=_fnPageChange;
23.530 -this.oApi._fnFeatureHtmlLength=_fnFeatureHtmlLength;this.oApi._fnFeatureHtmlProcessing=_fnFeatureHtmlProcessing;
23.531 -this.oApi._fnProcessingDisplay=_fnProcessingDisplay;this.oApi._fnFilterComplete=_fnFilterComplete;
23.532 -this.oApi._fnFilterColumn=_fnFilterColumn;this.oApi._fnFilter=_fnFilter;this.oApi._fnSortingClasses=_fnSortingClasses;
23.533 -this.oApi._fnVisibleToColumnIndex=_fnVisibleToColumnIndex;this.oApi._fnColumnIndexToVisible=_fnColumnIndexToVisible;
23.534 -this.oApi._fnNodeToDataIndex=_fnNodeToDataIndex;this.oApi._fnVisbleColumns=_fnVisbleColumns;
23.535 -this.oApi._fnBuildSearchArray=_fnBuildSearchArray;this.oApi._fnDataToSearch=_fnDataToSearch;
23.536 -this.oApi._fnCalculateEnd=_fnCalculateEnd;this.oApi._fnConvertToWidth=_fnConvertToWidth;
23.537 -this.oApi._fnCalculateColumnWidths=_fnCalculateColumnWidths;this.oApi._fnArrayCmp=_fnArrayCmp;
23.538 -this.oApi._fnDetectType=_fnDetectType;this.oApi._fnGetDataMaster=_fnGetDataMaster;
23.539 -this.oApi._fnGetTrNodes=_fnGetTrNodes;this.oApi._fnGetTdNodes=_fnGetTdNodes;this.oApi._fnEscapeRegex=_fnEscapeRegex;
23.540 -this.oApi._fnReOrderIndex=_fnReOrderIndex;this.oApi._fnColumnOrdering=_fnColumnOrdering;
23.541 -this.oApi._fnClearTable=_fnClearTable;this.oApi._fnSaveState=_fnSaveState;this.oApi._fnLoadState=_fnLoadState;
23.542 -this.oApi._fnCreateCookie=_fnCreateCookie;this.oApi._fnReadCookie=_fnReadCookie;this.oApi._fnGetUniqueThs=_fnGetUniqueThs;
23.543 -this.oApi._fnReDraw=_fnReDraw;var _that=this;return this.each(function(){var i=0,iLen,j,jLen;
23.544 -for(i=0,iLen=_aoSettings.length;i<iLen;i++){if(_aoSettings[i].nTable==this){alert("DataTables warning: Unable to re-initialise DataTable. Please use the API to make any configuration changes required.");
23.545 -return _aoSettings[i]}}var oSettings=new classSettings();_aoSettings.push(oSettings);
23.546 -var bInitHandedOff=false;var bUsePassedData=false;var sId=this.getAttribute("id");
23.547 -if(sId!==null){oSettings.sTableId=sId;oSettings.sInstance=sId}else{oSettings.sInstance=_oExt._oExternConfig.iNextUnique++
23.548 -}oSettings.nTable=this;oSettings.oApi=_that.oApi;if(typeof oInit!="undefined"&&oInit!==null){_fnMap(oSettings.oFeatures,oInit,"bPaginate");
23.549 -_fnMap(oSettings.oFeatures,oInit,"bLengthChange");_fnMap(oSettings.oFeatures,oInit,"bFilter");
23.550 -_fnMap(oSettings.oFeatures,oInit,"bSort");_fnMap(oSettings.oFeatures,oInit,"bInfo");
23.551 -_fnMap(oSettings.oFeatures,oInit,"bProcessing");_fnMap(oSettings.oFeatures,oInit,"bAutoWidth");
23.552 -_fnMap(oSettings.oFeatures,oInit,"bSortClasses");_fnMap(oSettings.oFeatures,oInit,"bServerSide");
23.553 -_fnMap(oSettings,oInit,"asStripClasses");_fnMap(oSettings,oInit,"fnRowCallback");
23.554 -_fnMap(oSettings,oInit,"fnHeaderCallback");_fnMap(oSettings,oInit,"fnFooterCallback");
23.555 -_fnMap(oSettings,oInit,"fnInitComplete");_fnMap(oSettings,oInit,"fnServerData");_fnMap(oSettings,oInit,"aaSorting");
23.556 -_fnMap(oSettings,oInit,"aaSortingFixed");_fnMap(oSettings,oInit,"sPaginationType");
23.557 -_fnMap(oSettings,oInit,"sAjaxSource");_fnMap(oSettings,oInit,"iCookieDuration");_fnMap(oSettings,oInit,"sDom");
23.558 -_fnMap(oSettings,oInit,"oSearch","oPreviousSearch");_fnMap(oSettings,oInit,"aoSearchCols","aoPreSearchCols");
23.559 -_fnMap(oSettings,oInit,"iDisplayLength","_iDisplayLength");_fnMap(oSettings,oInit,"bJQueryUI","bJUI");
23.560 -if(typeof oInit.fnDrawCallback=="function"){oSettings.aoDrawCallback.push({fn:oInit.fnDrawCallback,sName:"user"})
23.561 -}if(oSettings.oFeatures.bServerSide&&oSettings.oFeatures.bSort&&oSettings.oFeatures.bSortClasses){oSettings.aoDrawCallback.push({fn:_fnSortingClasses,sName:"server_side_sort_classes"})
23.562 -}if(typeof oInit.bJQueryUI!="undefined"&&oInit.bJQueryUI){oSettings.oClasses=_oExt.oJUIClasses;
23.563 -if(typeof oInit.sDom=="undefined"){oSettings.sDom='<"H"lfr>t<"F"ip>'}}if(typeof oInit.iDisplayStart!="undefined"&&typeof oSettings.iInitDisplayStart=="undefined"){oSettings.iInitDisplayStart=oInit.iDisplayStart;
23.564 -oSettings._iDisplayStart=oInit.iDisplayStart}if(typeof oInit.bStateSave!="undefined"){oSettings.oFeatures.bStateSave=oInit.bStateSave;
23.565 -_fnLoadState(oSettings,oInit);oSettings.aoDrawCallback.push({fn:_fnSaveState,sName:"state_save"})
23.566 -}if(typeof oInit.aaData!="undefined"){bUsePassedData=true}if(typeof oInit!="undefined"&&typeof oInit.aoData!="undefined"){oInit.aoColumns=oInit.aoData
23.567 -}if(typeof oInit.oLanguage!="undefined"){if(typeof oInit.oLanguage.sUrl!="undefined"&&oInit.oLanguage.sUrl!==""){oSettings.oLanguage.sUrl=oInit.oLanguage.sUrl;
23.568 -$.getJSON(oSettings.oLanguage.sUrl,null,function(json){_fnLanguageProcess(oSettings,json,true)
23.569 -});bInitHandedOff=true}else{_fnLanguageProcess(oSettings,oInit.oLanguage,false)}}}else{oInit={}
23.570 -}if(typeof oInit.asStripClasses=="undefined"){oSettings.asStripClasses.push(oSettings.oClasses.sStripOdd);
23.571 -oSettings.asStripClasses.push(oSettings.oClasses.sStripEven)}var nThead=this.getElementsByTagName("thead");
23.572 -var nThs=nThead.length===0?null:_fnGetUniqueThs(nThead[0]);var bUseCols=typeof oInit.aoColumns!="undefined";
23.573 -for(i=0,iLen=bUseCols?oInit.aoColumns.length:nThs.length;i<iLen;i++){var oCol=bUseCols?oInit.aoColumns[i]:null;
23.574 -var nTh=nThs?nThs[i]:null;if(typeof oInit.saved_aoColumns!="undefined"&&oInit.saved_aoColumns.length==iLen){if(oCol===null){oCol={}
23.575 -}oCol.bVisible=oInit.saved_aoColumns[i].bVisible}_fnAddColumn(oSettings,oCol,nTh)
23.576 -}for(i=0,iLen=oSettings.aaSorting.length;i<iLen;i++){var oColumn=oSettings.aoColumns[oSettings.aaSorting[i][0]];
23.577 -if(typeof oSettings.aaSorting[i][2]=="undefined"){oSettings.aaSorting[i][2]=0}if(typeof oInit.aaSorting=="undefined"){oSettings.aaSorting[i][1]=oColumn.asSorting[0]
23.578 -}for(j=0,jLen=oColumn.asSorting.length;j<jLen;j++){if(oSettings.aaSorting[i][1]==oColumn.asSorting[j]){oSettings.aaSorting[i][2]=j;
23.579 -break}}}if(this.getElementsByTagName("thead").length===0){this.appendChild(document.createElement("thead"))
23.580 -}if(this.getElementsByTagName("tbody").length===0){this.appendChild(document.createElement("tbody"))
23.581 -}if(bUsePassedData){for(i=0;i<oInit.aaData.length;i++){_fnAddData(oSettings,oInit.aaData[i])
23.582 -}}else{_fnGatherData(oSettings)}oSettings.aiDisplay=oSettings.aiDisplayMaster.slice();
23.583 -if(oSettings.oFeatures.bAutoWidth){_fnCalculateColumnWidths(oSettings)}oSettings.bInitialised=true;
23.584 -if(bInitHandedOff===false){_fnInitalise(oSettings)}})}})(jQuery);
23.585 \ No newline at end of file
23.586 +(function(j,Y,p){j.fn.dataTableSettings=[];var E=j.fn.dataTableSettings;j.fn.dataTableExt={};var m=j.fn.dataTableExt;m.sVersion="1.7.0";m.sErrMode="alert";m.iApiIndex=0;m.oApi={};m.afnFiltering=[];m.aoFeatures=[];m.ofnSearch={};m.afnSortData=[];m.oStdClasses={sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",
23.587 +sPageButtonStaticDisabled:"paginate_button",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",
23.588 +sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""};m.oJUIClasses={sPagePrevEnabled:"fg-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-state-default ui-corner-left ui-state-disabled",
23.589 +sPageNextEnabled:"fg-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-state-default",sPageButtonActive:"fg-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPagePrevious:"previous",sPageNext:"next",
23.590 +sPageLast:"last ui-corner-tr ui-corner-br",sStripOdd:"odd",sStripEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate fg-buttonset fg-buttonset-multi paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",
23.591 +sSortColumn:"sorting_",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot ui-state-default",
23.592 +sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:"ui-state-default"};m.oPagination={two_button:{fnInit:function(g,l,q){var r,u,y;if(g.bJUI){r=p.createElement("a");u=p.createElement("a");y=p.createElement("span");y.className=g.oClasses.sPageJUINext;u.appendChild(y);y=p.createElement("span");y.className=g.oClasses.sPageJUIPrev;r.appendChild(y)}else{r=p.createElement("div");u=p.createElement("div")}r.className=g.oClasses.sPagePrevDisabled;u.className=g.oClasses.sPageNextDisabled;r.title=g.oLanguage.oPaginate.sPrevious;
23.593 +u.title=g.oLanguage.oPaginate.sNext;l.appendChild(r);l.appendChild(u);j(r).click(function(){g.oApi._fnPageChange(g,"previous")&&q(g)});j(u).click(function(){g.oApi._fnPageChange(g,"next")&&q(g)});j(r).bind("selectstart",function(){return false});j(u).bind("selectstart",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");r.setAttribute("id",g.sTableId+"_previous");u.setAttribute("id",g.sTableId+"_next")}},fnUpdate:function(g){if(g.aanFeatures.p)for(var l=
23.594 +g.aanFeatures.p,q=0,r=l.length;q<r;q++)if(l[q].childNodes.length!==0){l[q].childNodes[0].className=g._iDisplayStart===0?g.oClasses.sPagePrevDisabled:g.oClasses.sPagePrevEnabled;l[q].childNodes[1].className=g.fnDisplayEnd()==g.fnRecordsDisplay()?g.oClasses.sPageNextDisabled:g.oClasses.sPageNextEnabled}}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(g,l,q){var r=p.createElement("span"),u=p.createElement("span"),y=p.createElement("span"),C=p.createElement("span"),w=p.createElement("span");r.innerHTML=
23.595 +g.oLanguage.oPaginate.sFirst;u.innerHTML=g.oLanguage.oPaginate.sPrevious;C.innerHTML=g.oLanguage.oPaginate.sNext;w.innerHTML=g.oLanguage.oPaginate.sLast;var x=g.oClasses;r.className=x.sPageButton+" "+x.sPageFirst;u.className=x.sPageButton+" "+x.sPagePrevious;C.className=x.sPageButton+" "+x.sPageNext;w.className=x.sPageButton+" "+x.sPageLast;l.appendChild(r);l.appendChild(u);l.appendChild(y);l.appendChild(C);l.appendChild(w);j(r).click(function(){g.oApi._fnPageChange(g,"first")&&q(g)});j(u).click(function(){g.oApi._fnPageChange(g,
23.596 +"previous")&&q(g)});j(C).click(function(){g.oApi._fnPageChange(g,"next")&&q(g)});j(w).click(function(){g.oApi._fnPageChange(g,"last")&&q(g)});j("span",l).bind("mousedown",function(){return false}).bind("selectstart",function(){return false});if(g.sTableId!==""&&typeof g.aanFeatures.p=="undefined"){l.setAttribute("id",g.sTableId+"_paginate");r.setAttribute("id",g.sTableId+"_first");u.setAttribute("id",g.sTableId+"_previous");C.setAttribute("id",g.sTableId+"_next");w.setAttribute("id",g.sTableId+"_last")}},
23.597 +fnUpdate:function(g,l){if(g.aanFeatures.p){var q=m.oPagination.iFullNumbersShowPages,r=Math.floor(q/2),u=Math.ceil(g.fnRecordsDisplay()/g._iDisplayLength),y=Math.ceil(g._iDisplayStart/g._iDisplayLength)+1,C="",w,x=g.oClasses;if(u<q){r=1;w=u}else if(y<=r){r=1;w=q}else if(y>=u-r){r=u-q+1;w=u}else{r=y-Math.ceil(q/2)+1;w=r+q-1}for(q=r;q<=w;q++)C+=y!=q?'<span class="'+x.sPageButton+'">'+q+"</span>":'<span class="'+x.sPageButtonActive+'">'+q+"</span>";w=g.aanFeatures.p;var z,D=function(){g._iDisplayStart=
23.598 +(this.innerHTML*1-1)*g._iDisplayLength;l(g);return false},L=function(){return false};q=0;for(r=w.length;q<r;q++)if(w[q].childNodes.length!==0){z=w[q].childNodes[2];z.innerHTML=C;j("span",z).click(D).bind("mousedown",L).bind("selectstart",L);z=w[q].getElementsByTagName("span");z=[z[0],z[1],z[z.length-2],z[z.length-1]];j(z).removeClass(x.sPageButton+" "+x.sPageButtonActive+" "+x.sPageButtonStaticDisabled);if(y==1){z[0].className+=" "+x.sPageButtonStaticDisabled;z[1].className+=" "+x.sPageButtonStaticDisabled}else{z[0].className+=
23.599 +" "+x.sPageButton;z[1].className+=" "+x.sPageButton}if(u===0||y==u||g._iDisplayLength==-1){z[2].className+=" "+x.sPageButtonStaticDisabled;z[3].className+=" "+x.sPageButtonStaticDisabled}else{z[2].className+=" "+x.sPageButton;z[3].className+=" "+x.sPageButton}}}}}};m.oSort={"string-asc":function(g,l){g=g.toLowerCase();l=l.toLowerCase();return g<l?-1:g>l?1:0},"string-desc":function(g,l){g=g.toLowerCase();l=l.toLowerCase();return g<l?1:g>l?-1:0},"html-asc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();
23.600 +l=l.replace(/<.*?>/g,"").toLowerCase();return g<l?-1:g>l?1:0},"html-desc":function(g,l){g=g.replace(/<.*?>/g,"").toLowerCase();l=l.replace(/<.*?>/g,"").toLowerCase();return g<l?1:g>l?-1:0},"date-asc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l==="")l=Date.parse("01/01/1970 00:00:00");return g-l},"date-desc":function(g,l){g=Date.parse(g);l=Date.parse(l);if(isNaN(g)||g==="")g=Date.parse("01/01/1970 00:00:00");if(isNaN(l)||l===
23.601 +"")l=Date.parse("01/01/1970 00:00:00");return l-g},"numeric-asc":function(g,l){return(g=="-"||g===""?0:g*1)-(l=="-"||l===""?0:l*1)},"numeric-desc":function(g,l){return(l=="-"||l===""?0:l*1)-(g=="-"||g===""?0:g*1)}};m.aTypes=[function(g){if(g.length===0)return"numeric";var l,q=false;l=g.charAt(0);if("0123456789-".indexOf(l)==-1)return null;for(var r=1;r<g.length;r++){l=g.charAt(r);if("0123456789.".indexOf(l)==-1)return null;if(l=="."){if(q)return null;q=true}}return"numeric"},function(g){var l=Date.parse(g);
23.602 +if(l!==null&&!isNaN(l)||g.length===0)return"date";return null},function(g){if(g.indexOf("<")!=-1&&g.indexOf(">")!=-1)return"html";return null}];m.fnVersionCheck=function(g){var l=function(w,x){for(;w.length<x;)w+="0";return w},q=m.sVersion.split(".");g=g.split(".");for(var r="",u="",y=0,C=g.length;y<C;y++){r+=l(q[y],3);u+=l(g[y],3)}return parseInt(r,10)>=parseInt(u,10)};m._oExternConfig={iNextUnique:0};j.fn.dataTable=function(g){function l(){this.fnRecordsTotal=function(){return this.oFeatures.bServerSide?
23.603 +this._iRecordsTotal:this.aiDisplayMaster.length};this.fnRecordsDisplay=function(){return this.oFeatures.bServerSide?this._iRecordsDisplay:this.aiDisplay.length};this.fnDisplayEnd=function(){return this.oFeatures.bServerSide?this.oFeatures.bPaginate===false?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iDisplayStart+this.aiDisplay.length):this._iDisplayEnd};this.sInstance=this.oInstance=null;this.oFeatures={bPaginate:true,bLengthChange:true,bFilter:true,
23.604 +bSort:true,bInfo:true,bAutoWidth:true,bProcessing:false,bSortClasses:true,bStateSave:false,bServerSide:false};this.oScroll={sX:"",sXInner:"",sY:"",bCollapse:false,iBarWidth:0};this.aanFeatures=[];this.oLanguage={sProcessing:"Processing...",sLengthMenu:"Show _MENU_ entries",sZeroRecords:"No matching records found",sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",
23.605 +sInfoPostFix:"",sSearch:"Search:",sUrl:"",oPaginate:{sFirst:"First",sPrevious:"Previous",sNext:"Next",sLast:"Last"}};this.aoData=[];this.aiDisplay=[];this.aiDisplayMaster=[];this.aoColumns=[];this.iNextId=0;this.asDataSearch=[];this.oPreviousSearch={sSearch:"",bRegex:false,bSmart:true};this.aoPreSearchCols=[];this.aaSorting=[[0,"asc",0]];this.aaSortingFixed=null;this.asStripClasses=[];this.asDestoryStrips=[];this.fnFooterCallback=this.fnHeaderCallback=this.fnRowCallback=null;this.aoDrawCallback=[];
23.606 +this.fnInitComplete=null;this.sTableId="";this.nTableWrapper=this.nTBody=this.nTFoot=this.nTHead=this.nTable=null;this.iDefaultSortIndex=0;this.bInitialised=false;this.aoOpenRows=[];this.sDom="lfrtip";this.sPaginationType="two_button";this.iCookieDuration=7200;this.sCookiePrefix="SpryMedia_DataTables_";this.sAjaxSource=null;this.bAjaxDataGet=true;this.fnServerData=function(a,b,c){j.ajax({url:a,data:b,success:c,dataType:"json",cache:false,error:function(){alert("DataTables warning: JSON data from server failed to load or be parsed. This is most likely to be caused by a JSON formatting error.")}})};
23.607 +this.fnFormatNumber=function(a){if(a<1E3)return a;else{var b=a+"";a=b.split("");var c="";b=b.length;for(var d=0;d<b;d++){if(d%3===0&&d!==0)c=","+c;c=a[b-d-1]+c}}return c};this.aLengthMenu=[10,25,50,100];this.iDraw=0;this.iDrawError=-1;this._iDisplayLength=10;this._iDisplayStart=0;this._iDisplayEnd=10;this._iRecordsDisplay=this._iRecordsTotal=0;this.bJUI=false;this.oClasses=m.oStdClasses;this.bSorted=this.bFiltered=false;this.oInit=null}function q(a){return function(){var b=[B(this[m.iApiIndex])].concat(Array.prototype.slice.call(arguments));
23.608 +return m.oApi[a].apply(this,b)}}function r(a){if(a.bInitialised===false)setTimeout(function(){r(a)},200);else{na(a);z(a);if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();F(a);D(a)}if(a.sAjaxSource!==null&&!a.oFeatures.bServerSide){K(a,true);a.fnServerData.call(a.oInstance,a.sAjaxSource,null,function(b){for(var c=0;c<b.aaData.length;c++)w(a,b.aaData[c]);a.iInitDisplayStart=a._iDisplayStart;if(a.oFeatures.bSort)O(a);else{a.aiDisplay=a.aiDisplayMaster.slice();F(a);D(a)}K(a,false);
23.609 +typeof a.fnInitComplete=="function"&&a.fnInitComplete.call(a.oInstance,a,b)})}else{typeof a.fnInitComplete=="function"&&a.fnInitComplete.call(a.oInstance,a);a.oFeatures.bServerSide||K(a,false)}}}function u(a,b,c){n(a.oLanguage,b,"sProcessing");n(a.oLanguage,b,"sLengthMenu");n(a.oLanguage,b,"sEmptyTable");n(a.oLanguage,b,"sZeroRecords");n(a.oLanguage,b,"sInfo");n(a.oLanguage,b,"sInfoEmpty");n(a.oLanguage,b,"sInfoFiltered");n(a.oLanguage,b,"sInfoPostFix");n(a.oLanguage,b,"sSearch");if(typeof b.oPaginate!=
23.610 +"undefined"){n(a.oLanguage.oPaginate,b.oPaginate,"sFirst");n(a.oLanguage.oPaginate,b.oPaginate,"sPrevious");n(a.oLanguage.oPaginate,b.oPaginate,"sNext");n(a.oLanguage.oPaginate,b.oPaginate,"sLast")}typeof b.sEmptyTable=="undefined"&&typeof b.sZeroRecords!="undefined"&&n(a.oLanguage,b,"sZeroRecords","sEmptyTable");c&&r(a)}function y(a,b){a.aoColumns[a.aoColumns.length++]={sType:null,_bAutoType:true,bVisible:true,bSearchable:true,bSortable:true,asSorting:["asc","desc"],sSortingClass:a.oClasses.sSortable,
23.611 +sSortingClassJUI:a.oClasses.sSortJUI,sTitle:b?b.innerHTML:"",sName:"",sWidth:null,sWidthOrig:null,sClass:null,fnRender:null,bUseRendered:true,iDataSort:a.aoColumns.length-1,sSortDataType:"std",nTh:b?b:p.createElement("th"),nTf:null};b=a.aoColumns.length-1;if(typeof a.aoPreSearchCols[b]=="undefined"||a.aoPreSearchCols[b]===null)a.aoPreSearchCols[b]={sSearch:"",bRegex:false,bSmart:true};else{if(typeof a.aoPreSearchCols[b].bRegex=="undefined")a.aoPreSearchCols[b].bRegex=true;if(typeof a.aoPreSearchCols[b].bSmart==
23.612 +"undefined")a.aoPreSearchCols[b].bSmart=true}C(a,b,null)}function C(a,b,c){b=a.aoColumns[b];if(typeof c!="undefined"&&c!==null){if(typeof c.sType!="undefined"){b.sType=c.sType;b._bAutoType=false}n(b,c,"bVisible");n(b,c,"bSearchable");n(b,c,"bSortable");n(b,c,"sTitle");n(b,c,"sName");n(b,c,"sWidth");n(b,c,"sWidth","sWidthOrig");n(b,c,"sClass");n(b,c,"fnRender");n(b,c,"bUseRendered");n(b,c,"iDataSort");n(b,c,"asSorting");n(b,c,"sSortDataType")}if(!a.oFeatures.bSort)b.bSortable=false;if(!b.bSortable||
23.613 +j.inArray("asc",b.asSorting)==-1&&j.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableNone;b.sSortingClassJUI=""}else if(j.inArray("asc",b.asSorting)!=-1&&j.inArray("desc",b.asSorting)==-1){b.sSortingClass=a.oClasses.sSortableAsc;b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed}else if(j.inArray("asc",b.asSorting)==-1&&j.inArray("desc",b.asSorting)!=-1){b.sSortingClass=a.oClasses.sSortableDesc;b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed}}function w(a,b){if(b.length!=a.aoColumns.length&&
23.614 +a.iDrawError!=a.iDraw){J(a,0,"Added data does not match known number of columns");a.iDrawError=a.iDraw;return-1}b=b.slice();var c=a.aoData.length;a.aoData.push({nTr:p.createElement("tr"),_iId:a.iNextId++,_aData:b,_anHidden:[],_sRowStripe:""});for(var d,f,e=0;e<b.length;e++){d=p.createElement("td");if(b[e]===null)b[e]="";if(typeof b[e]!="string")b[e]+="";b[e]=j.trim(b[e]);if(typeof a.aoColumns[e].fnRender=="function"){f=a.aoColumns[e].fnRender({iDataRow:c,iDataColumn:e,aData:b,oSettings:a});d.innerHTML=
23.615 +f;if(a.aoColumns[e].bUseRendered)a.aoData[c]._aData[e]=f}else d.innerHTML=b[e];if(a.aoColumns[e].sClass!==null)d.className=a.aoColumns[e].sClass;if(a.aoColumns[e]._bAutoType&&a.aoColumns[e].sType!="string"){f=Z(a.aoData[c]._aData[e]);if(a.aoColumns[e].sType===null)a.aoColumns[e].sType=f;else if(a.aoColumns[e].sType!=f)a.aoColumns[e].sType="string"}if(a.aoColumns[e].bVisible)a.aoData[c].nTr.appendChild(d);else a.aoData[c]._anHidden[e]=d}a.aiDisplayMaster.push(c);return c}function x(a){var b,c,d,f,
23.616 +e,i,h,k;if(a.sAjaxSource===null){h=a.nTBody.childNodes;b=0;for(c=h.length;b<c;b++)if(h[b].nodeName.toUpperCase()=="TR"){i=a.aoData.length;a.aoData.push({nTr:h[b],_iId:a.iNextId++,_aData:[],_anHidden:[],_sRowStripe:""});a.aiDisplayMaster.push(i);k=a.aoData[i]._aData;i=h[b].childNodes;d=e=0;for(f=i.length;d<f;d++)if(i[d].nodeName.toUpperCase()=="TD"){k[e]=j.trim(i[d].innerHTML);e++}}}h=S(a);i=[];b=0;for(c=h.length;b<c;b++){d=0;for(f=h[b].childNodes.length;d<f;d++){e=h[b].childNodes[d];e.nodeName.toUpperCase()==
23.617 +"TD"&&i.push(e)}}i.length!=h.length*a.aoColumns.length&&J(a,1,"Unexpected number of TD elements. Expected "+h.length*a.aoColumns.length+" and got "+i.length+". DataTables does not support rowspan / colspan in the table body, and there must be one cell for each row/column combination.");h=0;for(d=a.aoColumns.length;h<d;h++){if(a.aoColumns[h].sTitle===null)a.aoColumns[h].sTitle=a.aoColumns[h].nTh.innerHTML;f=a.aoColumns[h]._bAutoType;e=typeof a.aoColumns[h].fnRender=="function";k=a.aoColumns[h].sClass!==
23.618 +null;var o=a.aoColumns[h].bVisible,t,s;if(f||e||k||!o){b=0;for(c=a.aoData.length;b<c;b++){t=i[b*d+h];if(f)if(a.aoColumns[h].sType!="string"){s=Z(a.aoData[b]._aData[h]);if(a.aoColumns[h].sType===null)a.aoColumns[h].sType=s;else if(a.aoColumns[h].sType!=s)a.aoColumns[h].sType="string"}if(e){s=a.aoColumns[h].fnRender({iDataRow:b,iDataColumn:h,aData:a.aoData[b]._aData,oSettings:a});t.innerHTML=s;if(a.aoColumns[h].bUseRendered)a.aoData[b]._aData[h]=s}if(k)t.className+=" "+a.aoColumns[h].sClass;if(!o){a.aoData[b]._anHidden[h]=
23.619 +t;t.parentNode.removeChild(t)}}}}}function z(a){var b,c,d,f=0;if(a.nTHead.getElementsByTagName("th").length!==0){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;if(a.aoColumns[b].bVisible){if(a.aoColumns[b].sWidth!==null)c.style.width=a.aoColumns[b].sWidth;if(a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{c.parentNode.removeChild(c);f++}}}else{f=p.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;c.innerHTML=a.aoColumns[b].sTitle;
23.620 +if(a.aoColumns[b].bVisible){if(a.aoColumns[b].sClass!==null)c.className=a.aoColumns[b].sClass;if(a.aoColumns[b].sWidth!==null)c.style.width=a.aoColumns[b].sWidth;f.appendChild(c)}}j(a.nTHead).html("")[0].appendChild(f)}if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++)a.aoColumns[b].nTh.insertBefore(p.createElement("span"),a.aoColumns[b].nTh.firstChild)}if(a.oFeatures.bSort){for(b=0;b<a.aoColumns.length;b++)a.aoColumns[b].bSortable!==false?$(a,a.aoColumns[b].nTh,b):j(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone);
23.621 +j("th",a.nTHead).mousedown(function(){this.onselectstart=function(){return false};return false})}if(a.nTFoot!==null){f=0;c=a.nTFoot.getElementsByTagName("th");b=0;for(d=c.length;b<d;b++)if(typeof a.aoColumns[b]!="undefined"){a.aoColumns[b].nTf=c[b-f];if(a.oClasses.sFooterTH!=="")a.aoColumns[b].nTf.className+=" "+a.oClasses.sFooterTH;if(!a.aoColumns[b].bVisible){c[b-f].parentNode.removeChild(c[b-f]);f++}}}}function D(a){var b,c,d=[],f=0,e=false;b=a.asStripClasses.length;c=a.aoOpenRows.length;if(typeof a.iInitDisplayStart!=
23.622 +"undefined"&&a.iInitDisplayStart!=-1){a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart;a.iInitDisplayStart=-1;F(a)}if(!(a.oFeatures.bServerSide&&!oa(a))){if(a.aiDisplay.length!==0){var i=a._iDisplayStart,h=a._iDisplayEnd;if(a.oFeatures.bServerSide){i=0;h=a.aoData.length}for(i=i;i<h;i++){var k=a.aoData[a.aiDisplay[i]],o=k.nTr;if(b!==0){var t=a.asStripClasses[f%b];if(k._sRowStripe!=t){j(o).removeClass(k._sRowStripe).addClass(t);
23.623 +k._sRowStripe=t}}if(typeof a.fnRowCallback=="function"){o=a.fnRowCallback.call(a.oInstance,o,a.aoData[a.aiDisplay[i]]._aData,f,i);if(!o&&!e){J(a,0,"A node was not returned by fnRowCallback");e=true}}d.push(o);f++;if(c!==0)for(k=0;k<c;k++)o==a.aoOpenRows[k].nParent&&d.push(a.aoOpenRows[k].nTr)}}else{d[0]=p.createElement("tr");if(typeof a.asStripClasses[0]!="undefined")d[0].className=a.asStripClasses[0];e=p.createElement("td");e.setAttribute("valign","top");e.colSpan=T(a);e.className=a.oClasses.sRowEmpty;
23.624 +e.innerHTML=typeof a.oLanguage.sEmptyTable!="undefined"&&a.fnRecordsTotal()===0?a.oLanguage.sEmptyTable:a.oLanguage.sZeroRecords.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()));d[f].appendChild(e)}typeof a.fnHeaderCallback=="function"&&a.fnHeaderCallback.call(a.oInstance,j(">tr",a.nTHead)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);typeof a.fnFooterCallback=="function"&&a.fnFooterCallback.call(a.oInstance,j(">tr",a.nTFoot)[0],V(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay);f=
23.625 +p.createDocumentFragment();b=p.createDocumentFragment();if(a.nTBody){e=a.nTBody.parentNode;b.appendChild(a.nTBody);c=a.nTBody.childNodes;for(b=c.length-1;b>=0;b--)c[b].parentNode.removeChild(c[b]);b=0;for(c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);e!==null&&e.appendChild(a.nTBody)}if(typeof a._bInitComplete=="undefined"){a._bInitComplete=true;a.nTableWrapper!=a.nTable.parentNode&&j(a.nTableWrapper).width()>j(a.nTable.parentNode).width()&&U(a)}b=0;for(c=a.aoDrawCallback.length;b<
23.626 +c;b++)a.aoDrawCallback[b].fn.call(a.oInstance,a);a.bSorted=false;a.bFiltered=false}}function L(a){if(a.oFeatures.bSort)O(a,a.oPreviousSearch);else if(a.oFeatures.bFilter)P(a,a.oPreviousSearch);else{F(a);D(a)}}function oa(a){if(a.bAjaxDataGet){K(a,true);var b=a.aoColumns.length,c=[],d;a.iDraw++;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:aa(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:a.oFeatures.bPaginate!==
23.627 +false?a._iDisplayLength:-1});if(a.oFeatures.bFilter!==false){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(d=0;d<b;d++){c.push({name:"sSearch_"+d,value:a.aoPreSearchCols[d].sSearch});c.push({name:"bRegex_"+d,value:a.aoPreSearchCols[d].bRegex});c.push({name:"bSearchable_"+d,value:a.aoColumns[d].bSearchable})}}if(a.oFeatures.bSort!==false){var f=a.aaSortingFixed!==null?a.aaSortingFixed.length:0,e=a.aaSorting.length;c.push({name:"iSortingCols",
23.628 +value:f+e});for(d=0;d<f;d++){c.push({name:"iSortCol_"+d,value:a.aaSortingFixed[d][0]});c.push({name:"sSortDir_"+d,value:a.aaSortingFixed[d][1]})}for(d=0;d<e;d++){c.push({name:"iSortCol_"+(d+f),value:a.aaSorting[d][0]});c.push({name:"sSortDir_"+(d+f),value:a.aaSorting[d][1]})}for(d=0;d<b;d++)c.push({name:"bSortable_"+d,value:a.aoColumns[d].bSortable})}a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(i){pa(a,i)});return false}else return true}function pa(a,b){if(typeof b.sEcho!="undefined")if(b.sEcho*
23.629 +1<a.iDraw)return;else a.iDraw=b.sEcho*1;ba(a);a._iRecordsTotal=b.iTotalRecords;a._iRecordsDisplay=b.iTotalDisplayRecords;var c=aa(a);if(c=typeof b.sColumns!="undefined"&&c!==""&&b.sColumns!=c)var d=qa(a,b.sColumns);for(var f=0,e=b.aaData.length;f<e;f++)if(c){for(var i=[],h=0,k=a.aoColumns.length;h<k;h++)i.push(b.aaData[f][d[h]]);w(a,i)}else w(a,b.aaData[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=false;D(a);a.bAjaxDataGet=true;K(a,false)}function na(a){var b=p.createElement("div");a.nTable.parentNode.insertBefore(b,
23.630 +a.nTable);a.nTableWrapper=p.createElement("div");a.nTableWrapper.className=a.oClasses.sWrapper;a.sTableId!==""&&a.nTableWrapper.setAttribute("id",a.sTableId+"_wrapper");for(var c=a.nTableWrapper,d=a.sDom.split(""),f,e,i,h,k,o,t,s=0;s<d.length;s++){e=0;i=d[s];if(i=="<"){h=p.createElement("div");k=d[s+1];if(k=="'"||k=='"'){o="";for(t=2;d[s+t]!=k;){o+=d[s+t];t++}if(o=="H")o="fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix";else if(o=="F")o="fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix";
23.631 +h.className=o;s+=t}c.appendChild(h);c=h}else if(i==">")c=c.parentNode;else if(i=="l"&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange){f=ra(a);e=1}else if(i=="f"&&a.oFeatures.bFilter){f=sa(a);e=1}else if(i=="r"&&a.oFeatures.bProcessing){f=ta(a);e=1}else if(i=="t"){f=ua(a);e=1}else if(i=="i"&&a.oFeatures.bInfo){f=va(a);e=1}else if(i=="p"&&a.oFeatures.bPaginate){f=wa(a);e=1}else if(m.aoFeatures.length!==0){h=m.aoFeatures;k=0;for(o=h.length;k<o;k++)if(i==h[k].cFeature){if(f=h[k].fnInit(a))e=1;break}}if(e==
23.632 +1){if(typeof a.aanFeatures[i]!="object")a.aanFeatures[i]=[];a.aanFeatures[i].push(f);c.appendChild(f)}}b.parentNode.replaceChild(a.nTableWrapper,b)}function ua(a){if(a.oScroll.sX===""&&a.oScroll.sY==="")return a.nTable;var b=p.createElement("div"),c=p.createElement("div"),d=p.createElement("div"),f=p.createElement("div"),e=p.createElement("div"),i=p.createElement("div"),h=a.nTable.cloneNode(false),k=a.nTable.cloneNode(false),o=a.nTable.getElementsByTagName("thead")[0],t=a.nTable.getElementsByTagName("tfoot").length===
23.633 +0?null:a.nTable.getElementsByTagName("tfoot")[0],s=typeof g.bJQueryUI!="undefined"&&g.bJQueryUI?m.oJUIClasses:m.oStdClasses;c.appendChild(d);e.appendChild(i);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(h);h.appendChild(o);if(t!==null){b.appendChild(e);i.appendChild(k);k.appendChild(t)}b.className=s.sScrollWrapper;c.className=s.sScrollHead;d.className=s.sScrollHeadInner;f.className=s.sScrollBody;e.className=s.sScrollFoot;i.className=s.sScrollFootInner;c.style.overflow="hidden";
23.634 +e.style.overflow="hidden";f.style.overflow="auto";c.style.border="0";e.style.border="0";d.style.width="150%";h.removeAttribute("id");h.style.marginLeft="0";a.nTable.style.marginLeft="0";if(t!==null){k.removeAttribute("id");k.style.marginLeft="0"}d=j(">caption",a.nTable);i=0;for(k=d.length;i<k;i++)h.appendChild(d[i]);if(a.oScroll.sX!==""){c.style.width=v(a.oScroll.sX);f.style.width=v(a.oScroll.sX);if(t!==null)e.style.width=v(a.oScroll.sX);j(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(t!==
23.635 +null)e.scrollLeft=this.scrollLeft})}if(a.oScroll.sY!=="")f.style.height=v(a.oScroll.sY);a.aoDrawCallback.push({fn:xa,sName:"scrolling"});a.nScrollHead=c;a.nScrollFoot=e;return b}function xa(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,e,i,h,k,o,t,s,H=[];i=a.nTable.getElementsByTagName("thead");i.length>0&&a.nTable.removeChild(i[0]);if(a.nTFoot!==null){k=a.nTable.getElementsByTagName("tfoot");k.length>0&&a.nTable.removeChild(k[0])}i=
23.636 +a.nTHead.cloneNode(true);a.nTable.insertBefore(i,a.nTable.childNodes[0]);if(a.nTFoot!==null){k=a.nTFoot.cloneNode(true);a.nTable.insertBefore(k,a.nTable.childNodes[1])}var I=ca(i);f=0;for(e=I.length;f<e;f++){t=da(a,f);I[f].style.width=a.aoColumns[t].sWidth}a.nTFoot!==null&&M(function(A){A.style.width=""},k.getElementsByTagName("tr"));f=j(a.nTable).outerWidth();if(a.oScroll.sX===""){a.nTable.style.width="100%";if(j.browser.msie&&j.browser.version<=7)a.nTable.style.width=v(j(a.nTable).outerWidth()-
23.637 +a.oScroll.iBarWidth)}else if(a.oScroll.sXInner!=="")a.nTable.style.width=v(a.oScroll.sXInner);else if(f==j(d).width()&&j(d).height()<j(a.nTable).height()){a.nTable.style.width=v(f-a.oScroll.iBarWidth);if(j(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=v(f)}else a.nTable.style.width=v(f);f=j(a.nTable).outerWidth();e=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth=
23.638 +"0";o.height=0;s=j(A).width();G.style.width=v(s);H.push(s)},i,e);if(a.nTFoot!==null){h=k.getElementsByTagName("tr");k=a.nTFoot.getElementsByTagName("tr");M(function(A,G){o=A.style;o.paddingTop="0";o.paddingBottom="0";o.borderTopWidth="0";o.borderBottomWidth="0";s=j(A).width();G.style.width=v(s);H.push(s)},h,k)}M(function(A){A.innerHTML="";A.style.width=v(H.shift())},i);a.nTFoot!==null&&M(function(A){A.innerHTML="";A.style.width=v(H.shift())},h);if(j(a.nTable).outerWidth()<f)if(a.oScroll.sX==="")J(a,
23.639 +1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you enable x-scrolling or increase the width the table has in which to be drawn");else a.oScroll.sXInner!==""&&J(a,1,"The table cannot fit into the current element which will cause column misalignment. It is suggested that you increase the sScrollXInner property to allow it to draw in a larger area, or simply remove that parameter to allow automatic calculation");if(a.oScroll.sY==="")if(j.browser.msie&&
23.640 +j.browser.version<=7)d.style.height=v(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(a.oScroll.sY!==""&&a.oScroll.bCollapse){d.style.height=v(a.oScroll.sY);h=a.oScroll.sX!==""&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0;if(a.nTable.offsetHeight<d.offsetHeight)d.style.height=v(j(a.nTable).height()+h)}c.style.width=v(j(a.nTable).outerWidth());b.style.width=v(j(a.nTable).outerWidth()+a.oScroll.iBarWidth);if(a.nTFoot!==null){b=a.nScrollFoot.getElementsByTagName("div")[0];c=b.getElementsByTagName("table")[0];
23.641 +b.style.width=v(a.nTable.offsetWidth+a.oScroll.iBarWidth);c.style.width=v(a.nTable.offsetWidth)}}function U(a){if(a.oFeatures.bAutoWidth===false)return false;ea(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function sa(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.f=="undefined"&&b.setAttribute("id",a.sTableId+"_filter");b.className=a.oClasses.sFilter;b.innerHTML=a.oLanguage.sSearch+(a.oLanguage.sSearch===""?"":" ")+'<input type="text" />';
23.642 +var c=j("input",b);c.val(a.oPreviousSearch.sSearch.replace('"',"""));c.keyup(function(){for(var d=a.aanFeatures.f,f=0,e=d.length;f<e;f++)d[f]!=this.parentNode&&j("input",d[f]).val(this.value);P(a,{sSearch:this.value,bRegex:a.oPreviousSearch.bRegex,bSmart:a.oPreviousSearch.bSmart})});c.keypress(function(d){if(d.keyCode==13)return false});return b}function P(a,b,c){ya(a,b.sSearch,c,b.bRegex,b.bSmart);for(b=0;b<a.aoPreSearchCols.length;b++)za(a,a.aoPreSearchCols[b].sSearch,b,a.aoPreSearchCols[b].bRegex,
23.643 +a.aoPreSearchCols[b].bSmart);m.afnFiltering.length!==0&&Aa(a);a.bFiltered=true;a._iDisplayStart=0;F(a);D(a);Q(a,0)}function Aa(a){for(var b=m.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,e=0,i=a.aiDisplay.length;e<i;e++){var h=a.aiDisplay[e-f];if(!b[c](a,a.aoData[h]._aData,h)){a.aiDisplay.splice(e-f,1);f++}}}function za(a,b,c,d,f){if(b!==""){var e=0;b=fa(b,d,f);for(d=a.aiDisplay.length-1;d>=0;d--){f=ga(a.aoData[a.aiDisplay[d]]._aData[c],a.aoColumns[c].sType);if(!b.test(f)){a.aiDisplay.splice(d,
23.644 +1);e++}}}}function ya(a,b,c,d,f){var e=fa(b,d,f);if(typeof c=="undefined"||c===null)c=0;if(m.afnFiltering.length!==0)c=1;if(b.length<=0){a.aiDisplay.splice(0,a.aiDisplay.length);a.aiDisplay=a.aiDisplayMaster.slice()}else if(a.aiDisplay.length==a.aiDisplayMaster.length||a.oPreviousSearch.sSearch.length>b.length||c==1||b.indexOf(a.oPreviousSearch.sSearch)!==0){a.aiDisplay.splice(0,a.aiDisplay.length);Q(a,1);for(c=0;c<a.aiDisplayMaster.length;c++)e.test(a.asDataSearch[c])&&a.aiDisplay.push(a.aiDisplayMaster[c])}else{var i=
23.645 +0;for(c=0;c<a.asDataSearch.length;c++)if(!e.test(a.asDataSearch[c])){a.aiDisplay.splice(c-i,1);i++}}a.oPreviousSearch.sSearch=b;a.oPreviousSearch.bRegex=d;a.oPreviousSearch.bSmart=f}function Q(a,b){a.asDataSearch.splice(0,a.asDataSearch.length);var c=p.createElement("div");b=typeof b!="undefined"&&b==1?a.aiDisplayMaster:a.aiDisplay;for(var d=0,f=b.length;d<f;d++){a.asDataSearch[d]="";for(var e=0,i=a.aoColumns.length;e<i;e++)if(a.aoColumns[e].bSearchable)a.asDataSearch[d]+=ga(a.aoData[b[d]]._aData[e],
23.646 +a.aoColumns[e].sType)+" ";if(a.asDataSearch[d].indexOf("&")!==-1){c.innerHTML=a.asDataSearch[d];a.asDataSearch[d]=c.textContent?c.textContent:c.innerText}}}function fa(a,b,c){if(c){a=b?a.split(" "):ha(a).split(" ");a="^(?=.*?"+a.join(")(?=.*?")+").*$";return new RegExp(a,"i")}else{a=b?a:ha(a);return new RegExp(a,"i")}}function ga(a,b){if(typeof m.ofnSearch[b]=="function")return m.ofnSearch[b](a);else if(b=="html")return a.replace(/\n/g," ").replace(/<.*?>/g,"");else if(typeof a=="string")return a.replace(/\n/g,
23.647 +" ");return a}function O(a,b){var c=[],d=m.oSort,f=a.aoData,e,i,h,k;if(!a.oFeatures.bServerSide&&(a.aaSorting.length!==0||a.aaSortingFixed!==null)){c=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(h=0;h<c.length;h++){e=c[h][0];i=N(a,e);k=a.aoColumns[e].sSortDataType;if(typeof m.afnSortData[k]!="undefined"){var o=m.afnSortData[k](a,e,i);i=0;for(k=f.length;i<k;i++)f[i]._aData[e]=o[i]}}if(Y.runtime){var t=[],s=c.length;for(h=0;h<s;h++){e=a.aoColumns[c[h][0]].iDataSort;
23.648 +t.push([e,a.aoColumns[e].sType+"-"+c[h][1]])}a.aiDisplayMaster.sort(function(H,I){for(var A,G=0;G<s;G++){A=d[t[G][1]](f[H]._aData[t[G][0]],f[I]._aData[t[G][0]]);if(A!==0)return A}return 0})}else{this.ClosureDataTables={fn:function(){},data:f,sort:m.oSort};k="this.ClosureDataTables.fn = function(a,b){var iTest, oSort=this.ClosureDataTables.sort, aoData=this.ClosureDataTables.data;";for(h=0;h<c.length-1;h++){e=a.aoColumns[c[h][0]].iDataSort;i=a.aoColumns[e].sType;k+="iTest = oSort['"+i+"-"+c[h][1]+
23.649 +"']( aoData[a]._aData["+e+"], aoData[b]._aData["+e+"] ); if ( iTest === 0 )"}if(c.length>0){e=a.aoColumns[c[c.length-1][0]].iDataSort;i=a.aoColumns[e].sType;k+="iTest = oSort['"+i+"-"+c[c.length-1][1]+"']( aoData[a]._aData["+e+"], aoData[b]._aData["+e+"] );if (iTest===0) return oSort['numeric-"+c[c.length-1][1]+"'](a, b); return iTest;}";eval(k);a.aiDisplayMaster.sort(this.ClosureDataTables.fn)}this.ClosureDataTables=undefined}}if(typeof b=="undefined"||b)W(a);a.bSorted=true;if(a.oFeatures.bFilter)P(a,
23.650 +a.oPreviousSearch,1);else{a.aiDisplay=a.aiDisplayMaster.slice();a._iDisplayStart=0;F(a);D(a)}}function $(a,b,c,d){j(b).click(function(f){if(a.aoColumns[c].bSortable!==false){var e=function(){var i,h;if(f.shiftKey){for(var k=false,o=0;o<a.aaSorting.length;o++)if(a.aaSorting[o][0]==c){k=true;i=a.aaSorting[o][0];h=a.aaSorting[o][2]+1;if(typeof a.aoColumns[i].asSorting[h]=="undefined")a.aaSorting.splice(o,1);else{a.aaSorting[o][1]=a.aoColumns[i].asSorting[h];a.aaSorting[o][2]=h}break}k===false&&a.aaSorting.push([c,
23.651 +a.aoColumns[c].asSorting[0],0])}else if(a.aaSorting.length==1&&a.aaSorting[0][0]==c){i=a.aaSorting[0][0];h=a.aaSorting[0][2]+1;if(typeof a.aoColumns[i].asSorting[h]=="undefined")h=0;a.aaSorting[0][1]=a.aoColumns[i].asSorting[h];a.aaSorting[0][2]=h}else{a.aaSorting.splice(0,a.aaSorting.length);a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}O(a)};if(a.oFeatures.bProcessing){K(a,true);setTimeout(function(){e();a.oFeatures.bServerSide||K(a,false)},0)}else e();typeof d=="function"&&d(a)}})}function W(a){var b,
23.652 +c,d,f,e,i=a.aoColumns.length,h=a.oClasses;for(b=0;b<i;b++)a.aoColumns[b].bSortable&&j(a.aoColumns[b].nTh).removeClass(h.sSortAsc+" "+h.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=a.aaSortingFixed!==null?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){e=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){e=f[c][1]=="asc"?h.sSortAsc:h.sSortDesc;d=c;break}j(a.aoColumns[b].nTh).addClass(e);if(a.bJUI){c=j("span",
23.653 +a.aoColumns[b].nTh);c.removeClass(h.sSortJUIAsc+" "+h.sSortJUIDesc+" "+h.sSortJUI+" "+h.sSortJUIAscAllowed+" "+h.sSortJUIDescAllowed);c.addClass(d==-1?a.aoColumns[b].sSortingClassJUI:f[d][1]=="asc"?h.sSortJUIAsc:h.sSortJUIDesc)}}else j(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);e=h.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=X(a);if(d.length>=i)for(b=0;b<i;b++)if(d[b].className.indexOf(e+"1")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=d[i*c+b].className.replace(" "+
23.654 +e+"1","")}else if(d[b].className.indexOf(e+"2")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=d[i*c+b].className.replace(" "+e+"2","")}else if(d[b].className.indexOf(e+"3")!=-1){c=0;for(a=d.length/i;c<a;c++)d[i*c+b].className=d[i*c+b].className.replace(" "+e+"3","")}h=1;var k;for(b=0;b<f.length;b++){k=parseInt(f[b][0],10);c=0;for(a=d.length/i;c<a;c++)d[i*c+k].className+=" "+e+h;h<3&&h++}}}function wa(a){var b=p.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;m.oPagination[a.sPaginationType].fnInit(a,
23.655 +b,function(c){F(c);D(c)});typeof a.aanFeatures.p=="undefined"&&a.aoDrawCallback.push({fn:function(c){m.oPagination[c.sPaginationType].fnUpdate(c,function(d){F(d);D(d)})},sName:"pagination"});return b}function Ba(a,b){var c=a._iDisplayStart;if(b=="first")a._iDisplayStart=0;else if(b=="previous"){a._iDisplayStart=a._iDisplayLength>=0?a._iDisplayStart-a._iDisplayLength:0;if(a._iDisplayStart<0)a._iDisplayStart=0}else if(b=="next")if(a._iDisplayLength>=0){if(a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay())a._iDisplayStart+=
23.656 +a._iDisplayLength}else a._iDisplayStart=0;else if(b=="last")if(a._iDisplayLength>=0){b=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(b-1)*a._iDisplayLength}else a._iDisplayStart=0;else J(a,0,"Unknown paging action: "+b);return c!=a._iDisplayStart}function va(a){var b=p.createElement("div");b.className=a.oClasses.sInfo;if(typeof a.aanFeatures.i=="undefined"){a.aoDrawCallback.push({fn:Ca,sName:"information"});a.sTableId!==""&&b.setAttribute("id",a.sTableId+"_info")}return b}
23.657 +function Ca(a){if(!(!a.oFeatures.bInfo||a.aanFeatures.i.length===0)){var b=j(a.aanFeatures.i[0]),c=a.fnFormatNumber(a.fnRecordsTotal()),d=a.fnFormatNumber(a._iDisplayStart+1),f=a.fnFormatNumber(a.fnDisplayEnd()),e=a.fnFormatNumber(a.fnRecordsDisplay());if(a.fnRecordsDisplay()===0&&a.fnRecordsDisplay()==a.fnRecordsTotal())b.html(a.oLanguage.sInfoEmpty+a.oLanguage.sInfoPostFix);else if(a.fnRecordsDisplay()===0)b.html(a.oLanguage.sInfoEmpty+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",c)+a.oLanguage.sInfoPostFix);
23.658 +else a.fnRecordsDisplay()==a.fnRecordsTotal()?b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+a.oLanguage.sInfoPostFix):b.html(a.oLanguage.sInfo.replace("_START_",d).replace("_END_",f).replace("_TOTAL_",e)+" "+a.oLanguage.sInfoFiltered.replace("_MAX_",a.fnFormatNumber(a.fnRecordsTotal()))+a.oLanguage.sInfoPostFix);a=a.aanFeatures.i;if(a.length>1){b=b.html();c=1;for(d=a.length;c<d;c++)j(a[c]).html(b)}}}function ra(a){var b='<select size="1" '+(a.sTableId===""?
23.659 +"":'name="'+a.sTableId+'_length"')+">",c,d;if(a.aLengthMenu.length==2&&typeof a.aLengthMenu[0]=="object"&&typeof a.aLengthMenu[1]=="object"){c=0;for(d=a.aLengthMenu[0].length;c<d;c++)b+='<option value="'+a.aLengthMenu[0][c]+'">'+a.aLengthMenu[1][c]+"</option>"}else{c=0;for(d=a.aLengthMenu.length;c<d;c++)b+='<option value="'+a.aLengthMenu[c]+'">'+a.aLengthMenu[c]+"</option>"}b+="</select>";var f=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.l=="undefined"&&f.setAttribute("id",a.sTableId+
23.660 +"_length");f.className=a.oClasses.sLength;f.innerHTML=a.oLanguage.sLengthMenu.replace("_MENU_",b);j('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",true);j("select",f).change(function(){var e=j(this).val(),i=a.aanFeatures.l;c=0;for(d=i.length;c<d;c++)i[c]!=this.parentNode&&j("select",i[c]).val(e);a._iDisplayLength=parseInt(e,10);F(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==
23.661 +-1)a._iDisplayStart=0;D(a)});return f}function ta(a){var b=p.createElement("div");a.sTableId!==""&&typeof a.aanFeatures.r=="undefined"&&b.setAttribute("id",a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function K(a,b){if(a.oFeatures.bProcessing){a=a.aanFeatures.r;for(var c=0,d=a.length;c<d;c++)a[c].style.visibility=b?"visible":"hidden"}}function da(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===
23.662 +true&&c++;if(c==b)return d}return null}function N(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++){a.aoColumns[d].bVisible===true&&c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function R(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c<d;c++)if(a.aoData[a.aiDisplay[c]].nTr==b)return a.aiDisplay[c];c=0;for(d=a.aoData.length;c<d;c++)if(a.aoData[c].nTr==b)return c;return null}function T(a){for(var b=0,c=0;c<a.aoColumns.length;c++)a.aoColumns[c].bVisible===true&&b++;return b}
23.663 +function F(a){a._iDisplayEnd=a.oFeatures.bPaginate===false?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||a._iDisplayLength==-1?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a,b){if(!a||a===null||a==="")return 0;if(typeof b=="undefined")b=p.getElementsByTagName("body")[0];var c=p.createElement("div");c.style.width=a;b.appendChild(c);a=c.offsetWidth;b.removeChild(c);return a}function ea(a){var b=0,c,d=0,f=a.aoColumns.length,e,i=j("th",a.nTHead);for(e=
23.664 +0;e<f;e++)if(a.aoColumns[e].bVisible){d++;if(a.aoColumns[e].sWidth!==null){c=Da(a.aoColumns[e].sWidthOrig,a.nTable.parentNode);if(c!==null)a.aoColumns[e].sWidth=v(c);b++}}if(f==i.length&&b===0&&d==f){ia(a,a.nTable);for(e=0;e<a.aoColumns.length;e++){c=j(i[e]).width();if(c!==null)a.aoColumns[e].sWidth=v(c)}}else{b=a.nTable.cloneNode(false);e=p.createElement("tbody");c=p.createElement("tr");b.removeAttribute("id");b.appendChild(a.nTHead.cloneNode(true));if(a.nTFoot!==null){b.appendChild(a.nTFoot.cloneNode(true));
23.665 +M(function(h){h.style.width=""},b.getElementsByTagName("tr"))}b.appendChild(e);e.appendChild(c);e=j("thead th",b);if(e.length===0)e=j("tbody tr:eq(0)>td",b);e.each(function(h){this.style.width="";h=da(a,h);if(h!==null&&a.aoColumns[h].sWidthOrig!=="")this.style.width=a.aoColumns[h].sWidthOrig});for(e=0;e<f;e++)if(a.aoColumns[e].bVisible){d=Ea(a,e);if(d!==null){d=d.cloneNode(true);c.appendChild(d)}}e=a.nTable.parentNode;e.appendChild(b);if(a.oScroll.sX!==""&&a.oScroll.sXInner!=="")b.style.width=v(a.oScroll.sXInner);
23.666 +else if(a.oScroll.sX!==""){b.style.width="";if(j(b).width()<e.offsetWidth)b.style.width=v(e.offsetWidth)}else b.style.width=v(e.offsetWidth);b.style.visibility="hidden";ia(a,b);f=j("tbody tr:eq(0)>td",b);if(f.length===0)f=j("thead tr:eq(0)>th",b);for(e=c=0;e<a.aoColumns.length;e++)if(a.aoColumns[e].bVisible){d=j(f[c]).width();if(d!==null&&d>0)a.aoColumns[e].sWidth=v(d);c++}a.nTable.style.width=v(j(b).outerWidth());b.parentNode.removeChild(b)}}function ia(a,b){if(a.oScroll.sX===""&&a.oScroll.sY!==
23.667 +""){j(b).width();b.style.width=v(j(b).outerWidth()-a.oScroll.iBarWidth)}else if(a.oScroll.sX!=="")b.style.width=v(j(b).outerWidth())}function Ea(a,b,c){if(typeof c=="undefined"||c){c=Fa(a,b);b=N(a,b);if(c<0)return null;return a.aoData[c].nTr.getElementsByTagName("td")[b]}var d=-1,f,e;c=-1;var i=p.createElement("div");i.style.visibility="hidden";i.style.position="absolute";p.body.appendChild(i);f=0;for(e=a.aoData.length;f<e;f++){i.innerHTML=a.aoData[f]._aData[b];if(i.offsetWidth>d){d=i.offsetWidth;
23.668 +c=f}}p.body.removeChild(i);if(c>=0){b=N(a,b);if(a=a.aoData[c].nTr.getElementsByTagName("td")[b])return a}return null}function Fa(a,b){for(var c=0,d=-1,f=0;f<a.aoData.length;f++){var e=a.aoData[f]._aData[b];if(e.length>c){c=e.length;d=f}}return d}function v(a){if(a===null)return"0px";if(typeof a=="number")return a+"px";if(a.indexOf("em")!=-1||a.indexOf("%")!=-1||a.indexOf("ex")!=-1||a.indexOf("px")!=-1)return a;return a+"px"}function La(a,b){if(a.length!=b.length)return 1;for(var c=0;c<a.length;c++)if(a[c]!=
23.669 +b[c])return 2;return 0}function Z(a){for(var b=m.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(f!==null)return f}return"string"}function B(a){for(var b=0;b<E.length;b++)if(E[b].nTable==a)return E[b];return null}function V(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function S(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d].nTr);return b}function X(a){var b=S(a),c=[],d,f=[],e,i,h,k;e=0;for(i=b.length;e<i;e++){c=[];h=0;for(k=b[e].childNodes.length;h<
23.670 +k;h++){d=b[e].childNodes[h];d.nodeName.toUpperCase()=="TD"&&c.push(d)}h=d=0;for(k=a.aoColumns.length;h<k;h++)if(a.aoColumns[h].bVisible)f.push(c[h-d]);else{f.push(a.aoData[e]._anHidden[h]);d++}}return f}function ha(a){return a.replace(new RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function ja(a,b){for(var c=-1,d=0,f=a.length;d<f;d++)if(a[d]==b)c=d;else a[d]>b&&a[d]--;c!=-1&&a.splice(c,1)}function qa(a,b){b=b.split(",");for(var c=[],d=0,f=a.aoColumns.length;d<
23.671 +f;d++)for(var e=0;e<f;e++)if(a.aoColumns[d].sName==b[e]){c.push(e);break}return c}function aa(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";if(b.length==d)return"";return b.slice(0,-1)}function J(a,b,c){a=a.sTableId===""?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(b===0)if(m.sErrMode=="alert")alert(a);else throw a;else typeof console!="undefined"&&typeof console.log!="undefined"&&console.log(a)}function ba(a){a.aoData.length=0;
23.672 +a.aiDisplayMaster.length=0;a.aiDisplay.length=0;F(a)}function Ga(a){if(a.oFeatures.bStateSave){var b,c="{";c+='"iCreate": '+(new Date).getTime()+",";c+='"iStart": '+a._iDisplayStart+",";c+='"iEnd": '+a._iDisplayEnd+",";c+='"iLength": '+a._iDisplayLength+",";c+='"sFilter": "'+a.oPreviousSearch.sSearch.replace('"','\\"')+'",';c+='"sFilterEsc": '+!a.oPreviousSearch.bRegex+",";c+='"aaSorting": [ ';for(b=0;b<a.aaSorting.length;b++)c+="["+a.aaSorting[b][0]+",'"+a.aaSorting[b][1]+"'],";c=c.substring(0,c.length-
23.673 +1);c+="],";c+='"aaSearchCols": [ ';for(b=0;b<a.aoPreSearchCols.length;b++)c+="['"+a.aoPreSearchCols[b].sSearch.replace("'","'")+"',"+!a.aoPreSearchCols[b].bRegex+"],";c=c.substring(0,c.length-1);c+="],";c+='"abVisCols": [ ';for(b=0;b<a.aoColumns.length;b++)c+=a.aoColumns[b].bVisible+",";c=c.substring(0,c.length-1);c+="]";c+="}";Ha(a.sCookiePrefix+a.sInstance,c,a.iCookieDuration,a.sCookiePrefix)}}function Ia(a,b){if(a.oFeatures.bStateSave){var c,d=ka(a.sCookiePrefix+a.sInstance);if(d!==null&&d!==""){try{c=
23.674 +typeof JSON=="object"&&typeof JSON.parse=="function"?JSON.parse(d.replace(/'/g,'"')):eval("("+d+")")}catch(f){return}a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.oPreviousSearch.sSearch=c.sFilter;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();if(typeof c.sFilterEsc!="undefined")a.oPreviousSearch.bRegex=!c.sFilterEsc;if(typeof c.aaSearchCols!="undefined")for(d=0;d<c.aaSearchCols.length;d++)a.aoPreSearchCols[d]={sSearch:c.aaSearchCols[d][0],
23.675 +bRegex:!c.aaSearchCols[d][1]};if(typeof c.abVisCols!="undefined"){b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++){b.saved_aoColumns[d]={};b.saved_aoColumns[d].bVisible=c.abVisCols[d]}}}}}function Ha(a,b,c,d){var f=new Date;f.setTime(f.getTime()+c*1E3);c=Y.location.pathname.split("/");var e=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase();b=e+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/";f="";a=9999999999999;var i;if((ka(e)!==null?p.cookie.length:b.length+
23.676 +p.cookie.length)+10>4096){e=p.cookie.split(";");for(var h=0,k=e.length;h<k;h++)if(e[h].indexOf(d)!=-1){var o=e[h].split("=");try{i=eval("("+decodeURIComponent(o[1])+")")}catch(t){continue}if(typeof i.iCreate!="undefined"&&i.iCreate<a){f=o[0];a=i.iCreate}}if(f!=="")p.cookie=f+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}p.cookie=b}function ka(a){var b=Y.location.pathname.split("/");a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=";b=p.cookie.split(";");for(var c=0;c<
23.677 +b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)===0)return decodeURIComponent(d.substring(a.length,d.length))}return null}function ca(a){a=a.getElementsByTagName("tr");if(a.length==1)return a[0].getElementsByTagName("th");var b=[],c=[],d,f,e,i,h,k,o=function(G,Ma,la){for(;typeof G[Ma][la]!="undefined";)la++;return la},t=function(G){if(typeof b[G]=="undefined")b[G]=[]};d=0;for(i=a.length;d<i;d++){t(d);var s=0,H=[];f=0;for(h=a[d].childNodes.length;f<h;f++)if(a[d].childNodes[f].nodeName.toUpperCase()==
23.678 +"TD"||a[d].childNodes[f].nodeName.toUpperCase()=="TH")H.push(a[d].childNodes[f]);f=0;for(h=H.length;f<h;f++){var I=H[f].getAttribute("colspan")*1,A=H[f].getAttribute("rowspan")*1;if(!I||I===0||I===1){k=o(b,d,s);b[d][k]=H[f].nodeName.toUpperCase()=="TD"?4:H[f];if(A||A===0||A===1)for(e=1;e<A;e++){t(d+e);b[d+e][k]=2}s++}else{k=o(b,d,s);for(e=0;e<I;e++)b[d][k+e]=3;s+=I}}}d=0;for(i=b[0].length;d<i;d++){f=0;for(h=b.length;f<h;f++)typeof b[f][d]=="object"&&c.push(b[f][d])}return c}function Ja(){var a=p.createElement("p"),
23.679 +b=a.style;b.width="100%";b.height="200px";var c=p.createElement("div");b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.overflow="hidden";c.appendChild(a);p.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;p.body.removeChild(c);return b-a}function M(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var e=0,i=b[d].childNodes.length;e<i;e++)if(b[d].childNodes[e].nodeType==1)typeof c!="undefined"?
23.680 +a(b[d].childNodes[e],c[d].childNodes[e]):a(b[d].childNodes[e])}function n(a,b,c,d){if(typeof d=="undefined")d=c;if(typeof b[c]!="undefined")a[d]=b[c]}this.oApi={};this.fnDraw=function(a){var b=B(this[m.iApiIndex]);if(typeof a!="undefined"&&a===false){F(b);D(b)}else L(b)};this.fnFilter=function(a,b,c,d,f){var e=B(this[m.iApiIndex]);if(e.oFeatures.bFilter){if(typeof c=="undefined")c=false;if(typeof d=="undefined")d=true;if(typeof f=="undefined")f=true;if(typeof b=="undefined"||b===null){P(e,{sSearch:a,
23.681 +bRegex:c,bSmart:d},1);if(f&&typeof e.aanFeatures.f!="undefined"){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)j("input",b[c]).val(a)}}else{e.aoPreSearchCols[b].sSearch=a;e.aoPreSearchCols[b].bRegex=c;e.aoPreSearchCols[b].bSmart=d;P(e,e.oPreviousSearch,1)}}};this.fnSettings=function(){return B(this[m.iApiIndex])};this.fnVersionCheck=m.fnVersionCheck;this.fnSort=function(a){var b=B(this[m.iApiIndex]);b.aaSorting=a;O(b)};this.fnSortListener=function(a,b,c){$(B(this[m.iApiIndex]),a,b,c)};this.fnAddData=
23.682 +function(a,b){if(a.length===0)return[];var c=[],d,f=B(this[m.iApiIndex]);if(typeof a[0]=="object")for(var e=0;e<a.length;e++){d=w(f,a[e]);if(d==-1)return c;c.push(d)}else{d=w(f,a);if(d==-1)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();Q(f,1);if(typeof b=="undefined"||b)L(f);return c};this.fnDeleteRow=function(a,b,c){var d=B(this[m.iApiIndex]);a=typeof a=="object"?R(d,a):a;var f=d.aoData.splice(a,1);ja(d.aiDisplayMaster,a);ja(d.aiDisplay,a);Q(d,1);typeof b=="function"&&b.call(this,d,f);
23.683 +if(d._iDisplayStart>=d.aiDisplay.length){d._iDisplayStart-=d._iDisplayLength;if(d._iDisplayStart<0)d._iDisplayStart=0}if(typeof c=="undefined"||c){F(d);D(d)}return f};this.fnClearTable=function(a){var b=B(this[m.iApiIndex]);ba(b);if(typeof a=="undefined"||a)D(b)};this.fnOpen=function(a,b,c){var d=B(this[m.iApiIndex]);this.fnClose(a);var f=p.createElement("tr"),e=p.createElement("td");f.appendChild(e);e.className=c;e.colSpan=T(d);e.innerHTML=b;b=j("tr",d.nTBody);j.inArray(a,b)!=-1&&j(f).insertAfter(a);
23.684 +d.aoOpenRows.push({nTr:f,nParent:a});return f};this.fnClose=function(a){for(var b=B(this[m.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a){(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr);b.aoOpenRows.splice(c,1);return 0}return 1};this.fnGetData=function(a){var b=B(this[m.iApiIndex]);if(typeof a!="undefined"){a=typeof a=="object"?R(b,a):a;return b.aoData[a]._aData}return V(b)};this.fnGetNodes=function(a){var b=B(this[m.iApiIndex]);if(typeof a!="undefined")return b.aoData[a].nTr;
23.685 +return S(b)};this.fnGetPosition=function(a){var b=B(this[m.iApiIndex]);if(a.nodeName.toUpperCase()=="TR")return R(b,a);else if(a.nodeName.toUpperCase()=="TD")for(var c=R(b,a.parentNode),d=0,f=0;f<b.aoColumns.length;f++)if(b.aoColumns[f].bVisible){if(b.aoData[c].nTr.getElementsByTagName("td")[f-d]==a)return[c,f-d,f]}else d++;return null};this.fnUpdate=function(a,b,c,d,f){var e=B(this[m.iApiIndex]),i=typeof b=="object"?R(e,b):b;if(typeof a!="object"){b=a;e.aoData[i]._aData[c]=b;if(e.aoColumns[c].fnRender!==
23.686 +null){b=e.aoColumns[c].fnRender({iDataRow:i,iDataColumn:c,aData:e.aoData[i]._aData,oSettings:e});if(e.aoColumns[c].bUseRendered)e.aoData[i]._aData[c]=b}c=N(e,c);if(c!==null)e.aoData[i].nTr.getElementsByTagName("td")[c].innerHTML=b}else{if(a.length!=e.aoColumns.length){J(e,0,"An array passed to fnUpdate must have the same number of columns as the table in question - in this case "+e.aoColumns.length);return 1}for(var h=0;h<a.length;h++){b=a[h];e.aoData[i]._aData[h]=b;if(e.aoColumns[h].fnRender!==null){b=
23.687 +e.aoColumns[h].fnRender({iDataRow:i,iDataColumn:h,aData:e.aoData[i]._aData,oSettings:e});if(e.aoColumns[h].bUseRendered)e.aoData[i]._aData[h]=b}c=N(e,h);if(c!==null)e.aoData[i].nTr.getElementsByTagName("td")[c].innerHTML=b}}if(typeof f=="undefined"||f){Q(e,1);U(e)}if(typeof d=="undefined"||d)L(e);return 0};this.fnSetColumnVis=function(a,b){var c=B(this[m.iApiIndex]),d,f;f=c.aoColumns.length;var e,i;if(c.aoColumns[a].bVisible!=b){e=j(">tr",c.nTHead)[0];var h=j(">tr",c.nTFoot)[0],k=[],o=[];for(d=0;d<
23.688 +f;d++){k.push(c.aoColumns[d].nTh);o.push(c.aoColumns[d].nTf)}if(b){for(d=b=0;d<a;d++)c.aoColumns[d].bVisible&&b++;if(b>=T(c)){e.appendChild(k[a]);h&&h.appendChild(o[a]);d=0;for(f=c.aoData.length;d<f;d++){e=c.aoData[d]._anHidden[a];c.aoData[d].nTr.appendChild(e)}}else{for(d=a;d<f;d++){i=N(c,d);if(i!==null)break}e.insertBefore(k[a],e.getElementsByTagName("th")[i]);h&&h.insertBefore(o[a],h.getElementsByTagName("th")[i]);X(c);d=0;for(f=c.aoData.length;d<f;d++){e=c.aoData[d]._anHidden[a];c.aoData[d].nTr.insertBefore(e,
23.689 +j(">td:eq("+i+")",c.aoData[d].nTr)[0])}}c.aoColumns[a].bVisible=true}else{e.removeChild(k[a]);h&&h.removeChild(o[a]);i=X(c);d=0;for(f=c.aoData.length;d<f;d++){e=i[d*c.aoColumns.length+a*1];c.aoData[d]._anHidden[a]=e;e.parentNode.removeChild(e)}c.aoColumns[a].bVisible=false}d=0;for(f=c.aoOpenRows.length;d<f;d++)c.aoOpenRows[d].nTr.colSpan=T(c);U(c);D(c)}};this.fnPageChange=function(a,b){var c=B(this[m.iApiIndex]);Ba(c,a);F(c);if(typeof b=="undefined"||b)D(c)};this.fnDestroy=function(){var a=B(this[m.iApiIndex]),
23.690 +b=a.nTableWrapper.parentNode,c=a.nTBody,d;a.nTable.parentNode.removeChild(a.nTable);j(a.nTableWrapper).remove();a.aaSorting=[];a.aaSortingFixed=[];W(a);j(S(a)).removeClass(a.asStripClasses.join(" "));if(a.bJUI){j("th",a.nTHead).removeClass([m.oStdClasses.sSortable,m.oJUIClasses.sSortableAsc,m.oJUIClasses.sSortableDesc,m.oJUIClasses.sSortableNone].join(" "));j("th span",a.nTHead).remove()}else j("th",a.nTHead).removeClass([m.oStdClasses.sSortable,m.oStdClasses.sSortableAsc,m.oStdClasses.sSortableDesc,
23.691 +m.oStdClasses.sSortableNone].join(" "));b.appendChild(a.nTable);b=0;for(d=a.aoData.length;b<d;b++)c.appendChild(a.aoData[b].nTr);j(">tr:even",c).addClass(a.asDestoryStrips[0]);j(">tr:odd",c).addClass(a.asDestoryStrips[1]);b=0;for(d=E.length;b<d;b++)E[b]==a&&E.splice(b,1)};this.fnAdjustColumnSizing=function(a){U(B(this[m.iApiIndex]));if(typeof a=="undefined"||a)this.fnDraw(false)};for(var ma in m.oApi)if(ma)this[ma]=q(ma);this.oApi._fnExternApiFunc=q;this.oApi._fnInitalise=r;this.oApi._fnLanguageProcess=
23.692 +u;this.oApi._fnAddColumn=y;this.oApi._fnColumnOptions=C;this.oApi._fnAddData=w;this.oApi._fnGatherData=x;this.oApi._fnDrawHead=z;this.oApi._fnDraw=D;this.oApi._fnReDraw=L;this.oApi._fnAjaxUpdate=oa;this.oApi._fnAjaxUpdateDraw=pa;this.oApi._fnAddOptionsHtml=na;this.oApi._fnFeatureHtmlTable=ua;this.oApi._fnScrollDraw=xa;this.oApi._fnAjustColumnSizing=U;this.oApi._fnFeatureHtmlFilter=sa;this.oApi._fnFilterComplete=P;this.oApi._fnFilterCustom=Aa;this.oApi._fnFilterColumn=za;this.oApi._fnFilter=ya;this.oApi._fnBuildSearchArray=
23.693 +Q;this.oApi._fnFilterCreateSearch=fa;this.oApi._fnDataToSearch=ga;this.oApi._fnSort=O;this.oApi._fnSortAttachListener=$;this.oApi._fnSortingClasses=W;this.oApi._fnFeatureHtmlPaginate=wa;this.oApi._fnPageChange=Ba;this.oApi._fnFeatureHtmlInfo=va;this.oApi._fnUpdateInfo=Ca;this.oApi._fnFeatureHtmlLength=ra;this.oApi._fnFeatureHtmlProcessing=ta;this.oApi._fnProcessingDisplay=K;this.oApi._fnVisibleToColumnIndex=da;this.oApi._fnColumnIndexToVisible=N;this.oApi._fnNodeToDataIndex=R;this.oApi._fnVisbleColumns=
23.694 +T;this.oApi._fnCalculateEnd=F;this.oApi._fnConvertToWidth=Da;this.oApi._fnCalculateColumnWidths=ea;this.oApi._fnScrollingWidthAdjust=ia;this.oApi._fnGetWidestNode=Ea;this.oApi._fnGetMaxLenString=Fa;this.oApi._fnStringToCss=v;this.oApi._fnArrayCmp=La;this.oApi._fnDetectType=Z;this.oApi._fnSettingsFromNode=B;this.oApi._fnGetDataMaster=V;this.oApi._fnGetTrNodes=S;this.oApi._fnGetTdNodes=X;this.oApi._fnEscapeRegex=ha;this.oApi._fnDeleteIndex=ja;this.oApi._fnReOrderIndex=qa;this.oApi._fnColumnOrdering=
23.695 +aa;this.oApi._fnLog=J;this.oApi._fnClearTable=ba;this.oApi._fnSaveState=Ga;this.oApi._fnLoadState=Ia;this.oApi._fnCreateCookie=Ha;this.oApi._fnReadCookie=ka;this.oApi._fnGetUniqueThs=ca;this.oApi._fnScrollBarWidth=Ja;this.oApi._fnApplyToChildren=M;this.oApi._fnMap=n;var Ka=this;return this.each(function(){var a=0,b,c,d,f;a=0;for(b=E.length;a<b;a++){if(E[a].nTable==this)if(typeof g=="undefined"||typeof g.bRetrieve!="undefined"&&g.bRetrieve===true)return E[a].oInstance;else if(typeof g.bDestroy!="undefined"&&
23.696 +g.bDestroy===true){E[a].oInstance.fnDestroy();break}else{J(E[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, please pass either no arguments to the dataTable() function, or set bRetrieve to true. Alternatively, to destory the old table and create a new one, set bDestroy to true (note that a lot of changes to the configuration can be made through the API which is usually much faster).");return}if(E[a].sTableId!==""&&E[a].sTableId==this.getAttribute("id")){E.splice(a,
23.697 +1);break}}var e=new l;E.push(e);var i=false,h=false;a=this.getAttribute("id");if(a!==null){e.sTableId=a;e.sInstance=a}else e.sInstance=m._oExternConfig.iNextUnique++;e.oInstance=Ka;e.nTable=this;e.oApi=Ka.oApi;if(typeof g!="undefined"&&g!==null){e.oInit=g;n(e.oFeatures,g,"bPaginate");n(e.oFeatures,g,"bLengthChange");n(e.oFeatures,g,"bFilter");n(e.oFeatures,g,"bSort");n(e.oFeatures,g,"bInfo");n(e.oFeatures,g,"bProcessing");n(e.oFeatures,g,"bAutoWidth");n(e.oFeatures,g,"bSortClasses");n(e.oFeatures,
23.698 +g,"bServerSide");n(e.oScroll,g,"sScrollX","sX");n(e.oScroll,g,"sScrollXInner","sXInner");n(e.oScroll,g,"sScrollY","sY");n(e.oScroll,g,"bScrollCollapse","bCollapse");n(e,g,"asStripClasses");n(e,g,"fnRowCallback");n(e,g,"fnHeaderCallback");n(e,g,"fnFooterCallback");n(e,g,"fnInitComplete");n(e,g,"fnServerData");n(e,g,"fnFormatNumber");n(e,g,"aaSorting");n(e,g,"aaSortingFixed");n(e,g,"aLengthMenu");n(e,g,"sPaginationType");n(e,g,"sAjaxSource");n(e,g,"iCookieDuration");n(e,g,"sCookiePrefix");n(e,g,"sDom");
23.699 +n(e,g,"oSearch","oPreviousSearch");n(e,g,"aoSearchCols","aoPreSearchCols");n(e,g,"iDisplayLength","_iDisplayLength");n(e,g,"bJQueryUI","bJUI");typeof g.fnDrawCallback=="function"&&e.aoDrawCallback.push({fn:g.fnDrawCallback,sName:"user"});e.oFeatures.bServerSide&&e.oFeatures.bSort&&e.oFeatures.bSortClasses&&e.aoDrawCallback.push({fn:W,sName:"server_side_sort_classes"});if(typeof g.bJQueryUI!="undefined"&&g.bJQueryUI){e.oClasses=m.oJUIClasses;if(typeof g.sDom=="undefined")e.sDom='<"H"lfr>t<"F"ip>'}if(e.oScroll.sX!==
23.700 +""||e.oScroll.sY!=="")e.oScroll.iBarWidth=Ja();if(typeof g.iDisplayStart!="undefined"&&typeof e.iInitDisplayStart=="undefined"){e.iInitDisplayStart=g.iDisplayStart;e._iDisplayStart=g.iDisplayStart}if(typeof g.bStateSave!="undefined"){e.oFeatures.bStateSave=g.bStateSave;Ia(e,g);e.aoDrawCallback.push({fn:Ga,sName:"state_save"})}if(typeof g.aaData!="undefined")h=true;if(typeof g!="undefined"&&typeof g.aoData!="undefined")g.aoColumns=g.aoData;if(typeof g.oLanguage!="undefined")if(typeof g.oLanguage.sUrl!=
23.701 +"undefined"&&g.oLanguage.sUrl!==""){e.oLanguage.sUrl=g.oLanguage.sUrl;j.getJSON(e.oLanguage.sUrl,null,function(o){u(e,o,true)});i=true}else u(e,g.oLanguage,false)}else g={};if(typeof g.asStripClasses=="undefined"){e.asStripClasses.push(e.oClasses.sStripOdd);e.asStripClasses.push(e.oClasses.sStripEven)}c=false;d=j("tbody>tr",this);a=0;for(b=e.asStripClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(e.asStripClasses[a])){c=true;break}if(c){e.asDestoryStrips=["",""];if(j(d[0]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[0]+=
23.702 +e.oClasses.sStripOdd+" ";if(j(d[0]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[0]+=e.oClasses.sStripEven;if(j(d[1]).hasClass(e.oClasses.sStripOdd))e.asDestoryStrips[1]+=e.oClasses.sStripOdd+" ";if(j(d[1]).hasClass(e.oClasses.sStripEven))e.asDestoryStrips[1]+=e.oClasses.sStripEven;d.removeClass(e.asStripClasses.join(" "))}a=this.getElementsByTagName("thead");c=a.length===0?[]:ca(a[0]);d=typeof g.aoColumns!="undefined";a=0;for(b=d?g.aoColumns.length:c.length;a<b;a++){f=d?g.aoColumns[a]:null;
23.703 +var k=c?c[a]:null;if(typeof g.saved_aoColumns!="undefined"&&g.saved_aoColumns.length==b){if(f===null)f={};f.bVisible=g.saved_aoColumns[a].bVisible}y(e,k)}if(typeof g.aoColumnDefs!="undefined")for(a=g.aoColumnDefs.length-1;a>=0;a--){k=g.aoColumnDefs[a].aTargets;c=0;for(d=k.length;c<d;c++)if(typeof k[c]=="number"&&k[c]>=0){for(;e.aoColumns.length<=k[c];)y(e);C(e,k[c],g.aoColumnDefs[a])}else if(typeof k[c]=="number"&&k[c]<0)C(e,e.aoColumns.length+k[c],g.aoColumnDefs[a]);else if(typeof k[c]=="string"){b=
23.704 +0;for(f=e.aoColumns.length;b<f;b++)if(k[c]=="_all"||e.aoColumns[b].nTh.className.indexOf(k[c])!=-1)C(e,b,g.aoColumnDefs[a])}}if(typeof g.aoColumns!="undefined"){a=0;for(b=g.aoColumns.length;a<b;a++)C(e,a,g.aoColumns[a])}a=0;for(b=e.aaSorting.length;a<b;a++){f=e.aoColumns[e.aaSorting[a][0]];if(typeof e.aaSorting[a][2]=="undefined")e.aaSorting[a][2]=0;if(typeof g.aaSorting=="undefined"&&typeof e.saved_aaSorting=="undefined")e.aaSorting[a][1]=f.asSorting[0];c=0;for(d=f.asSorting.length;c<d;c++)if(e.aaSorting[a][1]==
23.705 +f.asSorting[c]){e.aaSorting[a][2]=c;break}}this.getElementsByTagName("thead").length===0&&this.appendChild(p.createElement("thead"));this.getElementsByTagName("tbody").length===0&&this.appendChild(p.createElement("tbody"));e.nTHead=this.getElementsByTagName("thead")[0];e.nTBody=this.getElementsByTagName("tbody")[0];if(this.getElementsByTagName("tfoot").length>0)e.nTFoot=this.getElementsByTagName("tfoot")[0];if(h)for(a=0;a<g.aaData.length;a++)w(e,g.aaData[a]);else x(e);e.aiDisplay=e.aiDisplayMaster.slice();
23.706 +e.oFeatures.bAutoWidth&&ea(e);e.bInitialised=true;i===false&&r(e)})}})(jQuery,window,document);
24.1 Binary file static/dataTables/media/js/jquery.dataTables.min.js.gz has changed
25.1 --- a/static/dataTables/media/js/jquery.js Mon Aug 16 14:55:21 2010 +0200
25.2 +++ b/static/dataTables/media/js/jquery.js Fri Aug 20 17:39:19 2010 +0200
25.3 @@ -1,151 +1,154 @@
25.4 /*!
25.5 - * jQuery JavaScript Library v1.4
25.6 + * jQuery JavaScript Library v1.4.2
25.7 * http://jquery.com/
25.8 *
25.9 * Copyright 2010, John Resig
25.10 * Dual licensed under the MIT or GPL Version 2 licenses.
25.11 - * http://docs.jquery.com/License
25.12 + * http://jquery.org/license
25.13 *
25.14 * Includes Sizzle.js
25.15 * http://sizzlejs.com/
25.16 * Copyright 2010, The Dojo Foundation
25.17 * Released under the MIT, BSD, and GPL Licenses.
25.18 *
25.19 - * Date: Wed Jan 13 15:23:05 2010 -0500
25.20 + * Date: Sat Feb 13 22:33:48 2010 -0500
25.21 */
25.22 -(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j?
25.23 -e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
25.24 -n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType===
25.25 -11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=
25.26 -i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
25.27 -Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];
25.28 -c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;
25.29 -this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=
25.30 -0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
25.31 -c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
25.32 -o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",
25.33 -M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
25.34 -isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
25.35 -if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
25.36 -0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===
25.37 -"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&
25.38 -!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
25.39 -M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,
25.40 -htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,
25.41 -a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
25.42 -p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a,
25.43 -b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&&
25.44 -a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
25.45 -a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
25.46 -a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
25.47 -b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=
25.48 -" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
25.49 -b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
25.50 -" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&
25.51 -!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=
25.52 --1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
25.53 -if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
25.54 -3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};
25.55 -if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
25.56 -for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+
25.57 -i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
25.58 -8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},
25.59 -handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},
25.60 -props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||
25.61 -s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
25.62 -a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a,
25.63 -b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
25.64 -ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",
25.65 -mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+
25.66 -d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
25.67 --1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d===
25.68 -"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)},
25.69 -remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,
25.70 -f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
25.71 -b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
25.72 -a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?
25.73 -this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===
25.74 -k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
25.75 -e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();
25.76 -u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+
25.77 -(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];
25.78 -for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-
25.79 -1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
25.80 +(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
25.81 +e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
25.82 +j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
25.83 +"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
25.84 +true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
25.85 +Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
25.86 +(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
25.87 +a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
25.88 +"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
25.89 +function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
25.90 +c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
25.91 +L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
25.92 +"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
25.93 +a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
25.94 +d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
25.95 +a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
25.96 +!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
25.97 +true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
25.98 +var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
25.99 +parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
25.100 +false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
25.101 +s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
25.102 +applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
25.103 +else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
25.104 +a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
25.105 +w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
25.106 +cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
25.107 +i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
25.108 +" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
25.109 +this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
25.110 +e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
25.111 +c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
25.112 +a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
25.113 +function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
25.114 +k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
25.115 +C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
25.116 +null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
25.117 +e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
25.118 +f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
25.119 +if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
25.120 +fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
25.121 +d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
25.122 +"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
25.123 +a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
25.124 +isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
25.125 +{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
25.126 +if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
25.127 +e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
25.128 +"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
25.129 +d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
25.130 +!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
25.131 +toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
25.132 +u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
25.133 +function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
25.134 +if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
25.135 +e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
25.136 +t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
25.137 +g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
25.138 +for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
25.139 +1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
25.140 CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
25.141 -relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]=
25.142 -k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];
25.143 -h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
25.144 -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m,
25.145 -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
25.146 +relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
25.147 +l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
25.148 +h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
25.149 +CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
25.150 +g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
25.151 text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
25.152 -setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h=
25.153 -h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m=
25.154 -m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
25.155 -"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g,
25.156 -h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition||
25.157 -!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m=
25.158 -h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
25.159 -r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>";
25.160 -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}();
25.161 -(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,
25.162 -h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/,
25.163 -cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
25.164 -c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
25.165 -{},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a===
25.166 -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
25.167 +setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
25.168 +h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
25.169 +m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
25.170 +"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
25.171 +h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
25.172 +!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
25.173 +h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
25.174 +q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
25.175 +if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
25.176 +(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
25.177 +function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
25.178 +gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
25.179 +c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
25.180 +{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
25.181 +"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
25.182 d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
25.183 -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===
25.184 -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"],
25.185 -legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);
25.186 -return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
25.187 -wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&
25.188 -this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,
25.189 -"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===
25.190 -1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
25.191 -this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
25.192 -c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
25.193 -function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
25.194 -function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
25.195 -if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()===
25.196 -"text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&&
25.197 -s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""===
25.198 -"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=
25.199 -parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e=
25.200 -a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=
25.201 -f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/,
25.202 -wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,
25.203 -"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
25.204 -c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
25.205 -ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
25.206 -text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,
25.207 -e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&
25.208 -B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
25.209 -C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",
25.210 -e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",
25.211 -[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=
25.212 -null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
25.213 -"file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&&
25.214 -d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i=
25.215 -c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/,
25.216 -Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
25.217 -na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
25.218 -c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),
25.219 -p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);
25.220 -else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",
25.221 -1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
25.222 -b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
25.223 -null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
25.224 -"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
25.225 -this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
25.226 -c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
25.227 -null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
25.228 -f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
25.229 -b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
25.230 -0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
25.231 -d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
25.232 -d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
25.233 -bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
25.234 -e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
25.235 -this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
25.236 -c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
25.237 -b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
25.238 \ No newline at end of file
25.239 +a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
25.240 +1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
25.241 +a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
25.242 +c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
25.243 +wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
25.244 +prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
25.245 +this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
25.246 +return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
25.247 +""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
25.248 +this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
25.249 +u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
25.250 +1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
25.251 +return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
25.252 +""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
25.253 +c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
25.254 +c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
25.255 +function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
25.256 +Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
25.257 +"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
25.258 +a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
25.259 +a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
25.260 +"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
25.261 +serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
25.262 +function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
25.263 +global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
25.264 +e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
25.265 +"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
25.266 +false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
25.267 +false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
25.268 +c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
25.269 +d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
25.270 +g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
25.271 +1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
25.272 +"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
25.273 +if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
25.274 +this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
25.275 +"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
25.276 +animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
25.277 +j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
25.278 +this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
25.279 +"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
25.280 +c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
25.281 +this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
25.282 +this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
25.283 +e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
25.284 +c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
25.285 +function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
25.286 +this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
25.287 +k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
25.288 +f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
25.289 +a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
25.290 +c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
25.291 +d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
25.292 +f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
25.293 +"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
25.294 +e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
25.295 \ No newline at end of file
26.1 --- a/static/dataTables/media/unit_testing/performance/large.php Mon Aug 16 14:55:21 2010 +0200
26.2 +++ b/static/dataTables/media/unit_testing/performance/large.php Fri Aug 20 17:39:19 2010 +0200
26.3 @@ -24,23 +24,18 @@
26.4 <script type="text/javascript" charset="utf-8">
26.5 $(document).ready(function() {
26.6 var iStart = new Date().getTime();
26.7 +
26.8 if ( typeof console != 'undefined' ) {
26.9 console.profile();
26.10 }
26.11 - var oTable = $('#example').dataTable();
26.12 - //var oSettings = oTable.fnSettings();
26.13 + for ( var i=0 ; i<1 ; i++ )
26.14 + {
26.15 + var oTable = $('#example').dataTable({"bDestroy": true});
26.16 + }
26.17 if ( typeof console != 'undefined' ) {
26.18 console.profileEnd();
26.19 }
26.20
26.21 - //if ( typeof console != 'undefined' ) {
26.22 - // console.profile();
26.23 - //}
26.24 - //oTable.fnSort( [[1, 'asc']] );
26.25 - //if ( typeof console != 'undefined' ) {
26.26 - // console.profileEnd();
26.27 - //}
26.28 -
26.29 var iEnd = new Date().getTime();
26.30 document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+"mS";
26.31 } );
26.32 @@ -79,7 +74,7 @@
26.33 while ( $aRow = mysql_fetch_array( $rResult ) )
26.34 {
26.35 echo '<tr>';
26.36 - echo '<td>'.$aRow['id'].'</td>';
26.37 + echo '<td><a href="1">'.$aRow['id'].'</a></td>';
26.38 echo '<td>'.$aRow['name'].'</td>';
26.39 echo '<td>'.$aRow['phone'].'</td>';
26.40 echo '<td>'.$aRow['email'].'</td>';
26.41 @@ -89,6 +84,7 @@
26.42 echo '<td>'.$aRow['country'].'</td>';
26.43 echo '<td>'.$aRow['zip2'].'</td>';
26.44 echo '</tr>';
26.45 +
26.46 }
26.47 ?>
26.48 </tbody>
26.49 @@ -96,7 +92,6 @@
26.50 </div>
26.51 <div class="spacer"></div>
26.52
26.53 -
26.54 <div id="footer" style="text-align:center;">
26.55 <span style="font-size:10px;">
26.56 DataTables © Allan Jardine 2008-2009.
27.1 --- a/static/dataTables/media/unit_testing/performance/sort.html Mon Aug 16 14:55:21 2010 +0200
27.2 +++ b/static/dataTables/media/unit_testing/performance/sort.html Fri Aug 20 17:39:19 2010 +0200
27.3 @@ -17,12 +17,13 @@
27.4 var oSettings = oTable.fnSettings();
27.5 var iStart = new Date().getTime();
27.6
27.7 - //for ( var i=0, iLen=100 ; i<iLen ; i++ )
27.8 - //{
27.9 + for ( var i=0, iLen=100 ; i<iLen ; i++ )
27.10 + {
27.11 console.profile( );
27.12 oTable.fnSort( [[1, 'asc']] );
27.13 + oTable.fnSort( [[0, 'asc']] );
27.14 console.profileEnd( );
27.15 - //}
27.16 + }
27.17
27.18 var iEnd = new Date().getTime();
27.19 document.getElementById('output').innerHTML = "Test took "+(iEnd-iStart)+"mS";
28.1 --- a/static/dataTables/media/unit_testing/tests/1_dom/_zero_config.js Mon Aug 16 14:55:21 2010 +0200
28.2 +++ b/static/dataTables/media/unit_testing/tests/1_dom/_zero_config.js Fri Aug 20 17:39:19 2010 +0200
28.3 @@ -1,5 +1,5 @@
28.4 // DATA_TEMPLATE: dom_data
28.5 -oTest.fnStart( "Santiy checks for DataTables with DOM data" );
28.6 +oTest.fnStart( "Sanity checks for DataTables with DOM data" );
28.7
28.8 oTest.fnTest(
28.9 "jQuery.dataTable function",
29.1 --- a/static/dataTables/media/unit_testing/tests_onhold/1_dom/aoSearchCols.js Mon Aug 16 14:55:21 2010 +0200
29.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/1_dom/aoSearchCols.js Fri Aug 20 17:39:19 2010 +0200
29.3 @@ -13,11 +13,11 @@
29.4 null,
29.5 function () {
29.6 var bReturn =
29.7 - oSettings.aoPreSearchCols[0].sSearch == 0 && oSettings.aoPreSearchCols[0].bEscapeRegex &&
29.8 - oSettings.aoPreSearchCols[1].sSearch == 0 && oSettings.aoPreSearchCols[1].bEscapeRegex &&
29.9 - oSettings.aoPreSearchCols[2].sSearch == 0 && oSettings.aoPreSearchCols[2].bEscapeRegex &&
29.10 - oSettings.aoPreSearchCols[3].sSearch == 0 && oSettings.aoPreSearchCols[3].bEscapeRegex &&
29.11 - oSettings.aoPreSearchCols[4].sSearch == 0 && oSettings.aoPreSearchCols[4].bEscapeRegex;
29.12 + oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex &&
29.13 + oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex &&
29.14 + oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex &&
29.15 + oSettings.aoPreSearchCols[3].sSearch == 0 && !oSettings.aoPreSearchCols[3].bRegex &&
29.16 + oSettings.aoPreSearchCols[4].sSearch == 0 && !oSettings.aoPreSearchCols[4].bRegex;
29.17 return bReturn;
29.18 }
29.19 );
30.1 --- a/static/dataTables/media/unit_testing/tests_onhold/1_dom/oSearch.js Mon Aug 16 14:55:21 2010 +0200
30.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/1_dom/oSearch.js Fri Aug 20 17:39:19 2010 +0200
30.3 @@ -11,7 +11,7 @@
30.4 null,
30.5 function () {
30.6 var bReturn = oSettings.oPreviousSearch.sSearch == "" &&
30.7 - oSettings.oPreviousSearch.bEscapeRegex;
30.8 + !oSettings.oPreviousSearch.bRegex;
30.9 return bReturn;
30.10 }
30.11 );
30.12 @@ -47,7 +47,7 @@
30.13 $('#example').dataTable( {
30.14 "oSearch": {
30.15 "sSearch": "DS",
30.16 - "bEscapeRegex": true
30.17 + "bRegex": false
30.18 }
30.19 } );
30.20 },
30.21 @@ -61,7 +61,7 @@
30.22 $('#example').dataTable( {
30.23 "oSearch": {
30.24 "sSearch": "Opera",
30.25 - "bEscapeRegex": false
30.26 + "bRegex": true
30.27 }
30.28 } );
30.29 },
30.30 @@ -75,7 +75,7 @@
30.31 $('#example').dataTable( {
30.32 "oSearch": {
30.33 "sSearch": "1.*",
30.34 - "bEscapeRegex": true
30.35 + "bRegex": false
30.36 }
30.37 } );
30.38 },
30.39 @@ -89,7 +89,7 @@
30.40 $('#example').dataTable( {
30.41 "oSearch": {
30.42 "sSearch": "1.*",
30.43 - "bEscapeRegex": false
30.44 + "bRegex": true
30.45 }
30.46 } );
30.47 },
31.1 --- a/static/dataTables/media/unit_testing/tests_onhold/2_js/_zero_config.js Mon Aug 16 14:55:21 2010 +0200
31.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/2_js/_zero_config.js Fri Aug 20 17:39:19 2010 +0200
31.3 @@ -1,5 +1,5 @@
31.4 // DATA_TEMPLATE: js_data
31.5 -oTest.fnStart( "Santiy checks for DataTables with data from JS" );
31.6 +oTest.fnStart( "Sanity checks for DataTables with data from JS" );
31.7
31.8 oTest.fnTest(
31.9 "jQuery.dataTable function",
32.1 --- a/static/dataTables/media/unit_testing/tests_onhold/2_js/aoSearchCols.js Mon Aug 16 14:55:21 2010 +0200
32.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/2_js/aoSearchCols.js Fri Aug 20 17:39:19 2010 +0200
32.3 @@ -15,11 +15,11 @@
32.4 null,
32.5 function () {
32.6 var bReturn =
32.7 - oSettings.aoPreSearchCols[0].sSearch == 0 && oSettings.aoPreSearchCols[0].bEscapeRegex &&
32.8 - oSettings.aoPreSearchCols[1].sSearch == 0 && oSettings.aoPreSearchCols[1].bEscapeRegex &&
32.9 - oSettings.aoPreSearchCols[2].sSearch == 0 && oSettings.aoPreSearchCols[2].bEscapeRegex &&
32.10 - oSettings.aoPreSearchCols[3].sSearch == 0 && oSettings.aoPreSearchCols[3].bEscapeRegex &&
32.11 - oSettings.aoPreSearchCols[4].sSearch == 0 && oSettings.aoPreSearchCols[4].bEscapeRegex;
32.12 + oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex &&
32.13 + oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex &&
32.14 + oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex &&
32.15 + oSettings.aoPreSearchCols[3].sSearch == 0 && !oSettings.aoPreSearchCols[3].bRegex &&
32.16 + oSettings.aoPreSearchCols[4].sSearch == 0 && !oSettings.aoPreSearchCols[4].bRegex;
32.17 return bReturn;
32.18 }
32.19 );
33.1 --- a/static/dataTables/media/unit_testing/tests_onhold/2_js/oSearch.js Mon Aug 16 14:55:21 2010 +0200
33.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/2_js/oSearch.js Fri Aug 20 17:39:19 2010 +0200
33.3 @@ -13,7 +13,7 @@
33.4 null,
33.5 function () {
33.6 var bReturn = oSettings.oPreviousSearch.sSearch == "" &&
33.7 - oSettings.oPreviousSearch.bEscapeRegex;
33.8 + !oSettings.oPreviousSearch.bRegex;
33.9 return bReturn;
33.10 }
33.11 );
33.12 @@ -51,7 +51,7 @@
33.13 "aaData": gaaData,
33.14 "oSearch": {
33.15 "sSearch": "DS",
33.16 - "bEscapeRegex": true
33.17 + "bRegex": false
33.18 }
33.19 } );
33.20 },
33.21 @@ -66,7 +66,7 @@
33.22 "aaData": gaaData,
33.23 "oSearch": {
33.24 "sSearch": "Opera",
33.25 - "bEscapeRegex": false
33.26 + "bRegex": true
33.27 }
33.28 } );
33.29 },
33.30 @@ -81,7 +81,7 @@
33.31 "aaData": gaaData,
33.32 "oSearch": {
33.33 "sSearch": "1.*",
33.34 - "bEscapeRegex": true
33.35 + "bRegex": false
33.36 }
33.37 } );
33.38 },
33.39 @@ -96,7 +96,7 @@
33.40 "aaData": gaaData,
33.41 "oSearch": {
33.42 "sSearch": "1.*",
33.43 - "bEscapeRegex": false
33.44 + "bRegex": true
33.45 }
33.46 } );
33.47 },
34.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/_zero_config.js Mon Aug 16 14:55:21 2010 +0200
34.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/_zero_config.js Fri Aug 20 17:39:19 2010 +0200
34.3 @@ -1,5 +1,5 @@
34.4 // DATA_TEMPLATE: empty_table
34.5 -oTest.fnStart( "Santiy checks for DataTables with data from JS" );
34.6 +oTest.fnStart( "Sanity checks for DataTables with data from JS" );
34.7
34.8 oTest.fnTest(
34.9 "jQuery.dataTable function",
35.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/aoSearchCols.js Mon Aug 16 14:55:21 2010 +0200
35.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/aoSearchCols.js Fri Aug 20 17:39:19 2010 +0200
35.3 @@ -15,11 +15,11 @@
35.4 null,
35.5 function () {
35.6 var bReturn =
35.7 - oSettings.aoPreSearchCols[0].sSearch == 0 && oSettings.aoPreSearchCols[0].bEscapeRegex &&
35.8 - oSettings.aoPreSearchCols[1].sSearch == 0 && oSettings.aoPreSearchCols[1].bEscapeRegex &&
35.9 - oSettings.aoPreSearchCols[2].sSearch == 0 && oSettings.aoPreSearchCols[2].bEscapeRegex &&
35.10 - oSettings.aoPreSearchCols[3].sSearch == 0 && oSettings.aoPreSearchCols[3].bEscapeRegex &&
35.11 - oSettings.aoPreSearchCols[4].sSearch == 0 && oSettings.aoPreSearchCols[4].bEscapeRegex;
35.12 + oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex &&
35.13 + oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex &&
35.14 + oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex &&
35.15 + oSettings.aoPreSearchCols[3].sSearch == 0 && !oSettings.aoPreSearchCols[3].bRegex &&
35.16 + oSettings.aoPreSearchCols[4].sSearch == 0 && !oSettings.aoPreSearchCols[4].bRegex;
35.17 return bReturn;
35.18 }
35.19 );
36.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js Mon Aug 16 14:55:21 2010 +0200
36.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/fnDrawCallback.js Fri Aug 20 17:39:19 2010 +0200
36.3 @@ -9,7 +9,7 @@
36.4 "sAjaxSource": "../../../examples/examples_support/json_source.txt"
36.5 } );
36.6 var oSettings = oTable.fnSettings();
36.7 - var mPass;
36.8 + var mPass, bInit;
36.9
36.10 oTest.fnWaitTest(
36.11 "Default should be null",
36.12 @@ -24,14 +24,18 @@
36.13 oSession.fnRestore();
36.14
36.15 mPass = -1;
36.16 + bInit = false;
36.17 $('#example').dataTable( {
36.18 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
36.19 "fnDrawCallback": function ( ) {
36.20 mPass = arguments.length;
36.21 + },
36.22 + "fnInitComplete": function () {
36.23 + bInit = true;
36.24 }
36.25 } );
36.26 },
36.27 - function () { return mPass == 1; }
36.28 + function () { return mPass == 1 && bInit; }
36.29 );
36.30
36.31
36.32 @@ -40,31 +44,40 @@
36.33 function () {
36.34 oSession.fnRestore();
36.35
36.36 + bInit = false;
36.37 oTable = $('#example').dataTable( {
36.38 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
36.39 "fnDrawCallback": function ( oSettings ) {
36.40 mPass = oSettings;
36.41 + },
36.42 + "fnInitComplete": function () {
36.43 + bInit = true;
36.44 }
36.45 } );
36.46 },
36.47 - function () { return oTable.fnSettings() == mPass; }
36.48 + function () { return oTable.fnSettings() == mPass && bInit; }
36.49 );
36.50
36.51
36.52 + /* The draw callback is called once for the init and then when the data is added */
36.53 oTest.fnWaitTest(
36.54 "fnRowCallback called once on first draw",
36.55 function () {
36.56 oSession.fnRestore();
36.57
36.58 mPass = 0;
36.59 + bInit = false;
36.60 $('#example').dataTable( {
36.61 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
36.62 "fnDrawCallback": function ( ) {
36.63 mPass++;
36.64 + },
36.65 + "fnInitComplete": function () {
36.66 + bInit = true;
36.67 }
36.68 } );
36.69 },
36.70 - function () { return mPass == 1; }
36.71 + function () { return mPass == 2 && bInit; }
36.72 );
36.73
36.74 oTest.fnWaitTest(
36.75 @@ -74,7 +87,7 @@
36.76 $('#example_next').click();
36.77 $('#example_next').click();
36.78 },
36.79 - function () { return mPass == 4; }
36.80 + function () { return mPass == 5; }
36.81 );
36.82
36.83
37.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js Mon Aug 16 14:55:21 2010 +0200
37.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/fnHeaderCallback.js Fri Aug 20 17:39:19 2010 +0200
37.3 @@ -7,7 +7,7 @@
37.4 "sAjaxSource": "../../../examples/examples_support/json_source.txt"
37.5 } );
37.6 var oSettings = oTable.fnSettings();
37.7 - var mPass;
37.8 + var mPass, bInit;
37.9
37.10 oTest.fnWaitTest(
37.11 "Default should be null",
37.12 @@ -22,37 +22,46 @@
37.13 oSession.fnRestore();
37.14
37.15 mPass = -1;
37.16 + bInit = false;
37.17 $('#example').dataTable( {
37.18 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
37.19 "fnHeaderCallback": function ( ) {
37.20 mPass = arguments.length;
37.21 + },
37.22 + "fnInitComplete": function () {
37.23 + bInit = true;
37.24 }
37.25 } );
37.26 },
37.27 - function () { return mPass == 5; }
37.28 + function () { return mPass == 5 && bInit; }
37.29 );
37.30
37.31
37.32 + /* The header callback is called once for the init and then when the data is added */
37.33 oTest.fnWaitTest(
37.34 - "fnRowCallback called once per draw",
37.35 + "fnHeaderCallback called once per draw",
37.36 function () {
37.37 oSession.fnRestore();
37.38
37.39 mPass = 0;
37.40 + bInit = false;
37.41 $('#example').dataTable( {
37.42 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
37.43 "fnHeaderCallback": function ( nHead, aasData, iStart, iEnd, aiDisplay ) {
37.44 mPass++;
37.45 + },
37.46 + "fnInitComplete": function () {
37.47 + bInit = true;
37.48 }
37.49 } );
37.50 },
37.51 - function () { return mPass == 1; }
37.52 + function () { return mPass == 2 && bInit; }
37.53 );
37.54
37.55 oTest.fnWaitTest(
37.56 "fnRowCallback called on paging (i.e. another draw)",
37.57 function () { $('#example_next').click(); },
37.58 - function () { return mPass == 2; }
37.59 + function () { return mPass == 3; }
37.60 );
37.61
37.62
38.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js Mon Aug 16 14:55:21 2010 +0200
38.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/oLanguage.sZeroRecords.js Fri Aug 20 17:39:19 2010 +0200
38.3 @@ -14,7 +14,7 @@
38.4 function () { return oSettings.oLanguage.sZeroRecords == "No matching records found"; }
38.5 );
38.6
38.7 - oTest.fnTest(
38.8 + oTest.fnWaitTest(
38.9 "Text is shown when empty table (after filtering)",
38.10 function () { oTable.fnFilter('nothinghere'); },
38.11 function () { return $('#example tbody tr td')[0].innerHTML == "No matching records found" }
38.12 @@ -37,7 +37,7 @@
38.13 function () { return oSettings.oLanguage.sZeroRecords == "unit test"; }
38.14 );
38.15
38.16 - oTest.fnTest(
38.17 + oTest.fnWaitTest(
38.18 "Text is shown when empty table (after filtering)",
38.19 function () { oTable.fnFilter('nothinghere2'); },
38.20 function () { return $('#example tbody tr td')[0].innerHTML == "unit test" }
39.1 --- a/static/dataTables/media/unit_testing/tests_onhold/3_ajax/oSearch.js Mon Aug 16 14:55:21 2010 +0200
39.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/3_ajax/oSearch.js Fri Aug 20 17:39:19 2010 +0200
39.3 @@ -13,7 +13,7 @@
39.4 null,
39.5 function () {
39.6 var bReturn = oSettings.oPreviousSearch.sSearch == "" &&
39.7 - oSettings.oPreviousSearch.bEscapeRegex;
39.8 + !oSettings.oPreviousSearch.bRegex;
39.9 return bReturn;
39.10 }
39.11 );
39.12 @@ -51,7 +51,7 @@
39.13 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
39.14 "oSearch": {
39.15 "sSearch": "DS",
39.16 - "bEscapeRegex": true
39.17 + "bRegex": false
39.18 }
39.19 } );
39.20 },
39.21 @@ -66,7 +66,7 @@
39.22 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
39.23 "oSearch": {
39.24 "sSearch": "Opera",
39.25 - "bEscapeRegex": false
39.26 + "bRegex": true
39.27 }
39.28 } );
39.29 },
39.30 @@ -81,7 +81,7 @@
39.31 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
39.32 "oSearch": {
39.33 "sSearch": "1.*",
39.34 - "bEscapeRegex": true
39.35 + "bRegex": false
39.36 }
39.37 } );
39.38 },
39.39 @@ -96,7 +96,7 @@
39.40 "sAjaxSource": "../../../examples/examples_support/json_source.txt",
39.41 "oSearch": {
39.42 "sSearch": "1.*",
39.43 - "bEscapeRegex": false
39.44 + "bRegex": true
39.45 }
39.46 } );
39.47 },
40.1 --- a/static/dataTables/media/unit_testing/tests_onhold/4_server-side/_zero_config.js Mon Aug 16 14:55:21 2010 +0200
40.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/4_server-side/_zero_config.js Fri Aug 20 17:39:19 2010 +0200
40.3 @@ -5,7 +5,7 @@
40.4 * difference in how the server-side processing does it's filtering. Also the
40.5 * sorting state is always reset on each draw.
40.6 */
40.7 -oTest.fnStart( "Santiy checks for DataTables with data from JS" );
40.8 +oTest.fnStart( "Sanity checks for DataTables with data from JS" );
40.9
40.10 oTest.fnWaitTest(
40.11 "jQuery.dataTable function",
41.1 --- a/static/dataTables/media/unit_testing/tests_onhold/4_server-side/aoSearchCols.js Mon Aug 16 14:55:21 2010 +0200
41.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/4_server-side/aoSearchCols.js Fri Aug 20 17:39:19 2010 +0200
41.3 @@ -16,11 +16,11 @@
41.4 null,
41.5 function () {
41.6 var bReturn =
41.7 - oSettings.aoPreSearchCols[0].sSearch == 0 && oSettings.aoPreSearchCols[0].bEscapeRegex &&
41.8 - oSettings.aoPreSearchCols[1].sSearch == 0 && oSettings.aoPreSearchCols[1].bEscapeRegex &&
41.9 - oSettings.aoPreSearchCols[2].sSearch == 0 && oSettings.aoPreSearchCols[2].bEscapeRegex &&
41.10 - oSettings.aoPreSearchCols[3].sSearch == 0 && oSettings.aoPreSearchCols[3].bEscapeRegex &&
41.11 - oSettings.aoPreSearchCols[4].sSearch == 0 && oSettings.aoPreSearchCols[4].bEscapeRegex;
41.12 + oSettings.aoPreSearchCols[0].sSearch == 0 && !oSettings.aoPreSearchCols[0].bRegex &&
41.13 + oSettings.aoPreSearchCols[1].sSearch == 0 && !oSettings.aoPreSearchCols[1].bRegex &&
41.14 + oSettings.aoPreSearchCols[2].sSearch == 0 && !oSettings.aoPreSearchCols[2].bRegex &&
41.15 + oSettings.aoPreSearchCols[3].sSearch == 0 && !oSettings.aoPreSearchCols[3].bRegex &&
41.16 + oSettings.aoPreSearchCols[4].sSearch == 0 && !oSettings.aoPreSearchCols[4].bRegex;
41.17 return bReturn;
41.18 }
41.19 );
42.1 --- a/static/dataTables/media/unit_testing/tests_onhold/4_server-side/oSearch.js Mon Aug 16 14:55:21 2010 +0200
42.2 +++ b/static/dataTables/media/unit_testing/tests_onhold/4_server-side/oSearch.js Fri Aug 20 17:39:19 2010 +0200
42.3 @@ -16,7 +16,7 @@
42.4 null,
42.5 function () {
42.6 var bReturn = oSettings.oPreviousSearch.sSearch == "" &&
42.7 - oSettings.oPreviousSearch.bEscapeRegex;
42.8 + !oSettings.oPreviousSearch.bRegex;
42.9 return bReturn;
42.10 }
42.11 );
42.12 @@ -53,10 +53,10 @@
42.13 oSession.fnRestore();
42.14 $('#example').dataTable( {
42.15 "bServerSide": true,
42.16 - "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.17 + "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.18 "oSearch": {
42.19 "sSearch": "DS",
42.20 - "bEscapeRegex": true
42.21 + "bRegex": false
42.22 }
42.23 } );
42.24 },
42.25 @@ -69,10 +69,10 @@
42.26 oSession.fnRestore();
42.27 $('#example').dataTable( {
42.28 "bServerSide": true,
42.29 - "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.30 + "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.31 "oSearch": {
42.32 "sSearch": "Opera",
42.33 - "bEscapeRegex": false
42.34 + "bRegex": true
42.35 }
42.36 } );
42.37 },
42.38 @@ -85,10 +85,10 @@
42.39 oSession.fnRestore();
42.40 $('#example').dataTable( {
42.41 "bServerSide": true,
42.42 - "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.43 + "sAjaxSource": "../../../examples/examples_support/server_processing.php",
42.44 "oSearch": {
42.45 "sSearch": "1.*",
42.46 - "bEscapeRegex": true
42.47 + "bRegex": false
42.48 }
42.49 } );
42.50 },
43.1 --- a/static/dataTables/media/unit_testing/unit_test.js Mon Aug 16 14:55:21 2010 +0200
43.2 +++ b/static/dataTables/media/unit_testing/unit_test.js Fri Aug 20 17:39:19 2010 +0200
43.3 @@ -370,6 +370,11 @@
43.4
43.5 fnRestore: function ()
43.6 {
43.7 + while( $.fn.dataTableSettings.length > 0 )
43.8 + {
43.9 + $.fn.dataTableSettings[0].oInstance.fnDestroy();
43.10 + }
43.11 + //$.fn.dataTableSettings.splice( 0, $.fn.dataTableSettings.length );
43.12 var nDemo = document.getElementById('demo');
43.13 nDemo.innerHTML = "";
43.14 for ( var i=0, iLen=this.nTable.childNodes.length ; i<iLen ; i++ )