@@ -7,6 +7,7 @@ import * as Properties from './properties.mjs'
7
7
import * as Server from './server.mjs'
8
8
9
9
let Reports = [ ] ;
10
+ let SearchBar = null ;
10
11
11
12
function MakeHumanReadableForTable ( property , value ) {
12
13
if ( property == null ) return value ;
@@ -512,16 +513,16 @@ function AddFilterPanel(container) {
512
513
filterPanel . className = "FilterPanel" ;
513
514
container . appendChild ( filterPanel ) ;
514
515
515
- const searchBar = document . createElement ( "input" )
516
- searchBar . type = "search"
517
- searchBar . placeholder = "Search Properties"
518
- searchBar . classList . add ( "searchBar" )
516
+ SearchBar = document . createElement ( "input" )
517
+ SearchBar . type = "search"
518
+ SearchBar . placeholder = "Search Properties"
519
+ SearchBar . classList . add ( "searchBar" )
519
520
Globals . PropertiesSearchString = "" ;
520
- searchBar . addEventListener ( 'input' , function ( e ) {
521
+ SearchBar . addEventListener ( 'input' , function ( e ) {
521
522
Globals . PropertiesSearchString = e . target . value ;
522
523
UpdateTable ( ) ;
523
524
} )
524
- container . appendChild ( searchBar )
525
+ container . appendChild ( SearchBar )
525
526
526
527
let fieldSetContainer = document . createElement ( "div" ) ;
527
528
fieldSetContainer . classList . add ( "FieldSetContainer" ) ;
@@ -913,7 +914,28 @@ function UpdateTable() {
913
914
UpdateTableBody ( table ) ;
914
915
}
915
916
917
+ function OverrideSearch ( ) {
918
+ window . addEventListener ( "keydown" , function ( e ) {
919
+ if ( SearchBar == null || document . activeElement == SearchBar )
920
+ {
921
+ return ;
922
+ }
923
+
924
+ let searchDetected = false ;
925
+ searchDetected = searchDetected || ( e . key === "F3" ) ;
926
+ searchDetected = searchDetected || ( e . key . toUpperCase ( ) === "F" && e . ctrlKey ) ;
927
+
928
+ if ( searchDetected )
929
+ {
930
+ e . preventDefault ( ) ;
931
+ SearchBar . focus ( ) ;
932
+ }
933
+ } )
934
+ }
935
+
916
936
function OnLoad ( ) {
937
+ OverrideSearch ( ) ;
938
+
917
939
const tableContainer = document . getElementById ( "FeatureTable" )
918
940
const textContainer = document . createElement ( "div" )
919
941
const loadingText = document . createTextNode ( "Loading. Please wait." )
0 commit comments