Merge pull request #3694 from riking/patch-9

FIX: Badge SQL controls would never show up, needed refresh
This commit is contained in:
Régis Hanol 2015-08-25 23:53:47 +02:00
commit 01406c65a6
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