// Generated by CoffeeScript 1.4.0 (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', 'app.lib/realtimeController', 'text!/tpl/ChatView'], function(Marionette, RealtimeController, Template) { var ChatView; ChatView = (function(_super) { var controller; __extends(ChatView, _super); function ChatView() { return ChatView.__super__.constructor.apply(this, arguments); } controller = new RealtimeController(); ChatView.prototype.template = _.template(Template); ChatView.prototype.ui = { chatMessage: '#chat-message' }; ChatView.prototype.events = { "click #chat-send": "sendChatMessage" }; ChatView.prototype.sendChatMessage = function() { var message; console.log("ChatView: sendChatMessage"); message = this.ui.chatMessage.val(); if (message) { return controller.sendMessage(message); } }; return ChatView; })(Marionette.ItemView); return ChatView; }); }).call(this);