From 054d08a26e91c3ac0d15d3506002a50b30d345ce Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 18 Jun 2012 18:57:15 -0700 Subject: Binding panel - Minor change on add button handler --- js/panels/binding-panel.reel/binding-panel.html | 2 +- js/panels/binding-panel.reel/binding-panel.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'js/panels') 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 @@
-
+
\ 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, { handleAddAction : { value: function(e) { - var newBindingArgs = { - sourceObject : this.application.ninja.objectsController.currentObject - }; + var sourceObject = this.application.ninja.objectsController.currentObject; - this.displayEditView(newBindingArgs); + if(sourceObject) { + this.displayEditView({ + sourceObject: sourceObject + }); + } else { + this.displayEditView(); + } } }, -- cgit v1.2.3