aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding-panel.reel
diff options
context:
space:
mode:
authorEric Guzman2012-06-18 18:57:15 -0700
committerEric Guzman2012-06-18 18:57:15 -0700
commit054d08a26e91c3ac0d15d3506002a50b30d345ce (patch)
treeb3a829606cd6588e0d07464a481e8ff977c937d3 /js/panels/binding-panel.reel
parenta0079f570ce996cb5acbf050a7abb1df1ad788eb (diff)
downloadninja-054d08a26e91c3ac0d15d3506002a50b30d345ce.tar.gz
Binding panel - Minor change on add button handler
Diffstat (limited to 'js/panels/binding-panel.reel')
-rw-r--r--js/panels/binding-panel.reel/binding-panel.html2
-rw-r--r--js/panels/binding-panel.reel/binding-panel.js12
2 files changed, 9 insertions, 5 deletions
diff --git a/js/panels/binding-panel.reel/binding-panel.html b/js/panels/binding-panel.reel/binding-panel.html
index 9a2834c7..fc80cd6e 100644
--- a/js/panels/binding-panel.reel/binding-panel.html
+++ b/js/panels/binding-panel.reel/binding-panel.html
@@ -74,7 +74,7 @@
74 <div data-montage-id="binding-panel-toolbar-container" class="binding-panel-toolbar-container"> 74 <div data-montage-id="binding-panel-toolbar-container" class="binding-panel-toolbar-container">
75 <div data-montage-id="binding-panel-toolbar"></div> 75 <div data-montage-id="binding-panel-toolbar"></div>
76 </div> 76 </div>
77 <div data-montage-id="edit-binding-view" class="edit-binding-view"></div> 77 <div data-montage-id="edit-binding-view"></div>
78 </div> 78 </div>
79</body> 79</body>
80</html> \ No newline at end of file 80</html> \ No newline at end of file
diff --git a/js/panels/binding-panel.reel/binding-panel.js b/js/panels/binding-panel.reel/binding-panel.js
index 45fa4005..c040c009 100644
--- a/js/panels/binding-panel.reel/binding-panel.js
+++ b/js/panels/binding-panel.reel/binding-panel.js
@@ -64,11 +64,15 @@ exports.BindingPanel = Montage.create(Component, {
64 64
65 handleAddAction : { 65 handleAddAction : {
66 value: function(e) { 66 value: function(e) {
67 var newBindingArgs = { 67 var sourceObject = this.application.ninja.objectsController.currentObject;
68 sourceObject : this.application.ninja.objectsController.currentObject
69 };
70 68
71 this.displayEditView(newBindingArgs); 69 if(sourceObject) {
70 this.displayEditView({
71 sourceObject: sourceObject
72 });
73 } else {
74 this.displayEditView();
75 }
72 } 76 }
73 }, 77 },
74 78