/** This view handles rendering of a button in a drop down @class DropdownButtonView @extends Discourse.View @namespace Discourse @module Discourse **/ Discourse.DropdownButtonView = Discourse.View.extend({ classNames: ['btn-group'], attributeBindings: ['data-not-implemented'], didInsertElement: function(e) { var _this = this; return this.$('ul li').on('click', function(e) { e.preventDefault(); _this.clicked($(e.currentTarget).data('id')); return false; }); }, clicked: function(id) { return null; }, textChanged: function() { this.rerender(); }.observes('text', 'longDescription'), render: function(buffer) { var desc; buffer.push("

" + this.get('title') + "

"); buffer.push(""); buffer.push(""); if (desc = this.get('longDescription')) { buffer.push("

"); buffer.push(desc); buffer.push("

"); } } });