mirror of
https://github.com/Ekokumppanit/Lentolaskuri.git
synced 2026-02-13 23:47:02 +00:00
Initial commit
This commit is contained in:
20
app/scripts/models/leg.js
Normal file
20
app/scripts/models/leg.js
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user