QSO live table filter
This commit is contained in:
		
							parent
							
								
									80934bda32
								
							
						
					
					
						commit
						1230e4cdc7
					
				|  | @ -55,7 +55,7 @@ | |||
| 					</thead> | ||||
| 					<tbody> | ||||
| 				{% for qso in qsos %} | ||||
| 					<tr> | ||||
| 					<tr id="qso-row-{{ forloop.counter0 }}"> | ||||
| 						<td>{{ qso.ownNo }}</td> | ||||
| 						<td>{{ qso.band }}</td> | ||||
| 						<td>{{ qso.time|date:"H:i" }}</td> | ||||
|  | @ -106,7 +106,22 @@ $(document).ready(function() { | |||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	function filterTableCalls(e) { | ||||
| 		var call = $("#id_call").val(); | ||||
| 		//var band = $("#id_band :selected").text(); | ||||
| 
 | ||||
| 		for(var i=0; i<log.length; i++) { | ||||
| 			console.log(log[i].call.substr(0, call.length)); | ||||
| 			if(log[i].call.substr(0, call.length) != call) { | ||||
| 				$("#qso-row-" + i).hide(); | ||||
| 			} else { | ||||
| 				$("#qso-row-" + i).show(); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	$("#id_call").on("input", checkForDupes); | ||||
| 	$("#id_call").on("input", filterTableCalls); | ||||
| 	$("#id_band").change(checkForDupes); | ||||
| }); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue