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

Style tweaks. Fix loader position.

This commit is contained in:
Dan Barber 2013-01-27 23:40:57 +00:00
parent 081d9e76a3
commit 5fc7d4a207
4 changed files with 22 additions and 6 deletions

View File

@ -0,0 +1,16 @@
define(['backbone', 'models/line'], function(Backbone, Line) {
var LinesWeekendCollection = Backbone.Collection.extend({
// added callback=? to force jsonp
url: "http://api.tubeupdates.com/?method=get.status&callback=?",
model: Line,
parse: function(data) {
return data.response.lines;
}
});
return LinesWeekendCollection;
});

View File

@ -12,9 +12,9 @@ function(Backbone) {
initialize: function() { initialize: function() {
this.collection.on("request", function() { this.collection.on("request", function() {
$('#loader').show(); $('#loader').fadeIn(100);
}).on("reset", function() { }).on("reset", function() {
$('#loader').hide(); $('#loader').fadeOut(100);
}); });
}, },

View File

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

View File

@ -17,7 +17,7 @@ body {
} }
#loader { #loader {
position: absolute; position: fixed;
top: 45%; top: 45%;
left: 50%; left: 50%;
width: 52px; width: 52px;
@ -25,7 +25,7 @@ body {
margin: -26px 0 0 -26px; margin: -26px 0 0 -26px;
background: black url(/images/loader.gif) center center no-repeat; background: black url(/images/loader.gif) center center no-repeat;
border-radius: 26px; border-radius: 26px;
opacity: 0.5; opacity: 0.7;
display: none; display: none;
} }