Last active
January 3, 2016 14:09
-
-
Save tamebadger/8474080 to your computer and use it in GitHub Desktop.
Hack into Ember Controllers/Views
This file contains 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
var applicationViewInstance = Ember.View.views[info.GroupID]; | |
var treeNodeController = applicationViewInstance["controller"]; | |
var node = { | |
text: info.Name, | |
has_children: true, | |
type: "root", | |
"attr":{"type":"Folder","id":info.GroupID}}; | |
treeNodeController.send('toggleFromOutside',node); | |
var groupID = this.CurrentGroupID; | |
var applicationViewInstance = Ember.View.views[groupID]; | |
var treeNodeController = applicationViewInstance["controller"]; | |
var node = { | |
text: "UpNode", | |
has_children: true, | |
type: "root", | |
"attr":{"type":"Folder","id":groupID} | |
}; | |
treeNodeController.send('toggleFromOutside',node); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment