This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/views/button_view.js

22 lines
659 B
JavaScript

(function() {
Discourse.ButtonView = Ember.View.extend(Discourse.Presence, {
tagName: 'button',
classNameBindings: [':btn', ':standard', 'dropDownToggle'],
attributeBindings: ['data-not-implemented', 'title', 'data-toggle', 'data-share-url'],
title: (function() {
return Em.String.i18n(this.get('helpKey') || this.get('textKey'));
}).property('helpKey'),
text: (function() {
return Em.String.i18n(this.get('textKey'));
}).property('textKey'),
render: function(buffer) {
if (this.renderIcon) {
this.renderIcon(buffer);
}
return buffer.push(this.get('text'));
}
});
}).call(this);