diff options
author | Eric Guzman | 2012-06-08 15:57:08 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-08 15:57:08 -0700 |
commit | d7e39dd2ff310b9f05676b7de49756036ab03514 (patch) | |
tree | e2172344da9dce58f11cb72ebc8cc63242a6494b /js/panels/binding/edit-binding-view.reel/edit-binding-view.js | |
parent | 6a27268ebf1cd5fa7bf8313eb5712fd5f6985758 (diff) | |
download | ninja-d7e39dd2ff310b9f05676b7de49756036ab03514.tar.gz |
Binding Panel - Update edit view - populate binding arguments
Diffstat (limited to 'js/panels/binding/edit-binding-view.reel/edit-binding-view.js')
-rw-r--r-- | js/panels/binding/edit-binding-view.reel/edit-binding-view.js | 73 |
1 files changed, 71 insertions, 2 deletions
diff --git a/js/panels/binding/edit-binding-view.reel/edit-binding-view.js b/js/panels/binding/edit-binding-view.reel/edit-binding-view.js index 700f3024..1cef8f5e 100644 --- a/js/panels/binding/edit-binding-view.reel/edit-binding-view.js +++ b/js/panels/binding/edit-binding-view.reel/edit-binding-view.js | |||
@@ -9,8 +9,77 @@ var Montage = require("montage/core/core").Montage, | |||
9 | 9 | ||
10 | 10 | ||
11 | exports.EditBindingView = Montage.create(Component, { | 11 | exports.EditBindingView = Montage.create(Component, { |
12 | objectsList : { | 12 | |
13 | value: ["Object1", "Object2", "Object3"] | 13 | /* ------------------- |
14 | Binding Properties | ||
15 | ------------------- */ | ||
16 | |||
17 | sourceObjectIdentifier : { | ||
18 | value: "", | ||
19 | distinct: true | ||
20 | }, | ||
21 | sourceObjectPropertyPath : { | ||
22 | value: "", | ||
23 | distinct: true | ||
24 | }, | ||
25 | boundObjectIdentifier : { | ||
26 | value: "", | ||
27 | distinct: true | ||
28 | }, | ||
29 | boundObjectPropertyPath : { | ||
30 | value: "", | ||
31 | distinct: true | ||
32 | }, | ||
33 | _oneway: { | ||
34 | value: null | ||
35 | }, | ||
36 | oneway: { | ||
37 | get: function() { | ||
38 | return this._oneway; | ||
39 | }, | ||
40 | set: function(value) { | ||
41 | if(value === this._oneway) { return; } | ||
42 | |||
43 | this._oneway = !!value; | ||
44 | |||
45 | this.needsDraw = true; | ||
46 | } | ||
47 | }, | ||
48 | |||
49 | /* ------------------- | ||
50 | Binding Args Object | ||
51 | ------------------- */ | ||
52 | |||
53 | _bindingArgs : { | ||
54 | value: null | ||
55 | }, | ||
56 | bindingArgs :{ | ||
57 | get: function() { | ||
58 | return this._bindingArgs; | ||
59 | }, | ||
60 | set: function(value) { | ||
61 | if(value === this._bindingArgs) { return; } | ||
62 | |||
63 | this._bindingArgs = value; | ||
64 | |||
65 | this.sourceObjectIdentifier = value.sourceObject.identifier; | ||
66 | this.sourceObjectPropertyPath = value.sourceObjectPropertyPath; | ||
67 | this.boundObjectIdentifier = value.boundObject.identifier; | ||
68 | this.boundObjectPropertyPath = value.boundObjectPropertyPath; | ||
69 | this.oneway = value.oneway; | ||
70 | |||
71 | this.needsDraw = true; | ||
72 | } | ||
73 | }, | ||
74 | |||
75 | /* ------------------- | ||
76 | Save/Close button handlers | ||
77 | ------------------- */ | ||
78 | |||
79 | handleCloseButtonAction : { | ||
80 | value: function(e) { | ||
81 | this.parentComponent.editing = false; | ||
82 | } | ||
14 | }, | 83 | }, |
15 | 84 | ||
16 | prepareForDraw : { | 85 | prepareForDraw : { |