|
|
@ -14,3 +14,15 @@ $.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
|
|
|
return $('select', td).val();
|
|
|
|
return $('select', td).val();
|
|
|
|
} );
|
|
|
|
} );
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* @summary Sort based on the selected text of the `dt-tag select` options in a column
|
|
|
|
|
|
|
|
* @author [Somasekar N](somasekar.cse@gmail.com)
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$.fn.dataTable.ext.order['dom-select'] = function ( settings, col )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
|
|
|
|
|
return $('select :selected', td).val();
|
|
|
|
|
|
|
|
} );
|
|
|
|
|
|
|
|
};
|
|
|
|