From d6c427432bd0040b084b854407e9ed59a6707b54 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Fri, 15 Jun 2012 15:00:06 -0700
Subject: Objects Tray - Add objects tray to binding view
---
js/stage/binding-view.reel/binding-view.css | 11 ++++++
js/stage/binding-view.reel/binding-view.html | 25 +++---------
js/stage/objects-tray.reel/objects-tray.css | 33 ++++++++++++++++
js/stage/objects-tray.reel/objects-tray.html | 58 ++++++++++++++++++++++++++++
js/stage/objects-tray.reel/objects-tray.js | 53 +++++++++++++++++++++++++
5 files changed, 161 insertions(+), 19 deletions(-)
create mode 100644 js/stage/objects-tray.reel/objects-tray.css
create mode 100644 js/stage/objects-tray.reel/objects-tray.html
create mode 100644 js/stage/objects-tray.reel/objects-tray.js
(limited to 'js/stage')
diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css
index 7f5de0b8..7ec31edf 100755
--- a/js/stage/binding-view.reel/binding-view.css
+++ b/js/stage/binding-view.reel/binding-view.css
@@ -5,6 +5,7 @@
*/
.bindingView {
+ height: 100%;
position: absolute;
width:100%;
z-index: 12;
@@ -22,4 +23,14 @@
height:100%;
position:absolute;
z-index: 1;
+}
+
+.objects-tray-container {
+ bottom: 11px;
+ position: absolute;
+ width: 100%;
+ display: -webkit-box;
+ -webkit-box-orient: horizontal;
+ -webkit-box-pack: center;
+ -webkit-box-align: center;
}
\ No newline at end of file
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html
index c7520132..5fb7affd 100755
--- a/js/stage/binding-view.reel/binding-view.html
+++ b/js/stage/binding-view.reel/binding-view.html
@@ -43,23 +43,10 @@
}
]
},
- "nonVisualRepeater": {
- "prototype": "montage/ui/repetition.reel",
- "properties": {
- "element": {"#": "nonVisualRepeater"}
- },
- "bindings": {
- "objects": {"<-": "@owner.nonVisualComponents"}
- }
- },
- "objectIcon": {
- "prototype": "js/panels/objects/object.reel",
+ "objectsTray" : {
+ "prototype": "js/stage/objects-tray.reel",
"properties": {
- "element": {"#": "nonVisualComponent"}
- },
- "bindings": {
- "sourceObject": {"<-": "@nonVisualRepeater.objectAtCurrentIteration"},
- "identifier": {"<-": "@nonVisualRepeater.objectAtCurrentIteration.identifier"}
+ "element": {"#": "objects-tray" }
}
}
}
@@ -75,11 +62,11 @@
-
-
-
+
+
diff --git a/js/stage/objects-tray.reel/objects-tray.css b/js/stage/objects-tray.reel/objects-tray.css
new file mode 100644
index 00000000..422d6a8f
--- /dev/null
+++ b/js/stage/objects-tray.reel/objects-tray.css
@@ -0,0 +1,33 @@
+/*
+ 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.
+ */
+
+/*
+
+
+
+*/
+
+.objects-list {
+ font-size: 11px;
+ margin: 10px 0 0 0;
+ padding: 0;
+ text-shadow: -1px -1px 0 #4D4D4D;
+}
+
+.objects-tray {
+ background-color: rgba(0,0,0,.6);
+ border-top-right-radius: 8px;
+ border-top-left-radius: 8px;
+ box-shadow: inset 0 0 3px #333;
+ padding: 0 10px 5px;
+ margin: 0 auto;
+ overflow: hidden;
+ -webkit-box-flex: 0;
+}
\ No newline at end of file
diff --git a/js/stage/objects-tray.reel/objects-tray.html b/js/stage/objects-tray.reel/objects-tray.html
new file mode 100644
index 00000000..0fece3fe
--- /dev/null
+++ b/js/stage/objects-tray.reel/objects-tray.html
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js
new file mode 100644
index 00000000..ee1ecd06
--- /dev/null
+++ b/js/stage/objects-tray.reel/objects-tray.js
@@ -0,0 +1,53 @@
+/*
+ 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.
+ */
+
+/**
+ @requires montage/core/core
+ @requires montage/ui/component
+ */
+var Montage = require("montage/core/core").Montage,
+ Component = require("montage/ui/component").Component;
+
+exports.ObjectsTray = Montage.create(Component, {
+ _objects: { value: null },
+ objects: {
+ get: function() {
+ return this._objects;
+ },
+ set: function(value) {
+ this._objects = value;
+ this.needsDraw = true;
+ }
+ },
+
+
+ templateDidLoad: {
+ value: function() {
+ console.log('objects panel loaded');
+ }
+ },
+
+ prepareForDraw : {
+ value: function() {
+
+ Object.defineBinding(this, 'objects', {
+ "boundObject": this.application.ninja.objectsController,
+ "boundObjectPropertyPath": "objects",
+ "oneway": true
+ });
+
+ }
+ },
+ draw : {
+ value: function() {
+ console.log("objects panel draw");
+ if(this.objects) {
+
+ }
+ }
+ }
+
+});
\ No newline at end of file
--
cgit v1.2.3