mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 09:36:19 -05:00
Merge pull request #3694 from riking/patch-9
FIX: Badge SQL controls would never show up, needed refresh
This commit is contained in:
commit
01406c65a6
2 changed files with 9 additions and 5 deletions
|
@ -16,6 +16,15 @@ export default Ember.Controller.extend(BufferedContent, {
|
|||
showDisplayName: propertyNotEqual('name', 'displayName'),
|
||||
canEditDescription: Em.computed.none('buffered.translatedDescription'),
|
||||
|
||||
hasQuery: function() {
|
||||
const bQuery = this.get('buffered.query');
|
||||
if (bQuery) {
|
||||
return bQuery.trim().length > 0;
|
||||
}
|
||||
const mQuery = this.get('model.query');
|
||||
return mQuery && mQuery.trim().length > 0;
|
||||
}.property('model.query', 'buffered.query'),
|
||||
|
||||
_resetSaving: function() {
|
||||
this.set('saving', false);
|
||||
this.set('savingStatus', '');
|
||||
|
|
|
@ -5,11 +5,6 @@ const Badge = RestModel.extend({
|
|||
|
||||
newBadge: Em.computed.none('id'),
|
||||
|
||||
hasQuery: function(){
|
||||
const query = this.get('query');
|
||||
return query && query.trim().length > 0;
|
||||
}.property('query'),
|
||||
|
||||
/**
|
||||
@private
|
||||
|
||||
|
|
Loading…
Reference in a new issue