Support playlist management
[infodrom/musiikki-web.git] / html / admin / admin.js
1 function submit_datetime() {
2     $.post('index.php',
3            'action=datetime&' + $('div.w3-container#datetime form').serialize(),
4            function(data){
5                if (data)
6                    response('Aktuelle Uhrzeit und Datum gesetzt');
7            });
8
9     return false;
10 }
11
12 function submit_wifi() {
13     $.post('index.php',
14            'action=wifi&' + $('div.w3-container#wifi form').serialize());
15     response('WLAN neu konfiguriert.<br>Sie müssen sich mit neuem Paßwort im WLAN anmelden.');
16
17     return false;
18 }
19
20 function submit_shares() {
21     $.post('index.php',
22            'action=shares&' + $('div.w3-container#shares form').serialize(),
23            function(data){
24                if (data)
25                    response('Passwörter für die Netzwerk-Laufwerke gesetzt');
26            });
27
28     return false;
29 }
30
31 function submit_rescan() {
32     $.post('index.php',
33            'action=rescan',
34            function(data){
35                if (data) {
36                    if (data.info)
37                        response(data.info);
38                    else
39                        response('Rescan wurde getriggert.<br>Die Medienliste wird neu aufgebaut.');
40                }
41            });
42
43     return false;
44 }
45
46 function submit_passwd() {
47     $.post('index.php',
48            'action=passwd&' + $('div.w3-container#passwd form').serialize());
49     response('Admin-Passwort neu gesetzt.<br>Sie müssen sich erneut anmelden.');
50
51     return false;
52 }
53
54 function submit_halt() {
55     $.post('index.php',
56            'action=halt',
57            function(data){
58                if (data)
59                    response('Der Server kann jetzt vom Strom getrennt und eingepackt werden.', true);
60            });
61
62     return false;
63 }