DataTable.models.ext.html 40.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=utf-8">
		<title>Namespace: ext - documentation</title>
  
		<style type="text/css" media="screen">
			@import "media/css/doc.css";
			@import "media/css/shCore.css";
			@import "media/css/shThemeDataTables.css";
		</style>
	
		<script type="text/javascript" src="media/js/shCore.js"></script>
		<script type="text/javascript" src="media/js/shBrushJScript.js"></script>
		<script type="text/javascript" src="media/js/jquery.js"></script>
		<script type="text/javascript" src="media/js/doc.js"></script>
	</head>
	<body>
		<div class="fw_container">
			
				<a name="top"></a>
				<div class="fw_header">
					<h1 class="page-title">Namespace: ext</h1>
					<h2 class="ancestors">Ancestry: <span class="ancestors"><a href="DataTable.html">DataTable</a> » <a href="DataTable.models.html">.models</a>.</span> » ext</h2>
					<div class="page-info">
						DataTables v1.9.4 documentation
					</div>
				</div>

				

				<div class="fw_nav">
					<h2>Navigation</h2>
					<ul>
					<li><a href="#top">Overview</a></li>
					<li><a href="#summary">Summary</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Classes (0)</td><td>Namespaces (0)</td></tr><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (14)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li><li><a href="#details">Details</a><div><table cellpadding="5" border="0" cellspacing="0" width="100%"><tbody><tr><td>Properties (0)</td><td><a href="#summary_properties_static">Static properties (14)</a></td></tr><tr><td>Methods (0)</td><td>Static methods (0)</td></tr><tr><td>Events (0)</td><td></td></tr></tbody></table></div></li></ul>
					<div style="margin-top: 10px;">
						<input type="hidden" name="show_private" value="0">
						<span id="private_label">Hiding</span> private elements 
							(<a id="private_toggle" href="">toggle</a>)
						</span>
					</div>
					<div>
						<input type="hidden" name="show_extended" value="1">
						<span id="extended_label">Showing</span> extended elements 
							(<a id="extended_toggle" href="">toggle</a>)
						</span>
					</div>
				</div>

				<div class="fw_content">
					<a name="overview"></a>
					<div class="doc_overview">
						<div class="nav_blocker"></div>
						<p>DataTables extension options and plug-ins. This namespace acts as a collection "area"
for plug-ins that can be used to extend the default DataTables behaviour - indeed many
of the build in methods use this method to provide their own capabilities (sorting methods
for example).</p>

<p>Note that this namespace is aliased to jQuery.fn.dataTableExt so it can be readily accessed
and modified by plug-ins.</p><dl class="details">
	
</dl>

					</div>

					
					<div class="doc_summary">
						<a name="summary"></a>
						<h2>Summary</h2>

						<div class="doc_group"><a name="summary_properties_static"></a><h3 class="subsection-title">Properties - static</h3>

<dl>
    <dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#afnFiltering">afnFiltering</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  even"><p>Plug-in filtering functions - this method of filtering is complimentary to the default
type based filtering, and a lot more comprehensive as it allows you complete control
over the filtering logic. Each element in this array is a function (parameters
described below) that is called for every row in the table, and your logic decides if
it should be included in the filtered data set or not.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
        <li>{array|object} Data for the row to be processed (same as the original format
          that was passed in as the data source, or an array from a DOM data source</li>
        <li>{int} Row index in aoData (<a href="DataTable.models.oSettings.html#aoData">DataTable.models.oSettings.aoData</a>), which can
          be useful to retrieve the TR element if you need DOM interaction.</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{boolean} Include the row in the filtered result set (true) or not (false)</li>
      </ul>
    </il>
  </ul></p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#afnSortData">afnSortData</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  odd"><p>Plug-in sorting functions - this method of sorting is complimentary to the default type
based sorting that DataTables does automatically, allowing much greater control over the
the data that is being used to sort a column. This is useful if you want to do sorting
based on live data (for example the contents of an 'input' element) rather than just the
static string that DataTables knows of. The way these plug-ins work is that you create
an array of the values you wish to be sorted for the column in question and then return
that array. Which pre-sorting function is run here depends on the sSortDataType parameter
that is used for the column (if any). This is the corollary of <i>ofnSearch</i> for sort 
data.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
        <li>{int} Target column index</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{array} Data for the column to be sorted upon</li>
      </ul>
    </il>
  </ul> [<a href-"#afnSortData">...</a>] </p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoFeatures">aoFeatures</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  even"><p>Feature plug-ins - This is an array of objects which describe the feature plug-ins that are
available to DataTables. These feature plug-ins are accessible through the sDom initialisation
option. As such, each feature plug-in must describe a function that is used to initialise
itself (fnInit), a character so the feature can be enabled by sDom (cFeature) and the name
of the feature (sFeature). Thus the objects attached to this method must provide:
  <ul>
    <li>{function} fnInit Initialisation of the plug-in
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>{node|null} The element which contains your feature. Note that the return
               may also be void if your plug-in does not require to inject any DOM elements 
               into DataTables control (sDom) - for example this might be useful when 
               developing a plug-in which allows table control via keyboard entry.</li>
          </ul>
        </il>
      </ul>
    </li>
    <li>{character} cFeature Character that will be matched in sDom - case sensitive</li>
    <li>{string} sFeature Feature name</li>
  </ul></p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aTypes">aTypes</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  odd"><p>Type detection plug-in functions - DataTables utilises types to define how sorting and
filtering behave, and types can be either  be defined by the developer (sType for the
column) or they can be automatically detected by the methods in this array. The functions
defined in the array are quite simple, taking a single parameter (the data to analyse) 
and returning the type if it is a known type, or null otherwise.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{*} Data from the column cell to be analysed</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{string|null} Data type detected, or null if unknown (and thus pass it
          on to the other type detection functions.</li>
      </ul>
    </il>
  </ul></p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#fnVersionCheck">fnVersionCheck</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></dt><dd class="  even"><p>Provide a common method for plug-ins to check the version of DataTables being used, 
in order to ensure compatibility.</p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iApiIndex">iApiIndex</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class="  odd"><p>Index for what 'this' index API functions should use</p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oApi">oApi</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Container for all private functions in DataTables so they can be exposed externally</p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#ofnSearch">ofnSearch</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Pre-processing of filtering data plug-ins - When you assign the sType for a column
(or have it automatically detected for you by DataTables or a type detection plug-in), 
you will typically be using this for custom sorting, but it can also be used to provide 
custom filtering by allowing you to pre-processing the data and returning the data in
the format that should be filtered upon. This is done by adding functions this object 
with a parameter name which matches the sType for that target column. This is the
corollary of <i>afnSortData</i> for filtering data.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{*} Data from the column cell to be prepared for filtering</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{string|null} Formatted string that will be used for the filtering.</li>
      </ul>
    </il>
  </ul> [<a href-"#ofnSearch">...</a>] </p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oJUIClasses">oJUIClasses</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Storage for the various classes that DataTables uses - jQuery UI suitable</p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oPagination">oPagination</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Pagination plug-in methods - The style and controls of the pagination can significantly 
impact on how the end user interacts with the data in your table, and DataTables allows 
the addition of pagination controls by extending this object, which can then be enabled
through the <i>sPaginationType</i> initialisation parameter. Each pagination type that
is added is an object (the property name of which is what <i>sPaginationType</i> refers
to) that has two properties, both methods that are used by DataTables to update the
control's state.
  <ul>
    <li>
      fnInit -  Initialisation of the paging controls. Called only during initialisation 
        of the table. It is expected that this function will add the required DOM elements 
        to the page for the paging controls to work. The element pointer 
        'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging 
        controls (note that this is a 2D array to allow for multiple instances of each 
        DataTables DOM element). It is suggested that you add the controls to this element 
        as children
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
            <li>{node} Container into which the pagination controls must be inserted</li>
            <li>{function} Draw callback function - whenever the controls cause a page
              change, this method must be called to redraw the table.</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>No return required</li>
          </ul>
        </il>
      </ul>
    </il>
    <li>
      fnInit -  This function is called whenever the paging status of the table changes and is
        typically used to update classes and/or text of the paging controls to reflex the new 
        status.
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
            <li>{function} Draw callback function - in case you need to redraw the table again
              or attach new event listeners</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>No return required</li>
          </ul>
        </il>
      </ul>
    </il>
  </ul></p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oSort">oSort</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Sorting plug-in methods - Sorting in DataTables is based on the detected type of the
data column (you can add your own type detection functions, or override automatic 
detection using sType). With this specific type given to the column, DataTables will 
apply the required sort from the functions in the object. Each sort type must provide
two mandatory methods, one each for ascending and descending sorting, and can optionally
provide a pre-formatting method that will help speed up sorting by allowing DataTables
to pre-format the sort data only once (rather than every time the actual sort functions
are run). The two sorting functions are typical Javascript sort methods:
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{<em>} Data to compare to the second parameter</li>
        <li>{</em>} Data to compare to the first parameter</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{int} Sorting match: &lt;0 if first parameter should be sorted lower than
          the second parameter, ===0 if the two parameters are equal and >0 if
          the first parameter should be sorted height than the second parameter.</li>
      </ul>
    </il>
  </ul></p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oStdClasses">oStdClasses</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Storage for the various classes that DataTables uses</p></dd><dt class="  even"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sErrMode">sErrMode</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class="  even"><p>How should DataTables report an error. Can take the value 'alert' or 'throw'</p></dd><dt class="  odd"><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sVersion">sVersion</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class="  odd"><p>Version string for plug-ins to check compatibility. Allowed format is
a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and
e are optional</p></dd>
</dl></div>
					</div>
					


					
					<div class="doc_details">
						<a name="details"></a>
						<h2>Details</h2>
						<div class="doc_group"><a name="details_properties"></a><h3 class="subsection-title">Properties - static</h3>
<dl>
    <dt class="  even"><a name="afnFiltering"></a><a name="afnFiltering_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#afnFiltering">afnFiltering</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  even"><p>Plug-in filtering functions - this method of filtering is complimentary to the default
type based filtering, and a lot more comprehensive as it allows you complete control
over the filtering logic. Each element in this array is a function (parameters
described below) that is called for every row in the table, and your logic decides if
it should be included in the filtered data set or not.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
        <li>{array|object} Data for the row to be processed (same as the original format
          that was passed in as the data source, or an array from a DOM data source</li>
        <li>{int} Row index in aoData (<a href="DataTable.models.oSettings.html#aoData">DataTable.models.oSettings.aoData</a>), which can
          be useful to retrieve the TR element if you need DOM interaction.</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{boolean} Include the row in the filtered result set (true) or not (false)</li>
      </ul>
    </il>
  </ul></p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   // The following example shows custom filtering being applied to the fourth column (i.e.
   // the aData[3] index) based on two input values from the end-user, matching the data in 
   // a certain range.
   $.fn.dataTableExt.afnFiltering.push(
     function( oSettings, aData, iDataIndex ) {
       var iMin = document.getElementById('min').value * 1;
       var iMax = document.getElementById('max').value * 1;
       var iVersion = aData[3] == "-" ? 0 : aData[3]*1;
       if ( iMin == "" && iMax == "" ) {
         return true;
       }
       else if ( iMin == "" && iVersion < iMax ) {
         return true;
       }
       else if ( iMin < iVersion && "" == iMax ) {
         return true;
       }
       else if ( iMin < iVersion && iVersion < iMax ) {
         return true;
       }
       return false;
     }
   );</pre>
    </div>
</div></dd><dt class="  odd"><a name="afnSortData"></a><a name="afnSortData_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#afnSortData">afnSortData</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  odd"><p>Plug-in sorting functions - this method of sorting is complimentary to the default type
based sorting that DataTables does automatically, allowing much greater control over the
the data that is being used to sort a column. This is useful if you want to do sorting
based on live data (for example the contents of an 'input' element) rather than just the
static string that DataTables knows of. The way these plug-ins work is that you create
an array of the values you wish to be sorted for the column in question and then return
that array. Which pre-sorting function is run here depends on the sSortDataType parameter
that is used for the column (if any). This is the corollary of <i>ofnSearch</i> for sort 
data.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
        <li>{int} Target column index</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{array} Data for the column to be sorted upon</li>
      </ul>
    </il>
  </ul></p>

<p>Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
the different uses that DataTables can put the data to. Specifically <i>mData</i> when
used as a function will give you a 'type' (sorting, filtering etc) that you can use to 
prepare the data as required for the different types. As such, this method is deprecated.</p><div class="collapse_details"><dl class="details">
	<dt class="important">Deprecated</dt><dd class="yes-def">Yes</dd>
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   // Updating the cached sorting information with user entered values in HTML input elements
   jQuery.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
   {
     var aData = [];
     $( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
       aData.push( this.value );
     } );
     return aData;
   }</pre>
    </div>
</div></dd><dt class="  even"><a name="aoFeatures"></a><a name="aoFeatures_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aoFeatures">aoFeatures</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  even"><p>Feature plug-ins - This is an array of objects which describe the feature plug-ins that are
available to DataTables. These feature plug-ins are accessible through the sDom initialisation
option. As such, each feature plug-in must describe a function that is used to initialise
itself (fnInit), a character so the feature can be enabled by sDom (cFeature) and the name
of the feature (sFeature). Thus the objects attached to this method must provide:
  <ul>
    <li>{function} fnInit Initialisation of the plug-in
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>{node|null} The element which contains your feature. Note that the return
               may also be void if your plug-in does not require to inject any DOM elements 
               into DataTables control (sDom) - for example this might be useful when 
               developing a plug-in which allows table control via keyboard entry.</li>
          </ul>
        </il>
      </ul>
    </li>
    <li>{character} cFeature Character that will be matched in sDom - case sensitive</li>
    <li>{string} sFeature Feature name</li>
  </ul></p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   // How TableTools initialises itself.
   $.fn.dataTableExt.aoFeatures.push( {
     "fnInit": function( oSettings ) {
       return new TableTools( { "oDTSettings": oSettings } );
     },
     "cFeature": "T",
     "sFeature": "TableTools"
   } );</pre>
    </div>
</div></dd><dt class="  odd"><a name="aTypes"></a><a name="aTypes_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#aTypes">aTypes</a></span><span class="type-sig"><span class="type-signature"> :array</span></span></dt><dd class="  odd"><p>Type detection plug-in functions - DataTables utilises types to define how sorting and
filtering behave, and types can be either  be defined by the developer (sType for the
column) or they can be automatically detected by the methods in this array. The functions
defined in the array are quite simple, taking a single parameter (the data to analyse) 
and returning the type if it is a known type, or null otherwise.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{*} Data from the column cell to be analysed</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{string|null} Data type detected, or null if unknown (and thus pass it
          on to the other type detection functions.</li>
      </ul>
    </il>
  </ul></p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   // Currency type detection plug-in:
   jQuery.fn.dataTableExt.aTypes.push(
     function ( sData ) {
       var sValidChars = "0123456789.-";
       var Char;
       
       // Check the numeric part
       for ( i=1 ; i<sData.length ; i++ ) {
         Char = sData.charAt(i); 
         if (sValidChars.indexOf(Char) == -1) {
           return null;
         }
       }
       
       // Check prefixed by currency
       if ( sData.charAt(0) == '$' || sData.charAt(0) == '&pound;' ) {
         return 'currency';
       }
       return null;
     }
   );</pre>
    </div>
</div></dd><dt id="DataTable.models.ext.fnVersionCheck" class="  even"><a name="fnVersionCheck"></a><a name="fnVersionCheck_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a>fnVersionCheck</a></span><span class="type-sig"><span class="type-signature"> :function</span></span></span></dt><dd class="  even"><p>Provide a common method for plug-ins to check the version of DataTables being used, 
in order to ensure compatibility.</p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Parameters:</h5>

<table class="params">
    <thead>
	<tr>
        <th width="20"></th>
        <th width="12%" class="bottom_border name">Name</th>
		<th width="10%" class="bottom_border">Type</th>
		<th width="10%" class="bottom_border">Attributes</th>
		<th width="10%" class="bottom_border">Default</th>
		<th class="last bottom_border">Description</th>
	</tr>
	</thead>
	
	<tbody>
	<tr class="even"><td class="number right_border"><div>1</div></td><td class="name">sVersion</td><td class="type type-param">string</td><td class="attributes"></td><td class="default"></td><td class="description last"><p>Version string to check for, in the format "X.Y.Z". Note 
   that the formats "X" and "X.Y" are also acceptable.</p></td></tr>
	</tbody>
</table><h5>Returns:</h5><p class="returns"><p>true if this version of DataTables is greater or equal to the 
   required version, or false if this version of DataTales is not suitable</p></p><h5>Example:</h5>
    <div class="example-code">
    	<pre class="brush: js">   $(document).ready(function() {
     var oTable = $('#example').dataTable();
     alert( oTable.fnVersionCheck( '1.9.0' ) );
   } );</pre>
    </div>
</div>
<dt class="  odd"><a name="iApiIndex"></a><a name="iApiIndex_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#iApiIndex">iApiIndex</a></span><span class="type-sig"><span class="type-signature"> :int</span></span></dt><dd class="  odd"><p>Index for what 'this' index API functions should use</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd><dt class="  even"><a name="oApi"></a><a name="oApi_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oApi">oApi</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Container for all private functions in DataTables so they can be exposed externally</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd><dt class="  odd"><a name="ofnSearch"></a><a name="ofnSearch_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#ofnSearch">ofnSearch</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Pre-processing of filtering data plug-ins - When you assign the sType for a column
(or have it automatically detected for you by DataTables or a type detection plug-in), 
you will typically be using this for custom sorting, but it can also be used to provide 
custom filtering by allowing you to pre-processing the data and returning the data in
the format that should be filtered upon. This is done by adding functions this object 
with a parameter name which matches the sType for that target column. This is the
corollary of <i>afnSortData</i> for filtering data.
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{*} Data from the column cell to be prepared for filtering</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{string|null} Formatted string that will be used for the filtering.</li>
      </ul>
    </il>
  </ul></p>

<p>Note that as of v1.9, it is typically preferable to use <i>mData</i> to prepare data for
the different uses that DataTables can put the data to. Specifically <i>mData</i> when
used as a function will give you a 'type' (sorting, filtering etc) that you can use to 
prepare the data as required for the different types. As such, this method is deprecated.</p><div class="collapse_details"><dl class="details">
	<dt class="important">Deprecated</dt><dd class="yes-def">Yes</dd>
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   $.fn.dataTableExt.ofnSearch['title-numeric'] = function ( sData ) {
     return sData.replace(/\n/g," ").replace( /<.*?>/g, "" );
   }</pre>
    </div>
</div></dd><dt class="  even"><a name="oJUIClasses"></a><a name="oJUIClasses_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oJUIClasses">oJUIClasses</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Storage for the various classes that DataTables uses - jQuery UI suitable</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd><dt class="  odd"><a name="oPagination"></a><a name="oPagination_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oPagination">oPagination</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Pagination plug-in methods - The style and controls of the pagination can significantly 
impact on how the end user interacts with the data in your table, and DataTables allows 
the addition of pagination controls by extending this object, which can then be enabled
through the <i>sPaginationType</i> initialisation parameter. Each pagination type that
is added is an object (the property name of which is what <i>sPaginationType</i> refers
to) that has two properties, both methods that are used by DataTables to update the
control's state.
  <ul>
    <li>
      fnInit -  Initialisation of the paging controls. Called only during initialisation 
        of the table. It is expected that this function will add the required DOM elements 
        to the page for the paging controls to work. The element pointer 
        'oSettings.aanFeatures.p' array is provided by DataTables to contain the paging 
        controls (note that this is a 2D array to allow for multiple instances of each 
        DataTables DOM element). It is suggested that you add the controls to this element 
        as children
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
            <li>{node} Container into which the pagination controls must be inserted</li>
            <li>{function} Draw callback function - whenever the controls cause a page
              change, this method must be called to redraw the table.</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>No return required</li>
          </ul>
        </il>
      </ul>
    </il>
    <li>
      fnInit -  This function is called whenever the paging status of the table changes and is
        typically used to update classes and/or text of the paging controls to reflex the new 
        status.
      <ul>
        <li>
          Function input parameters:
          <ul>
            <li>{object} DataTables settings object: see <a href="DataTable.models.oSettings.html">DataTable.models.oSettings</a>.</li>
            <li>{function} Draw callback function - in case you need to redraw the table again
              or attach new event listeners</li>
          </ul>
        </li>
        <li>
          Function return:
          <ul>
            <li>No return required</li>
          </ul>
        </il>
      </ul>
    </il>
  </ul></p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Example</h5>
    <div class="example-code">
    	<pre class="brush: js">   $.fn.dataTableExt.oPagination.four_button = {
     "fnInit": function ( oSettings, nPaging, fnCallbackDraw ) {
       nFirst = document.createElement( 'span' );
       nPrevious = document.createElement( 'span' );
       nNext = document.createElement( 'span' );
       nLast = document.createElement( 'span' );
       
       nFirst.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sFirst ) );
       nPrevious.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sPrevious ) );
       nNext.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sNext ) );
       nLast.appendChild( document.createTextNode( oSettings.oLanguage.oPaginate.sLast ) );
       
       nFirst.className = "paginate_button first";
       nPrevious.className = "paginate_button previous";
       nNext.className="paginate_button next";
       nLast.className = "paginate_button last";
       
       nPaging.appendChild( nFirst );
       nPaging.appendChild( nPrevious );
       nPaging.appendChild( nNext );
       nPaging.appendChild( nLast );
       
       $(nFirst).click( function () {
         oSettings.oApi._fnPageChange( oSettings, "first" );
         fnCallbackDraw( oSettings );
       } );
       
       $(nPrevious).click( function() {
         oSettings.oApi._fnPageChange( oSettings, "previous" );
         fnCallbackDraw( oSettings );
       } );
       
       $(nNext).click( function() {
         oSettings.oApi._fnPageChange( oSettings, "next" );
         fnCallbackDraw( oSettings );
       } );
       
       $(nLast).click( function() {
         oSettings.oApi._fnPageChange( oSettings, "last" );
         fnCallbackDraw( oSettings );
       } );
       
       $(nFirst).bind( 'selectstart', function () { return false; } );
       $(nPrevious).bind( 'selectstart', function () { return false; } );
       $(nNext).bind( 'selectstart', function () { return false; } );
       $(nLast).bind( 'selectstart', function () { return false; } );
     },
     
     "fnUpdate": function ( oSettings, fnCallbackDraw ) {
       if ( !oSettings.aanFeatures.p ) {
         return;
       }
       
       // Loop over each instance of the pager
       var an = oSettings.aanFeatures.p;
       for ( var i=0, iLen=an.length ; i<iLen ; i++ ) {
         var buttons = an[i].getElementsByTagName('span');
         if ( oSettings._iDisplayStart === 0 ) {
           buttons[0].className = "paginate_disabled_previous";
           buttons[1].className = "paginate_disabled_previous";
         }
         else {
           buttons[0].className = "paginate_enabled_previous";
           buttons[1].className = "paginate_enabled_previous";
         }
         
         if ( oSettings.fnDisplayEnd() == oSettings.fnRecordsDisplay() ) {
           buttons[2].className = "paginate_disabled_next";
           buttons[3].className = "paginate_disabled_next";
         }
         else {
           buttons[2].className = "paginate_enabled_next";
           buttons[3].className = "paginate_enabled_next";
         }
       }
     }
   };</pre>
    </div>
