File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ function getDBList() {
8181
8282}
8383
84+ var lastTableName = getHashValue ( 'table' ) ;
8485function openDatabaseAndGetTableList ( db ) {
8586
8687 if ( "APP_SHARED_PREFERENCES" == db ) {
@@ -110,10 +111,14 @@ function openDatabaseAndGetTableList(db) {
110111 }
111112 $ ( '#table-list' ) . empty ( )
112113 for ( var count = 0 ; count < tableList . length ; count ++ ) {
113- var tableName = tableList [ count ] ;
114- $ ( "#table-list" ) . append ( "<a href='#' data-db-name='" + db + "' data-table-name='" + tableName + "' class='list-group-item' onClick='getData(\"" + tableName + "\");'>" + tableName + "</a>" ) ;
115- }
116-
114+ var tableName = tableList [ count ] ;
115+ $ ( "#table-list" ) . append ( "<a href='#table=" + tableName + "' data-db-name='" + db + "' data-table-name='" + tableName
116+ + "' class='list-group-item' onClick='getData(\"" + tableName + "\");'>" + tableName + "</a>" ) ;
117+ }
118+
119+ if ( lastTableName !== null ) {
120+ $ ( 'a[data-table-name=' + lastTableName + ']' ) . trigger ( 'click' ) ;
121+ }
117122 } } ) ;
118123
119124}
@@ -389,3 +394,8 @@ function showErrorInfo(message){
389394 snackbarElement . removeClass ( "show" ) ;
390395 } , 3000 ) ;
391396}
397+
398+ function getHashValue ( key ) {
399+ var matches = location . hash . match ( new RegExp ( key + '=([^&]*)' ) ) ;
400+ return matches ? matches [ 1 ] : null ;
401+ }
You can’t perform that action at this time.
0 commit comments