aboutsummaryrefslogtreecommitdiff
path: root/js/panels/binding-panel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/binding-panel.reel')
-rw-r--r--js/panels/binding-panel.reel/binding-panel.css11
-rw-r--r--js/panels/binding-panel.reel/binding-panel.html26
-rw-r--r--js/panels/binding-panel.reel/binding-panel.js14
3 files changed, 50 insertions, 1 deletions
diff --git a/js/panels/binding-panel.reel/binding-panel.css b/js/panels/binding-panel.reel/binding-panel.css
index e69de29b..8597a926 100644
--- a/js/panels/binding-panel.reel/binding-panel.css
+++ b/js/panels/binding-panel.reel/binding-panel.css
@@ -0,0 +1,11 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7
8.bindings-list {
9 padding: 0;
10 margin: 0;
11} \ No newline at end of file
diff --git a/js/panels/binding-panel.reel/binding-panel.html b/js/panels/binding-panel.reel/binding-panel.html
index 0db7b95f..d2e18e99 100644
--- a/js/panels/binding-panel.reel/binding-panel.html
+++ b/js/panels/binding-panel.reel/binding-panel.html
@@ -15,6 +15,28 @@
15 "properties": { 15 "properties": {
16 "element": {"#": "binding"} 16 "element": {"#": "binding"}
17 } 17 }
18 },
19 "arrayController": {
20 "prototype": "montage/ui/controller/array-controller",
21 "bindings": {
22 "content" : {"<-": "@owner.bindings" }
23 }
24 },
25 "repetition": {
26 "prototype": "montage/ui/repetition.reel",
27 "properties": {
28 "element": {"#": "bindings-list"},
29 "contentController": {"@": "arrayController"}
30 }
31 },
32 "bindingItem": {
33 "prototype": "js/panels/binding/binding-item.reel",
34 "properties": {
35 "element": {"#": "binding-item"}
36 },
37 "bindings": {
38 "sourceObjectPropertyPath": {"<-": "@repetition.objectAtCurrentIteration.sourceObjectPropertyPath"}
39 }
18 } 40 }
19 41
20 } 42 }
@@ -22,7 +44,9 @@
22 </head> 44 </head>
23<body> 45<body>
24 <div data-montage-id="binding"> 46 <div data-montage-id="binding">
25 this is a test 47 <ul data-montage-id="bindings-list" class="bindings-list">
48 <li data-montage-id="binding-item" class="binding-item"></li>
49 </ul>
26 </div> 50 </div>
27</body> 51</body>
28</html> \ No newline at end of file 52</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 03fe5723..9fdec416 100644
--- a/js/panels/binding-panel.reel/binding-panel.js
+++ b/js/panels/binding-panel.reel/binding-panel.js
@@ -4,6 +4,20 @@ var Montage = require("montage/core/core").Montage,
4 4
5exports.BindingPanel = Montage.create(Component, { 5exports.BindingPanel = Montage.create(Component, {
6 6
7 bindings : {
8 value: null
9 },
10
11 templateDidLoad : {
12 value: function() {
13 Object.defineBinding(this, 'bindings', {
14 boundObject: this.application.ninja.objectsController,
15 boundObjectPropertyPath: "currentObjectBindings",
16 oneway: true
17 });
18 }
19 },
20
7 prepareForDraw: { 21 prepareForDraw: {
8 value: function() { 22 value: function() {
9 console.log("test- objects"); 23 console.log("test- objects");