This commit is contained in:
Benjamin Kampmann 2014-07-15 15:35:16 +02:00
parent ac3f1ba3d6
commit 6710637904
1 changed files with 2 additions and 2 deletions

View File

@ -26,14 +26,14 @@ export default Ember.Component.extend({
this.set("available", groups.filterBy("automatic", false)); this.set("available", groups.filterBy("automatic", false));
}.bind(this)); }.bind(this));
this.refreshOnReset(); this._refreshOnReset();
}, },
_format: function(item){ _format: function(item){
return {"text": item.name, "id": item.id, "locked": item.automatic}; return {"text": item.name, "id": item.id, "locked": item.automatic};
}, },
refreshOnReset: function() { _refreshOnReset: function() {
this.$("input").select2("data", this.get("selected").map(this._format)); this.$("input").select2("data", this.get("selected").map(this._format));
}.observes("selected") }.observes("selected")
}); });