mirror of
https://github.com/fergalmoran/dss.git
synced 2026-02-05 07:34:13 +00:00
42 lines
1.5 KiB
JavaScript
Executable File
42 lines
1.5 KiB
JavaScript
Executable File
// Generated by CoffeeScript 1.6.2
|
|
(function() {
|
|
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
|
__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(['app', 'moment', 'app.lib/dssView', 'vent', 'text!/tpl/UserListItemView'], function(App, moment, DssView, vent, Template) {
|
|
var UserItemView, _ref;
|
|
|
|
UserItemView = (function(_super) {
|
|
__extends(UserItemView, _super);
|
|
|
|
function UserItemView() {
|
|
this.initialize = __bind(this.initialize, this); _ref = UserItemView.__super__.constructor.apply(this, arguments);
|
|
return _ref;
|
|
}
|
|
|
|
UserItemView.prototype.template = _.template(Template);
|
|
|
|
UserItemView.prototype.className = "row";
|
|
|
|
UserItemView.prototype.events = {
|
|
"click #follow-button": function() {
|
|
return vent.trigger("user:follow", this.model);
|
|
},
|
|
"click #follow-button-login": function() {
|
|
return vent.trigger("app:login", this.model);
|
|
}
|
|
};
|
|
|
|
UserItemView.prototype.initialize = function() {
|
|
return this.listenTo(this.model, 'change:is_following', this.render);
|
|
};
|
|
|
|
return UserItemView;
|
|
|
|
})(DssView);
|
|
return UserItemView;
|
|
});
|
|
|
|
}).call(this);
|