DataTables | Table plug-in for jQuery (v1.10.0) with Bootstrap styling

This commit is contained in:
Eric A. Miller
2014-05-19 23:16:20 -04:00
parent 97f68aaeb6
commit 980f8ae2a6
12 changed files with 604 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/**
* Automatically detect IP addresses in dot notation. Goes perfectly with the
* IP address sorting function.
*
* @name IP address detection
* @summary Detect data which is in IP address notation
* @author Brad Wasson
*/
jQuery.fn.dataTableExt.aTypes.unshift(
function ( sData )
{
if (/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(sData)) {
return 'ip-address';
}
return null;
}
);