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