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:
parent
321df615bd
commit
081d9e76a3
BIN
images/loader.gif
Normal file
BIN
images/loader.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<body class="loading">
|
<body class="loading">
|
||||||
|
|
||||||
<div data-role="page">
|
<div role="page">
|
||||||
|
|
||||||
<header role="banner">
|
<header role="banner">
|
||||||
<h1>Tube Status</h1>
|
<h1>Tube Status</h1>
|
||||||
@ -57,5 +57,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="loader">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -12,9 +12,9 @@ function(Backbone) {
|
|||||||
|
|
||||||
initialize: function() {
|
initialize: function() {
|
||||||
this.collection.on("request", function() {
|
this.collection.on("request", function() {
|
||||||
// $.mobile.loading('show');
|
$('#loader').show();
|
||||||
}).on("reset", function() {
|
}).on("reset", function() {
|
||||||
// $.mobile.loading('hide');
|
$('#loader').hide();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ function(Backbone) {
|
|||||||
$('footer a').removeClass("selected");
|
$('footer a').removeClass("selected");
|
||||||
$(e.currentTarget).addClass("selected");
|
$(e.currentTarget).addClass("selected");
|
||||||
this.collection.fetch();
|
this.collection.fetch();
|
||||||
}
|
},
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,18 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Helvetica Neue", "Arial", sans-serif; }
|
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 {
|
header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@ -15,6 +15,20 @@ body {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: "Helvetica Neue", "Arial", sans-serif;
|
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 {
|
header {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user