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.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/ncp-web/ncp.js b/ncp-web/ncp.js
index 5d92bed0..b200c8b0 100644
--- a/ncp-web/ncp.js
+++ b/ncp-web/ncp.js
@@ -81,6 +81,18 @@ $(function()
confLock = false;
}).error( errorMsg );
});
+
+ // Power-off button
+ $( '#poweroff' ).on('click', function(e)
+ {
+ // request
+ $.request('post', 'ncp-launcher.php', { action:'poweroff',
+ csrf_token: $( '#csrf-token' ).get( '.value' ) }).then(
+ function success( result )
+ {
+ $('#config-box-title').fill( "Shutting down..." );
+ }).error( errorMsg );
+ } );
});
// License