From cdad339d13f71da4a043942c098add188f33f8f7 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sun, 10 Sep 2017 17:42:08 +0200 Subject: ncp-web: minor tweaks --- ncp-web/ncp.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ncp-web/ncp.js b/ncp-web/ncp.js index 11df76a8..1597a67e 100644 --- a/ncp-web/ncp.js +++ b/ncp-web/ncp.js @@ -53,6 +53,9 @@ $(function() // Show selected option configuration box $( 'li' , '#app-navigation' ).on('click', function(e) { + if ( selectedID == this.get( '.id' ) ) // already selected + return; + if ( confLock ) return; confLock = true; @@ -96,6 +99,8 @@ $(function() $('#details-box').show(); $('#circle-retstatus').hide(); + $( 'input' , '#config-box-wrapper' ).set('@disabled',true); + // request $.request('post', 'ncp-launcher.php', { action:'launch', ref:selectedID , @@ -114,6 +119,7 @@ $(function() } else // print error from server instead $('#details-box').fill(ret.output); + $( 'input' , '#config-box-wrapper' ).set('@disabled', null); $('#config-button').set('@disabled',null); $('#loading-gif').hide(); confLock = false; @@ -155,9 +161,16 @@ $(function() csrf_token: $( '#csrf-token' ).get( '.value' ) }).then( function success( result ) { + $('#config-box-wrapper').hide(); $('#config-box-title').fill( "Shutting down..." ); }).error( errorMsg ); } ); + + // close notification icon + $( '.icon-close' ).on('click', function(e) + { + $( '#notification' ).hide(); + } ); }); // License -- cgit v1.2.3