aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding/binding-item.reel
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-05 12:55:44 -0700
committerArmen Kesablyan2012-06-05 12:55:44 -0700
commit5ecbbe908a5527dc42d461c8ddfd33b4c7e0ba4f (patch)
tree76d796ac65f603746a5618849fd891f835677ad5 /js/panels/binding/binding-item.reel
parentcd089f6692934a68bda7c303928a7c78dd13ac07 (diff)
parent9db979373f80162d463e23d400e97f37c75267d1 (diff)
downloadninja-5ecbbe908a5527dc42d461c8ddfd33b4c7e0ba4f.tar.gz
Merge branch 'binding' of https://github.com/dhg637/ninja-internal into binding
Diffstat (limited to 'js/panels/binding/binding-item.reel')
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.html1
-rw-r--r--js/panels/binding/binding-item.reel/binding-item.js16
2 files changed, 14 insertions, 3 deletions
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 @@
14 "prototype": "js/panels/binding/binding-item.reel", 14 "prototype": "js/panels/binding/binding-item.reel",
15 "properties": { 15 "properties": {
16 "element": {"#": "binding-item"}, 16 "element": {"#": "binding-item"},
17 "editButton": {"@": "editButton" },
17 "directionToggleButton": {"@": "directionToggleButton" } 18 "directionToggleButton": {"@": "directionToggleButton" }
18 } 19 }
19 }, 20 },
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js
index 0fc06ea8..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, {
20 set: function(value) { 20 set: function(value) {
21 if(value === this._sourceObject) { return; } 21 if(value === this._sourceObject) { return; }
22 22
23 this.sourceObjectLabel = value.identifier; 23 if(value && value.identifier) {
24 24 this.sourceObjectLabel = value.identifier;
25 }
26
25 this._sourceObject = value; 27 this._sourceObject = value;
26 } 28 }
27 }, 29 },
@@ -33,7 +35,9 @@ exports.BindingItem = Montage.create(Component, {
33 set: function(value) { 35 set: function(value) {
34 if(value === this._boundObject) { return; } 36 if(value === this._boundObject) { return; }
35 37
36 this.boundObjectLabel = value.identifier; 38 if(value && value.identifier) {
39 this.boundObjectLabel = value.identifier;
40 }
37 41
38 this._boundObject = value; 42 this._boundObject = value;
39 } 43 }
@@ -82,6 +86,12 @@ exports.BindingItem = Montage.create(Component, {
82 } 86 }
83 }, 87 },
84 88
89 handleEditButtonAction : {
90 value: function(e) {
91 this.parentComponent.parentComponent.displayEditView();
92 }
93 },
94
85 /* -------------- Component Draw Cycle -------------- */ 95 /* -------------- Component Draw Cycle -------------- */
86 96
87 templateDidLoad : { 97 templateDidLoad : {