Commit d71976fd authored by Hubert Denkmair's avatar Hubert Denkmair
Browse files

add restart button

parent d69c38dc
......@@ -56,6 +56,13 @@ function setupToolbar()
});
});
$('#bt_stop').click(function() {
$.post('/snake/disable', '', function(data) {
// todo show data.message
console.log(data.message)
});
});
$('#bt_save_as').click(function() {
showModal($('#safe_as_dialog'), function() {
save('save', $('#save_as_title').val());
......
......@@ -20,6 +20,7 @@
<div id="toolbar">
<button id="bt_run">save & run</button>
<button id="bt_restart">restart</button>
<button id="bt_stop">stop</button>
<button id="bt_save_as">save as</button>
<button>load</button>
<button>preferences</button>
......
......@@ -134,6 +134,7 @@ def snake_disable(request):
response = {'message': 'disabled snake {}'.format(profile.active_snake.version)}
profile.active_snake = None
profile.save()
send_kill_command(request.user)
else:
response = {'message': 'no snake was and is enabled.'}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment