mirror of
https://github.com/discourse/discourse.git
synced 2025-02-17 15:42:45 +08:00
Don't use a string buffer to refactor loading outlet
This commit is contained in:
parent
030bab92a2
commit
1e441522c0
|
@ -1,18 +1,19 @@
|
|||
import StringBuffer from 'discourse/mixins/string-buffer';
|
||||
|
||||
export default Ember.Component.extend(StringBuffer, {
|
||||
export default Ember.Component.extend({
|
||||
classNameBindings: ['containerClass'],
|
||||
rerenderTriggers: ['condition'],
|
||||
|
||||
containerClass: function() {
|
||||
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
|
||||
}.property('size'),
|
||||
|
||||
renderString: function(buffer) {
|
||||
render: function(buffer) {
|
||||
if (this.get('condition')) {
|
||||
buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
|
||||
} else {
|
||||
return this._super();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_conditionChanged: function() {
|
||||
this.rerender();
|
||||
}.observes('condition')
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user