Shutdownbutton in webui

This commit is contained in:
Nikolas Garofil
2012-08-19 19:25:21 +02:00
parent e664047c5a
commit 2b02ec3a4e
3 changed files with 11 additions and 0 deletions

View File

@@ -283,6 +283,13 @@ initializeWindows = function(){
});
});
addClickEvent('shutdown', function(e){
new Event(e).stop();
new Request({url: 'command/shutdown'}).send();
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>qBittorrent-nox has been shutdown.</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>qBittorrent-nox has been shutdown.</h1></body></html>"); //TODO Can someone with artistic skills put a pretty webpage here
stop();
});
// Deactivate menu header links
$$('a.returnFalse').each(function(el){
el.addEvent('click', function(e){