</div></dd><dt class="  even"><a name="oSort"></a><a name="oSort_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oSort">oSort</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  even"><p>Sorting plug-in methods - Sorting in DataTables is based on the detected type of the
data column (you can add your own type detection functions, or override automatic 
detection using sType). With this specific type given to the column, DataTables will 
apply the required sort from the functions in the object. Each sort type must provide
two mandatory methods, one each for ascending and descending sorting, and can optionally
provide a pre-formatting method that will help speed up sorting by allowing DataTables
to pre-format the sort data only once (rather than every time the actual sort functions
are run). The two sorting functions are typical Javascript sort methods:
  <ul>
    <li>
      Function input parameters:
      <ul>
        <li>{<em>} Data to compare to the second parameter</li>
        <li>{</em>} Data to compare to the first parameter</li>
      </ul>
    </li>
    <li>
      Function return:
      <ul>
        <li>{int} Sorting match: &lt;0 if first parameter should be sorted lower than
          the second parameter, ===0 if the two parameters are equal and >0 if
          the first parameter should be sorted height than the second parameter.</li>
      </ul>
    </il>
  </ul></p><div class="collapse_details"><dl class="details">
	
</dl>
<h5>Examples</h5>
    <div class="example-code">
    	<pre class="brush: js">   // Case-sensitive string sorting, with no pre-formatting method
   $.extend( $.fn.dataTableExt.oSort, {
     "string-case-asc": function(x,y) {
       return ((x < y) ? -1 : ((x > y) ? 1 : 0));
     },
     "string-case-desc": function(x,y) {
       return ((x < y) ? 1 : ((x > y) ? -1 : 0));
     }
   } );

 </pre>
    </div>

    <div class="example-code">
    	<pre class="brush: js">   // Case-insensitive string sorting, with pre-formatting
   $.extend( $.fn.dataTableExt.oSort, {
     "string-pre": function(x) {
       return x.toLowerCase();
     },
     "string-asc": function(x,y) {
       return ((x < y) ? -1 : ((x > y) ? 1 : 0));
     },
     "string-desc": function(x,y) {
       return ((x < y) ? 1 : ((x > y) ? -1 : 0));
     }
   } );</pre>
    </div>
