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:
parent
081d9e76a3
commit
5fc7d4a207
16
javascripts/collections/lines_weekend.js
Normal file
16
javascripts/collections/lines_weekend.js
Normal 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;
|
||||
|
||||
});
|
||||
@ -12,9 +12,9 @@ function(Backbone) {
|
||||
|
||||
initialize: function() {
|
||||
this.collection.on("request", function() {
|
||||
$('#loader').show();
|
||||
$('#loader').fadeIn(100);
|
||||
}).on("reset", function() {
|
||||
$('#loader').hide();
|
||||
$('#loader').fadeOut(100);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ body {
|
||||
font-family: "Helvetica Neue", "Arial", sans-serif; }
|
||||
|
||||
#loader {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
width: 52px;
|
||||
@ -60,7 +60,7 @@ body {
|
||||
margin: -26px 0 0 -26px;
|
||||
background: black url(/images/loader.gif) center center no-repeat;
|
||||
border-radius: 26px;
|
||||
opacity: 0.5;
|
||||
opacity: 0.7;
|
||||
display: none; }
|
||||
|
||||
header {
|
||||
|
||||
@ -17,7 +17,7 @@ body {
|
||||
}
|
||||
|
||||
#loader {
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 45%;
|
||||
left: 50%;
|
||||
width: 52px;
|
||||
@ -25,7 +25,7 @@ body {
|
||||
margin: -26px 0 0 -26px;
|
||||
background: black url(/images/loader.gif) center center no-repeat;
|
||||
border-radius: 26px;
|
||||
opacity: 0.5;
|
||||
opacity: 0.7;
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user