FIX: Badge SQL controls would never show up, needed refresh

This commit is contained in:
Kane York 2015-08-25 13:30:09 -07:00
parent fd28d4c978
commit 633c175a8a
2 changed files with 9 additions and 5 deletions

View File

@ -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', '');

View File

@ -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