Layoutfixes on index.html plus some spinner fiddeling

This commit is contained in:
Anders Betnér 2006-06-28 00:01:39 +00:00
parent a0ed0c8e43
commit 6ca96e4da4
3 changed files with 15 additions and 9 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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');
},