Files
Lentolaskuri/app/scripts/models/leg.js
2013-05-13 11:43:34 +03:00

21 lines
339 B
JavaScript

define([
'backbone'
], function (Backbone) {
var num = 1;
var Leg = Backbone.Model.extend({
initialize: function () {
this.set('airportId', this.get('id'));
this.set('id', num);
++num;
},
destroy: function () {
this.trigger('destroy', this, this.collection, {});
}
});
return Leg;
});