From 04ef4ffcfde762a0aead4a7b702f3c019fdbeb69 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Thu, 31 May 2012 21:57:22 -0700 Subject: Binding Panel - Developed panel components. --- js/panels/binding-panel.reel/binding-panel.css | 11 +++++++++++ js/panels/binding-panel.reel/binding-panel.html | 26 ++++++++++++++++++++++++- js/panels/binding-panel.reel/binding-panel.js | 14 +++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) (limited to 'js/panels/binding-panel.reel') 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 @@ +/* + This file contains proprietary software owned by Motorola Mobility, Inc.
+ No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
+ (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. +
*/ + + +.bindings-list { + padding: 0; + margin: 0; +} \ 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 @@ "properties": { "element": {"#": "binding"} } + }, + "arrayController": { + "prototype": "montage/ui/controller/array-controller", + "bindings": { + "content" : {"<-": "@owner.bindings" } + } + }, + "repetition": { + "prototype": "montage/ui/repetition.reel", + "properties": { + "element": {"#": "bindings-list"}, + "contentController": {"@": "arrayController"} + } + }, + "bindingItem": { + "prototype": "js/panels/binding/binding-item.reel", + "properties": { + "element": {"#": "binding-item"} + }, + "bindings": { + "sourceObjectPropertyPath": {"<-": "@repetition.objectAtCurrentIteration.sourceObjectPropertyPath"} + } } } @@ -22,7 +44,9 @@
- this is a test +
\ 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, exports.BindingPanel = Montage.create(Component, { + bindings : { + value: null + }, + + templateDidLoad : { + value: function() { + Object.defineBinding(this, 'bindings', { + boundObject: this.application.ninja.objectsController, + boundObjectPropertyPath: "currentObjectBindings", + oneway: true + }); + } + }, + prepareForDraw: { value: function() { console.log("test- objects"); -- cgit v1.2.3 From 0f59ef2a4b78fbcee402255857e8355a67fa7e66 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Fri, 1 Jun 2012 12:53:24 -0700 Subject: Bindings Panel - Update binding panel components --- js/panels/binding-panel.reel/binding-panel.css | 2 +- js/panels/binding-panel.reel/binding-panel.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'js/panels/binding-panel.reel') diff --git a/js/panels/binding-panel.reel/binding-panel.css b/js/panels/binding-panel.reel/binding-panel.css index 8597a926..f29b66c1 100644 --- a/js/panels/binding-panel.reel/binding-panel.css +++ b/js/panels/binding-panel.reel/binding-panel.css @@ -8,4 +8,4 @@ .bindings-list { padding: 0; margin: 0; -} \ 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 d2e18e99..2850b67c 100644 --- a/js/panels/binding-panel.reel/binding-panel.html +++ b/js/panels/binding-panel.reel/binding-panel.html @@ -35,7 +35,11 @@ "element": {"#": "binding-item"} }, "bindings": { - "sourceObjectPropertyPath": {"<-": "@repetition.objectAtCurrentIteration.sourceObjectPropertyPath"} + "sourceObjectPropertyPath": {"<-": "@repetition.objectAtCurrentIteration.sourceObjectPropertyPath"}, + "sourceObject": {"<-": "@repetition.objectAtCurrentIteration.sourceObject"}, + "boundObjectPropertyPath": {"<-": "@repetition.objectAtCurrentIteration.boundObjectPropertyPath"}, + "boundObject": {"<-": "@repetition.objectAtCurrentIteration.boundObject"}, + "oneway": {"<-": "@repetition.objectAtCurrentIteration.oneway"} } } -- cgit v1.2.3