mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-11 15:03:24 -05:00
Layoutfixes on index.html plus some spinner fiddeling
This commit is contained in:
parent
a0ed0c8e43
commit
6ca96e4da4
@ -22,9 +22,11 @@
|
||||
</head>
|
||||
<body @ispage smart.html:onload="init()":@>
|
||||
|
||||
<!-- this is used on the status page to show a grey overlay when the server is stopped -->
|
||||
<div id="grey_screen" style="display: none;"></div>
|
||||
<div id="firefly_head">
|
||||
<a href="http://www.fireflymediaserver.org/" title="link to project home">
|
||||
<img src="ff_logo_sm.gif" width="136" height="36" alt="firefly logo"/>
|
||||
<img src="ff_logo_sm.gif" width="136" height="36" alt="firefly logo" />
|
||||
</a>
|
||||
<!-- <div class="ministatus">Version @VERSION@</div>-->
|
||||
</div>
|
||||
@ -33,7 +35,7 @@
|
||||
The best open-source media server for the <a href="http://www.rokulabs.com">Roku SoundBridge</a> and iTunes
|
||||
</div>
|
||||
<div id="navigation">
|
||||
<img id="spinner" src="spinner_stopped.gif">
|
||||
<img id="spinner" src="spinner_stopped.gif" alt="spinner" />
|
||||
<br /><br />
|
||||
<ul>
|
||||
<li><a @ispage index.html:class="naviselected":@ href="index.html">server status</a></li>
|
||||
|
@ -7,12 +7,14 @@
|
||||
width: 80ex;
|
||||
}
|
||||
#server_stopped_message {
|
||||
position: absolute;
|
||||
background-color: yellow;
|
||||
padding: 1em;
|
||||
border: 1px solid #8CACBB;
|
||||
/* border: 1px solid #8CACBB;*/
|
||||
font-size: 120%;
|
||||
margin-bottom: 1em;
|
||||
z-index: 100;
|
||||
|
||||
}
|
||||
#grey_screen {
|
||||
position: absolute;
|
||||
@ -26,8 +28,9 @@
|
||||
z-index: 10;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h1>Server Status</h1>
|
||||
<div id="grey_screen" style="display: none;"></div>
|
||||
|
||||
<div id="server_stopped_message" style="display: none;">The Firefly server is not running, this page will be inaccessible until you start the server again.</div>
|
||||
<table id="service" cellspacing="0">
|
||||
<thead>
|
||||
|
@ -16,14 +16,14 @@ var Updater = {
|
||||
Updater.spinnerTimeout = window.setTimeout(Util.startSpinner,UPDATE_FREQUENCY-1000);
|
||||
},
|
||||
update: function () {
|
||||
if (Updater.stop) {
|
||||
return;
|
||||
}
|
||||
if (Updater.updateTimeout) {
|
||||
window.clearTimeout(Updater.updateTimeout);
|
||||
}
|
||||
if (Updater.spinnerTimeout) {
|
||||
window.clearTimeout(Updater.updateTimeout);
|
||||
window.clearTimeout(Updater.spinnerTimeout);
|
||||
}
|
||||
if (Updater.stop) {
|
||||
return;
|
||||
}
|
||||
new Ajax.Request('xml-rpc?method=stats',{method: 'get',onComplete: Updater.rsStats});
|
||||
},
|
||||
@ -57,11 +57,12 @@ var Updater = {
|
||||
}
|
||||
},
|
||||
stopServer: function() {
|
||||
new Ajax.Request('xml-rpc',{method:'post',parameters: 'method=shutdown',onComplete: Updater.rsStopServer});
|
||||
Util.stopSpinner();
|
||||
new Ajax.Request('xml-rpc',{method:'post',parameters: 'method=shutdown',onComplete: Updater.rsStopServer});
|
||||
},
|
||||
rsStopServer: function(request) {
|
||||
Updater.stop = true;
|
||||
Updater.update(); // To clear the spinner timeout
|
||||
Element.show('grey_screen');
|
||||
Effect.Appear('server_stopped_message');
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user