@@ -87,6 +87,7 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
87
87
var eci = findEciById ( thePicoInp . id ) ;
88
88
if ( label === "About" ) {
89
89
var thePicoOut = { } ;
90
+ thePicoOut . pico_id = thePicoInp . id ;
90
91
thePicoOut . id = thePicoInp . id ;
91
92
thePicoOut . eci = eci ;
92
93
var pp_eci = getP ( thePicoInp , "parent_eci" , undefined ) ;
@@ -152,6 +153,7 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
152
153
} else if ( label === "Logging" ) {
153
154
var logRID = "io.picolabs.logging" ;
154
155
var theLoggingOut = { } ;
156
+ theLoggingOut . pico_id = thePicoInp . id ;
155
157
if ( get ( db_dump , [ "pico" , thePicoInp . id , "ruleset" , logRID , "on" ] ) ) {
156
158
var theLoggingVars = get ( db_dump , [ "pico" , thePicoInp . id , logRID , "vars" ] ) ;
157
159
theLoggingOut . status = theLoggingVars . status ;
@@ -179,7 +181,7 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
179
181
theChannels . push ( aChannel ) ;
180
182
}
181
183
} ) ;
182
- callback ( { "id" : thePicoInp . id , "eci" : thePicoInp . admin_eci , "channel" : theChannels } ) ;
184
+ callback ( { "pico_id" : thePicoInp . id , " id" : thePicoInp . id , "eci" : thePicoInp . admin_eci , "channel" : theChannels } ) ;
183
185
} else if ( label == "Subscriptions" ) {
184
186
var theSubscriptions = { } ;
185
187
var subscriptionsCount = 0 ;
@@ -194,7 +196,7 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
194
196
theSubscriptions [ id ] . name = getV ( pico , "dname" ) ;
195
197
} ) ;
196
198
}
197
- callback ( { eci :eci , "subscriptions" :subscriptionsCount ? theSubscriptions : false } ) ;
199
+ callback ( { "pico_id" : thePicoInp . id , eci :eci , "subscriptions" :subscriptionsCount ? theSubscriptions : false } ) ;
198
200
} else {
199
201
callback ( thePicoInp ) ;
200
202
}
@@ -290,9 +292,14 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
290
292
{ swatches : "#ccc|#fcc|#7fffd4|#ccf|#ffc|#87CEFA|#fcf" . split ( '|' ) } ) ;
291
293
$ ( '.minicolors-input-swatch' ) . css ( 'top' , 0 ) ;
292
294
$ ( '.minicolors-input-swatch' ) . css ( 'left' , 0 ) ;
293
- d = theDB . id + "-About" ;
295
+ d = theDB . pico_id + "-About" ;
296
+ location . hash = d ;
294
297
} else if ( liContent === "channels" ) {
295
- d = theDB . id + "-Channels" ;
298
+ d = theDB . pico_id + "-Channels" ;
299
+ location . hash = d ;
300
+ } else if ( liContent === "subscriptions" ) {
301
+ d = theDB . pico_id + "-Subscriptions" ;
302
+ location . hash = d ;
296
303
} else if ( liContent === "logging" ) {
297
304
$ ( "#logging-on" ) . click ( function ( ) {
298
305
$ . getJSON ( "/sky/event/" + theDB . eci + "/logging-on/picolog/begin" , function ( ) {
@@ -306,6 +313,8 @@ $.getJSON("/api/db-dump?legacy=true", function(db_dump){
306
313
$ ( "#logging-list" ) . hide ( ) ;
307
314
$ . getJSON ( "/sky/event/" + theDB . eci + "/logging-on/picolog/reset" , function ( ) { } ) ;
308
315
} ) ;
316
+ d = theDB . pico_id + "-Logging" ;
317
+ location . hash = d ;
309
318
}
310
319
$theSection . find ( '.js-ajax-form' ) . submit ( function ( e ) {
311
320
e . preventDefault ( ) ;
0 commit comments