1 2Lenta.StartTrack2 = Lenta.StartTrack.extend({ 3 4 TYPE: Lenta.ItemType.START_TRACK, 5 className: 'item item-track item-track-s', 6 7 initialize: function(){ 8 Lenta.MetaItem.prototype.initialize.apply(this); 9 this.model.on('change:start', this.update, this); 10 }, 11 12 render: function(){ 13 if(this.$el) 14 return this.$el; 15 this.makeEl(); 16 17 var d = app.devices.get(this.model.attributes.dev_id).attributes; 18 var pp = {}; 19 pp.time = moment(this.getTime()).format('HH:mm'); 20 pp.title = this.getTitle(); 21 pp.sub_name = d.name; 22 pp.color = d.color; 23 this.$el.html(_.template_ex('lenta/track-simple', pp)); 24 this.$el.addClass('item-track'); 25 this.$el.attr('track-id', this.model.id); 26 this.$el.on('click', _.bind(this.onClick, this)); 27 this.$el.toggleClass('alarm', !!this.model.attributes.alarm); 28 29 this.showAddr(this.$('.addr .inner')); 30 31 return this.$el; 32 } 33 34}); 35 36Lenta.EndTrack2 = Lenta.StartTrack2.extend({ 37 38 TYPE: Lenta.ItemType.END_TRACK, 39 className: 'item item-track item-track-e', 40 41 initialize: function(){ 42 Lenta.MetaItem.prototype.initialize.apply(this); 43 }, 44 45 remove: function (){ 46 Lenta.StartTrack2.prototype.remove.apply(this); 47 }, 48 49 getTitle: function(){ 50 if(!this.model.attributes.closed) return app.loc('ТекÑÑÐ°Ñ Ð¿Ð¾Ð·Ð¸ÑиÑ'); else 51 if(this.model.attributes.alarm) return app.loc('ТÑевожнÑй ÑÑек'); else 52 return app.loc('ÐÑÑанов двигаÑелÑ'); 53 }, 54 55 getTime: function(){ 56 return this.model.attributes.end; 57 }, 58 59 getPosition: function(){ 60 return [this.model.attributes.end_y, this.model.attributes.end_x]; 61 } 62});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.