Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ncp-web/ncp.js')
-rw-r--r--ncp-web/ncp.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ncp-web/ncp.js b/ncp-web/ncp.js
index 3937761a..327fcbd0 100644
--- a/ncp-web/ncp.js
+++ b/ncp-web/ncp.js
@@ -159,7 +159,7 @@ $(function()
} );
// Power-off button
- $( '#poweroff' ).on('click', function(e)
+ function poweroff_event_handler(e)
{
//e.preventBubble = true;
$('#overlay').show();
@@ -170,7 +170,8 @@ $(function()
$('#overlay').hide();
$('#overlay').off('click');
});
- });
+ }
+ $( '#poweroff' ).on('click', poweroff_event_handler );
$( '#poweroff-option_shutdown' ).on('click', function(e)
{
@@ -182,6 +183,7 @@ $(function()
function success( result )
{
$('#config-box-wrapper').hide();
+ $.off( poweroff_event_handler );
$('#config-box-title').fill( "Shutting down..." );
}).error( errorMsg );
} );
@@ -196,6 +198,7 @@ $(function()
function success( result )
{
$('#config-box-wrapper').hide();
+ $.off( poweroff_event_handler );
$('#config-box-title').fill( "Rebooting..." );
}).error( errorMsg );
} );