1
0
mirror of https://github.com/danbee/tube-status-server synced 2025-03-04 08:39:12 +00:00

Add loader.

This commit is contained in:
Dan Barber 2013-01-27 23:12:13 +00:00
parent 321df615bd
commit 081d9e76a3
5 changed files with 34 additions and 4 deletions

BIN
images/loader.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -36,7 +36,7 @@
<body class="loading">
<div data-role="page">
<div role="page">
<header role="banner">
<h1>Tube Status</h1>
@ -57,5 +57,9 @@
</div>
<div id="loader">
&nbsp;
</div>
</body>
</html>

View File

@ -12,9 +12,9 @@ function(Backbone) {
initialize: function() {
this.collection.on("request", function() {
// $.mobile.loading('show');
$('#loader').show();
}).on("reset", function() {
// $.mobile.loading('hide');
$('#loader').hide();
});
},
@ -29,7 +29,7 @@ function(Backbone) {
$('footer a').removeClass("selected");
$(e.currentTarget).addClass("selected");
this.collection.fetch();
}
},
});

View File

@ -51,6 +51,18 @@ body {
margin: 0;
font-family: "Helvetica Neue", "Arial", sans-serif; }
#loader {
position: absolute;
top: 45%;
left: 50%;
width: 52px;
height: 52px;
margin: -26px 0 0 -26px;
background: black url(/images/loader.gif) center center no-repeat;
border-radius: 26px;
opacity: 0.5;
display: none; }
header {
position: fixed;
width: 100%;

View File

@ -15,6 +15,20 @@ body {
margin: 0;
font-family: "Helvetica Neue", "Arial", sans-serif;
}
#loader {
position: absolute;
top: 45%;
left: 50%;
width: 52px;
height: 52px;
margin: -26px 0 0 -26px;
background: black url(/images/loader.gif) center center no-repeat;
border-radius: 26px;
opacity: 0.5;
display: none;
}
header {
position: fixed;
width: 100%;