1
0
mirror of https://github.com/danbee/tube-status-server synced 2025-03-04 08:39:12 +00:00
tube-status-server/javascripts/app.js
2013-01-28 18:01:04 +00:00

29 lines
771 B
JavaScript

define(['backbone',
'mustache',
'collections/lines',
'views/chrome',
'views/main',
'views/line_list'],
function(Backbone, Mustache, LinesCollection, Chrome, Main, LineList) {
return {
initialize: function() {
window.phonegap = (document.URL.indexOf("http://") == -1);
if (window.phonegap) {
$.getScript("/javascripts/libs/cordova-2.2.0.js");
}
lines = new LinesCollection;
// initialise chrome. this will render appropriate navbar and tabbar for the platform.
chrome = new Chrome({ collection: lines });
main = new Main({ collection: lines });
lineList = new LineList({ collection: lines });
//lines.url = lines.urls.now;
lines.fetch();
}
};
});