Skip to content

Commit

Permalink
ncp-web: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Sep 10, 2017
1 parent 60711f3 commit cdad339
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ncp-web/ncp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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 ,
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cdad339

Please sign in to comment.