Files
dss/static/js/app/views/widgets/mixTabHeaderView.js
2013-07-18 21:24:14 +01:00

34 lines
1.2 KiB
JavaScript

// Generated by CoffeeScript 1.3.3
(function() {
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
define(['marionette', 'underscore', 'vent', 'text!/tpl/MixTabHeaderView'], function(Marionette, _, vent, Template) {
var MixTabHeaderView;
MixTabHeaderView = (function(_super) {
__extends(MixTabHeaderView, _super);
function MixTabHeaderView() {
return MixTabHeaderView.__super__.constructor.apply(this, arguments);
}
MixTabHeaderView.prototype.template = _.template(Template);
MixTabHeaderView.prototype.initialize = function() {
return this.listenTo(vent, "mix:showlist", this.tabChanged);
};
MixTabHeaderView.prototype.tabChanged = function(options) {
$('#mix-tab li[id=li-' + options.order_by + ']', this.el).addClass('active');
return true;
};
return MixTabHeaderView;
})(Marionette.ItemView);
return MixTabHeaderView;
});
}).call(this);