Skip to content

Commit

Permalink
ncp-web: disable event handler after poweroff
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Feb 18, 2018
1 parent f1d41e3 commit 7d03e84
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
10 changes: 6 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@

[v0.46.17](https://github.com/nextcloud/nextcloudpi/commit/fbe639a) (2018-02-10) Add dialog for shutdown.
[v0.46.18](https://github.com/nextcloud/nextcloudpi/commit/a3b8829) (2018-02-18) ncp-web: disable event handler after poweroff

[v0.46.16](https://github.com/nextcloud/nextcloudpi/commit/2d3fc6f) (2018-02-16) remove redundant configuration from unattended upgrades
[v0.46.17](https://github.com/nextcloud/nextcloudpi/commit/91686f2) (2018-02-10) Add dialog for shutdown.

[v0.46.15](https://github.com/nextcloud/nextcloudpi/commit/45c5608) (2018-02-16) lamp: enhance SSL security (chacha cypher), and OCSP stapling
[v0.46.16](https://github.com/nextcloud/nextcloudpi/commit/4bdbf93) (2018-02-16) remove redundant configuration from unattended upgrades

[v0.46.14](https://github.com/nextcloud/nextcloudpi/commit/90dc944) (2018-02-16) log all NCP actions to /var/log/ncp.log
[v0.46.15](https://github.com/nextcloud/nextcloudpi/commit/e965c1a) (2018-02-16) lamp: enhance SSL security (chacha cypher), and OCSP stapling

[v0.46.14](https://github.com/nextcloud/nextcloudpi/commit/ff33be9) (2018-02-16) log all NCP actions to /var/log/ncp.log

[v0.46.13](https://github.com/nextcloud/nextcloudpi/commit/19b0609) (2018-02-16) update: accept github branch as an argument to ncp-update to test development branch

Expand Down
7 changes: 5 additions & 2 deletions ncp-web/ncp.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ $(function()
} );

// Power-off button
$( '#poweroff' ).on('click', function(e)
function poweroff_event_handler(e)
{
//e.preventBubble = true;
$('#overlay').show();
Expand All @@ -170,7 +170,8 @@ $(function()
$('#overlay').hide();
$('#overlay').off('click');
});
});
}
$( '#poweroff' ).on('click', poweroff_event_handler );

$( '#poweroff-option_shutdown' ).on('click', function(e)
{
Expand All @@ -182,6 +183,7 @@ $(function()
function success( result )
{
$('#config-box-wrapper').hide();
$.off( poweroff_event_handler );
$('#config-box-title').fill( "Shutting down..." );
}).error( errorMsg );
} );
Expand All @@ -196,6 +198,7 @@ $(function()
function success( result )
{
$('#config-box-wrapper').hide();
$.off( poweroff_event_handler );
$('#config-box-title').fill( "Rebooting..." );
}).error( errorMsg );
} );
Expand Down

0 comments on commit 7d03e84

Please sign in to comment.