Subversion-Projekte lars-tiefland.webanos.zeldi.de

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
4 lars 1
/**
2
 * Read information from a column of checkboxes (input elements with type
3
 * checkbox) and return an array to use as a basis for sorting.
4
 *
5
 *  @summary Sort based on the checked state of checkboxes in a column
6
 *  @name Checkbox data source
7
 *  @author [Allan Jardine](http://sprymedia.co.uk)
8
 */
9
 
10
$.fn.dataTable.ext.order['dom-checkbox'] = function  ( settings, col )
11
{
12
	return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
13
		return $('input', td).prop('checked') ? '1' : '0';
14
	} );
15
};