From a40184e08a7ee2f189f133fd7bd83480e4bfc7f2 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Wed, 16 May 2012 22:19:34 -0700 Subject: Objects Panel - Add object component --- .../objects/objects-panel.reel/objects-panel.css | 37 ++++++++++++ .../objects/objects-panel.reel/objects-panel.html | 70 ++++++++++++++++++++++ .../objects/objects-panel.reel/objects-panel.js | 53 ++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.css create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.html create mode 100644 js/panels/objects/objects-panel.reel/objects-panel.js (limited to 'js/panels/objects/objects-panel.reel') diff --git a/js/panels/objects/objects-panel.reel/objects-panel.css b/js/panels/objects/objects-panel.reel/objects-panel.css new file mode 100644 index 00000000..3fa3c479 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.css @@ -0,0 +1,37 @@ +/* + 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 { + margin: 10px 0 0 0; + padding: 0; +} +.objects-list .list-item { + list-style-type: none; + float: left; +} +.object-icon { + background-color: #fff; + border: 1px solid #353535; + border-radius: 5px; + height: 50px; + margin: 0 15px 5px; + width: 50px; +} +.object-label { + color: #fff; + display: block; + text-align: center; +} \ No newline at end of file diff --git a/js/panels/objects/objects-panel.reel/objects-panel.html b/js/panels/objects/objects-panel.reel/objects-panel.html new file mode 100644 index 00000000..d68a59c0 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.html @@ -0,0 +1,70 @@ + + + + + + + + + + + + + +
+ +
+ + + diff --git a/js/panels/objects/objects-panel.reel/objects-panel.js b/js/panels/objects/objects-panel.reel/objects-panel.js new file mode 100644 index 00000000..a1c381a2 --- /dev/null +++ b/js/panels/objects/objects-panel.reel/objects-panel.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.ObjectsPanel = 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