mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06: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({
|
||||||
|
|
||||||
export default Ember.Component.extend(StringBuffer, {
|
|
||||||
classNameBindings: ['containerClass'],
|
classNameBindings: ['containerClass'],
|
||||||
rerenderTriggers: ['condition'],
|
|
||||||
|
|
||||||
containerClass: function() {
|
containerClass: function() {
|
||||||
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
|
return (this.get('size') === 'small') ? 'inline-spinner' : undefined;
|
||||||
}.property('size'),
|
}.property('size'),
|
||||||
|
|
||||||
renderString: function(buffer) {
|
render: function(buffer) {
|
||||||
if (this.get('condition')) {
|
if (this.get('condition')) {
|
||||||
buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
|
buffer.push('<div class="spinner ' + this.get('size') + '"}}></div>');
|
||||||
} else {
|
} else {
|
||||||
return this._super();
|
return this._super();
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
_conditionChanged: function() {
|
||||||
|
this.rerender();
|
||||||
|
}.observes('condition')
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user