Last active
October 2, 2015 12:10
-
-
Save aalasolutions-zz/83e30bf53cffcc1c6d1b to your computer and use it in GitHub Desktop.
for sharing on https://embercommunity.slack.com/messages/general/stars/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tLeft: 'Select', // title for left element | |
tRight: 'Selected', // title for right box | |
items: null, // links | |
selected: null, // selected links will go here | |
label: null, | |
actions: { | |
addItemToGroup: function (item) { | |
var selected = this.get('selected'); | |
selected.pushObject(item); | |
item.set('hidden', 'hidden'); | |
}, | |
removeItemFromGroup: function (item) { | |
var selected = this.get('selected'); | |
selected.removeObject(item); | |
item.set('hidden', ''); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment