X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fapi%2Fregex.html;fp=webapp%2Fresources%2Fdatatables-1.9.4%2Fexamples%2Fapi%2Fregex.html;h=2ea7a179d64fa7b00b7821b4d6fd5bbbfbd33ae3;hb=9bb6ee99ca7f738fac1087190b5481b8fe6e8d9f;hp=0000000000000000000000000000000000000000;hpb=2e3f6b76be585306f1003d849831840c0adb3360;p=proteocache.git diff --git a/webapp/resources/datatables-1.9.4/examples/api/regex.html b/webapp/resources/datatables-1.9.4/examples/api/regex.html new file mode 100644 index 0000000..2ea7a17 --- /dev/null +++ b/webapp/resources/datatables-1.9.4/examples/api/regex.html @@ -0,0 +1,726 @@ + + + + + + + DataTables example + + + + + + +
+
+ DataTables filtering API example +
+ +

Preamble

+

Filtering a table is one of the most common user interactions with a DataTables table, and DataTables provides a number of methods for you to control this interaction. There is a global filter, and a filter for each individual column. The global filter acts on each column.

+

Each filter (global or column) can be marked as a regular expression (allowing you to create very complex interactions) and as a smart filter or not. When smart filtering is enabled on a particular filter, DataTables will modify the user input string to a complex regular expression which can make filtering more intuitive.

+

This example allows you to "play" with the various filtering options that DataTables provides.

+ +

Live example

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TargetFilter textTreat as regexUse smart filter
Global filtering
Column 1
Column 2
Column 3
Column 4
Column 5
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Rendering engineBrowserPlatform(s)Engine versionCSS grade
TridentInternet + Explorer 4.0Win 95+4X
TridentInternet + Explorer 5.0Win 95+5C
TridentInternet + Explorer 5.5Win 95+5,5A
TridentInternet + Explorer 6Win 98+6A
TridentInternet Explorer 7Win XP SP2+7A
TridentAOL browser (AOL desktop)Win XP6A
GeckoFirefox 1.0Win 98+ / OSX.2+1,7A
GeckoFirefox 1.5Win 98+ / OSX.2+1,8A
GeckoFirefox 2.0Win 98+ / OSX.2+1,8A
GeckoFirefox 3.0Win 2k+ / OSX.3+1,9A
GeckoCamino 1.0OSX.2+1,8A
GeckoCamino 1.5OSX.3+1,8A
GeckoNetscape 7.2Win 95+ / Mac OS 8.6-9.21.7A
GeckoNetscape Browser 8Win 98SE+1,7A
GeckoNetscape Navigator 9Win 98+ / OSX.2+1,8A
GeckoMozilla 1.0Win 95+ / OSX.1+1A
GeckoMozilla 1.1Win 95+ / OSX.1+1,1A
GeckoMozilla 1.2Win 95+ / OSX.1+1,2A
GeckoMozilla 1.3Win 95+ / OSX.1+1,3A
GeckoMozilla 1.4Win 95+ / OSX.1+1,4A
GeckoMozilla 1.5Win 95+ / OSX.1+1,5A
GeckoMozilla 1.6Win 95+ / OSX.1+1,6A
GeckoMozilla 1.7Win 98+ / OSX.1+1,7A
GeckoMozilla 1.8Win 98+ / OSX.1+1,8A
GeckoSeamonkey 1.1Win 98+ / OSX.2+1,8A
GeckoEpiphany 2.20Gnome1,8A
WebkitSafari 1.2OSX.3125,5A
WebkitSafari 1.3OSX.3312,8A
WebkitSafari 2.0OSX.4+419,3A
WebkitSafari 3.0OSX.4+522,1A
WebkitOmniWeb 5.5OSX.4+420A
WebkitiPod Touch / iPhoneiPod420,1A
WebkitS60S60413A
PrestoOpera 7.0Win 95+ / OSX.1+-A
PrestoOpera 7.5Win 95+ / OSX.2+-A
PrestoOpera 8.0Win 95+ / OSX.2+-A
PrestoOpera 8.5Win 95+ / OSX.2+-A
PrestoOpera 9.0Win 95+ / OSX.3+-A
PrestoOpera 9.2Win 88+ / OSX.3+-A
PrestoOpera 9.5Win 88+ / OSX.3+-A
PrestoOpera for WiiWii-A
PrestoNokia N800N800-A
PrestoNintendo DS browserNintendo DS8,5C/A1
KHTMLKonqureror 3.1KDE 3.13,1C
KHTMLKonqureror 3.3KDE 3.33,3A
KHTMLKonqureror 3.5KDE 3.53,5A
TasmanInternet Explorer 4.5Mac OS 8-9-X
TasmanInternet Explorer 5.1Mac OS 7.6-91C
TasmanInternet Explorer 5.2Mac OS 8-X1C
MiscNetFront 3.1Embedded devices-C
MiscNetFront 3.4Embedded devices-A
MiscDillo 0.8Embedded devices-X
MiscLinksText only-X
MiscLynxText only-X
MiscIE MobileWindows Mobile 6-C
MiscPSP browserPSP-C
Other browsersAll others--U
Rendering engineBrowserPlatform(s)Engine versionCSS grade
+
+
+ + +

Initialisation code

+
function fnFilterGlobal ()
+{
+	$('#example').dataTable().fnFilter( 
+		$("#global_filter").val(),
+		null, 
+		$("#global_regex")[0].checked, 
+		$("#global_smart")[0].checked
+	);
+}
+
+function fnFilterColumn ( i )
+{
+	$('#example').dataTable().fnFilter( 
+		$("#col"+(i+1)+"_filter").val(),
+		i, 
+		$("#col"+(i+1)+"_regex")[0].checked, 
+		$("#col"+(i+1)+"_smart")[0].checked
+	);
+}
+
+$(document).ready(function() {
+	$('#example').dataTable();
+	
+	$("#global_filter").keyup( fnFilterGlobal );
+	$("#global_regex").click( fnFilterGlobal );
+	$("#global_smart").click( fnFilterGlobal );
+	
+	$("#col1_filter").keyup( function() { fnFilterColumn( 0 ); } );
+	$("#col1_regex").click(  function() { fnFilterColumn( 0 ); } );
+	$("#col1_smart").click(  function() { fnFilterColumn( 0 ); } );
+	
+	// ... etc for the other four columns
+} );
+ + + + +

Other examples

+ + + + + + +
+ + \ No newline at end of file