From a5387d3cc74350dd06ecab2c8524d63d7540e57f Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 4 Jun 2012 16:37:09 -0700 Subject: Binding Panel - Add edit view --- js/panels/binding/binding-item.reel/binding-item.html | 1 + js/panels/binding/binding-item.reel/binding-item.js | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'js/panels/binding/binding-item.reel') diff --git a/js/panels/binding/binding-item.reel/binding-item.html b/js/panels/binding/binding-item.reel/binding-item.html index 79644a7a..95a349f8 100644 --- a/js/panels/binding/binding-item.reel/binding-item.html +++ b/js/panels/binding/binding-item.reel/binding-item.html @@ -14,6 +14,7 @@ "prototype": "js/panels/binding/binding-item.reel", "properties": { "element": {"#": "binding-item"}, + "editButton": {"@": "editButton" }, "directionToggleButton": {"@": "directionToggleButton" } } }, diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index 0fc06ea8..294e8d35 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js @@ -82,6 +82,12 @@ exports.BindingItem = Montage.create(Component, { } }, + handleEditButtonAction : { + value: function(e) { + this.parentComponent.parentComponent.displayEditView(); + } + }, + /* -------------- Component Draw Cycle -------------- */ templateDidLoad : { -- cgit v1.2.3 From 9274b3959384d21809c992f6f2e7860eb1682e06 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Tue, 5 Jun 2012 12:08:32 -0700 Subject: Binding Panel - Add getPropertyList and fix null currentObject --- js/panels/binding/binding-item.reel/binding-item.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'js/panels/binding/binding-item.reel') diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js index 294e8d35..55230fc3 100644 --- a/js/panels/binding/binding-item.reel/binding-item.js +++ b/js/panels/binding/binding-item.reel/binding-item.js @@ -20,8 +20,10 @@ exports.BindingItem = Montage.create(Component, { set: function(value) { if(value === this._sourceObject) { return; } - this.sourceObjectLabel = value.identifier; - + if(value && value.identifier) { + this.sourceObjectLabel = value.identifier; + } + this._sourceObject = value; } }, @@ -33,7 +35,9 @@ exports.BindingItem = Montage.create(Component, { set: function(value) { if(value === this._boundObject) { return; } - this.boundObjectLabel = value.identifier; + if(value && value.identifier) { + this.boundObjectLabel = value.identifier; + } this._boundObject = value; } -- cgit v1.2.3