</div></dd><dt class="  odd"><a name="oStdClasses"></a><a name="oStdClasses_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#oStdClasses">oStdClasses</a></span><span class="type-sig"><span class="type-signature"> :object</span></span></dt><dd class="  odd"><p>Storage for the various classes that DataTables uses</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd><dt class="  even"><a name="sErrMode"></a><a name="sErrMode_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sErrMode">sErrMode</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class="  even"><p>How should DataTables report an error. Can take the value 'alert' or 'throw'</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd><dt class="  odd"><a name="sVersion"></a><a name="sVersion_details"></a><span class="type-attr"><span class="type-signature">&lt;static> </span></span><span class="type-name"><a href="#sVersion">sVersion</a></span><span class="type-sig"><span class="type-signature"> :string</span></span></dt><dd class="  odd"><p>Version string for plug-ins to check compatibility. Allowed format is
a.b.c.d.e where: a:int, b:int, c:int, d:string(dev|beta), e:int. d and
e are optional</p><div class="collapse_details"><dl class="details">
	
</dl>
</div></dd>
</dl></div>
   					</div>
				
		</div>

		<div class="fw_footer">
			DataTables: Copyright 2008-2012 Allan Jardine, all rights reserved<br>

			Documentation generated by <a href="https://github.com/micmath/JSDoc">JSDoc 3</a> on
			23th Sep 2012 - 14:27
			with the <a href="http://datatables.net/">DataTables</a> template.
		</div>
	</body>
</html>