FIX: selectively disappear invite search box

This commit is contained in:
Arpit Jalan 2014-07-09 02:46:47 +05:30
parent 04e5c59598
commit eea3884e14
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ export default Ember.ObjectController.extend({
init: function() {
this._super();
this.set('searchTerm', '');
this.set('totalInvites', '');
},
uploadText: function() { return I18n.t("user.invited.bulk_invite.text"); }.property(),
@ -59,8 +60,8 @@ export default Ember.ObjectController.extend({
@property showSearch
**/
showSearch: function() {
return this.get('invites.length') > 9;
}.property(),
return this.get('totalInvites') > 9;
}.property('totalInvites'),
/**
Were the results limited by our `maxInvites`

View File

@ -19,7 +19,8 @@ Discourse.UserInvitedRoute = Discourse.Route.extend({
controller.setProperties({
model: model,
user: this.controllerFor('user').get('model'),
searchTerm: ''
searchTerm: '',
totalInvites: model.invites.length
});
this.controllerFor('user').set('indexStream', false);
},