11( function ( $ ) {
2- var PQP_DETAILS = false ;
3- var PQP_HEIGHT = 'short' ;
4- var PROFILER_DETAILS = false ;
2+ var profiler_details = false ;
53
64 function hideAllTabs ( ) {
75 $ ( '#profiler' ) . removeClass ( 'console' )
1210 }
1311
1412 $ ( document ) . ready ( function ( ) {
15- setTimeout ( function ( ) { $ ( '#profiler-container' ) . css ( 'display' , 'block' ) } , 10 ) ;
13+ setTimeout ( function ( ) { $ ( '#profiler-container' ) . css ( 'display' , 'block' ) } , 10 ) ;
1614
1715 $ ( '.query-profile H4' ) . css ( 'cursor' , 'pointer' ) . click ( function ( ) {
1816 if ( $ ( 'table' , $ ( this ) . parent ( ) ) . is ( ':hidden' ) ) {
2523 } ) ;
2624
2725 $ ( '.detailsToggle' ) . click ( function ( ) {
28- if ( PQP_DETAILS ) {
26+ if ( profiler_details ) {
2927 $ ( '#profiler-container' ) . addClass ( 'hideDetails' ) ;
30- PQP_DETAILS = false ;
28+ profiler_details = false ;
3129 } else {
32- $ ( '#profiler-container' ) . removeClass ( 'hideDetails' ) ;
33- PQP_DETAILS = true ;
30+ $ ( '#profiler-container' ) . removeClass ( 'hideDetails' ) ;
31+ profiler_details = true ;
3432 }
33+
3534 return false ;
3635 } ) ;
3736
3837 $ ( '.heightToggle' ) . click ( function ( ) {
39- var container = $ ( '#pqp -container' ) ;
38+ var container = $ ( '#profiler -container' ) ;
4039
41- if ( container . hasClass ( 'tallDetails' ) )
40+ if ( container . hasClass ( 'tallDetails' ) ) {
4241 container . removeClass ( 'tallDetails' ) ;
43- else
42+ } else {
4443 container . addClass ( 'tallDetails' ) ;
44+ }
4545 } ) ;
4646
47- $ ( '.tab' ) . click ( function ( ) {
47+ $ ( '.tab' ) . css ( 'cursor' , 'pointer' ) . click ( function ( ) {
4848 hideAllTabs ( ) ;
49+
50+ $ ( this ) . addClass ( 'active' ) ;
4951 $ ( '#profiler' ) . addClass ( $ ( this ) . attr ( 'id' ) ) ;
52+
53+ if ( ! profiler_details ) {
54+ profiler_details = true ;
55+ $ ( '#profiler-container' ) . removeClass ( 'hideDetails' ) ;
56+ }
5057 } ) ;
5158 } ) ;
5259} ) ( jQuery ) ;
0 commit comments