diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-04-04 03:09:22 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2018-04-04 03:09:22 +0300 |
commit | e559f740eb37b144263b01625d11e4f3d1bc2418 (patch) | |
tree | acc98f99595279d87dabc6d97436881406bd659d | |
parent | 30da787f915d8cd80f2cafa921505a1896ee3583 (diff) |
ncp-web: fix ncp-app selectionv0.53.13
-rw-r--r-- | ncp-web/ncp.js | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/ncp-web/ncp.js b/ncp-web/ncp.js index 779b8fdf..132e0b17 100644 --- a/ncp-web/ncp.js +++ b/ncp-web/ncp.js @@ -27,18 +27,21 @@ function switch_to_section( name ) selectedID = null; } -function cfgreqReceive( result ) +function cfgreqReceive( result, item ) { var ret = $.parseJSON( result ); if ( ret.token ) $('#csrf-token').set( { value: ret.token } ); - $('#details-box' ).hide(); + switch_to_section( 'config' ); + selectedID = item.get('.id'); + item.set( '+active' ); + + $('#details-box' ).hide(); $('#circle-retstatus').hide(); $('#config-box').ht( ret.output ); $('#config-box-title' ).fill( $( '#' + selectedID + '-desc' ).get( '.value' ) ); $('#config-box-info-txt' ).fill( $( '#' + selectedID + '-info' ).get( '.value' ) ); - switch_to_section( 'config' ); $('#config-box-wrapper').show(); $('#config-extra-info').set( { $display: 'inline-block' } ); $('#config-extra-info').up().set( '@href', 'https://github.com/nextcloud/nextcloudpi/wiki/Configuration-Reference#' + selectedID ); @@ -87,9 +90,7 @@ $(function() csrf_token: $( '#csrf-token' ).get( '.value' ) }).then( function success( result ) { - cfgreqReceive( result ); - selectedID = that.get('.id'); - that.set( '+active' ); + cfgreqReceive( result, that ); confLock = false; }).error( errorMsg ); }); @@ -171,11 +172,7 @@ $(function() csrf_token: $( '#csrf-token' ).get( '.value' ) }).then( function success( result ) { - selectedID = 'nc-update'; - $( '#nc-update' ).set( '+active' ); - - cfgreqReceive( result ); - + cfgreqReceive( result, $( '#nc-update' ) ); confLock = false; } ).error( errorMsg ); |