silvrgit/app/js/todayv2.js

39 lines
809 B
JavaScript
Raw Normal View History

2016-09-09 14:48:22 +00:00
/**
*
* User: Martin Donnelly
* Date: 2016-09-09
* Time: 15:11
*
*/
(function($) {
2016-10-05 14:09:12 +00:00
var TodayDataModel = Backbone.Model.extend({
initialize: function() {
this.set('url', '/today/data');
console.log(this.get('url'));
//this.update();
}
});
var webSocketModel = new SOCKETMANAGER();
webSocketModel.turnOn();
var clock = new Clock({model: new ClockModel()});
var weatherModel = new WeatherModel({lat: 55.95, long: -4.5666667});
var weather = new Weather({model: weatherModel});
var trainModel = new TrainModel();
var train = new Train({model: trainModel});
webSocketModel.setWeather(weatherModel);
webSocketModel.setTrain(trainModel);
setTimeout(function(){
console.log('request update');
webSocketModel.getUpdate();
}, 500);
2016-09-09 14:48:22 +00:00
})(jQuery);