From a5387d3cc74350dd06ecab2c8524d63d7540e57f Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 4 Jun 2012 16:37:09 -0700
Subject: Binding Panel - Add edit view
---
.../binding/binding-item.reel/binding-item.html | 1 +
.../binding/binding-item.reel/binding-item.js | 6 ++
.../edit-binding-view.reel/edit-binding-view.css | 36 +++++++
.../edit-binding-view.reel/edit-binding-view.html | 103 +++++++++++++++++++++
.../edit-binding-view.reel/edit-binding-view.js | 21 +++++
5 files changed, 167 insertions(+)
create mode 100644 js/panels/binding/edit-binding-view.reel/edit-binding-view.css
create mode 100644 js/panels/binding/edit-binding-view.reel/edit-binding-view.html
create mode 100644 js/panels/binding/edit-binding-view.reel/edit-binding-view.js
(limited to 'js/panels/binding')
diff --git a/js/panels/binding/binding-item.reel/binding-item.html b/js/panels/binding/binding-item.reel/binding-item.html
index 79644a7a..95a349f8 100644
--- a/js/panels/binding/binding-item.reel/binding-item.html
+++ b/js/panels/binding/binding-item.reel/binding-item.html
@@ -14,6 +14,7 @@
"prototype": "js/panels/binding/binding-item.reel",
"properties": {
"element": {"#": "binding-item"},
+ "editButton": {"@": "editButton" },
"directionToggleButton": {"@": "directionToggleButton" }
}
},
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js
index 0fc06ea8..294e8d35 100644
--- a/js/panels/binding/binding-item.reel/binding-item.js
+++ b/js/panels/binding/binding-item.reel/binding-item.js
@@ -82,6 +82,12 @@ exports.BindingItem = Montage.create(Component, {
}
},
+ handleEditButtonAction : {
+ value: function(e) {
+ this.parentComponent.parentComponent.displayEditView();
+ }
+ },
+
/* -------------- Component Draw Cycle -------------- */
templateDidLoad : {
diff --git a/js/panels/binding/edit-binding-view.reel/edit-binding-view.css b/js/panels/binding/edit-binding-view.reel/edit-binding-view.css
new file mode 100644
index 00000000..b0249c6c
--- /dev/null
+++ b/js/panels/binding/edit-binding-view.reel/edit-binding-view.css
@@ -0,0 +1,36 @@
+/*
+ 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.
+ */
+
+.edit-binding-view {
+ background: #474747;
+ color: #FFF;
+ font-size: 11px;
+ height: 100%;
+ /*left: 100%;*/
+ /*position: absolute;*/
+ /*top: 0;*/
+ width: 100%;
+ -webkit-transition: -webkit-transform 140ms ease-in;
+}
+
+.edit-binding-view ul {
+ padding: 0;
+ margin: 0;
+}
+
+.edit-binding-view li {
+ padding: 3px;
+ list-style-type: none;
+}
+
+/* hintable fields */
+
+.so-pp, .bo-pp {
+ border: 1px solid #313131;
+ padding: 1px 4px;
+ background-color: #444;
+ margin-left: 5px;
+}
\ No newline at end of file
diff --git a/js/panels/binding/edit-binding-view.reel/edit-binding-view.html b/js/panels/binding/edit-binding-view.reel/edit-binding-view.html
new file mode 100644
index 00000000..1d502a3e
--- /dev/null
+++ b/js/panels/binding/edit-binding-view.reel/edit-binding-view.html
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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
new file mode 100644
index 00000000..700f3024
--- /dev/null
+++ b/js/panels/binding/edit-binding-view.reel/edit-binding-view.js
@@ -0,0 +1,21 @@
+/*
+ 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.
+ */
+
+var Montage = require("montage/core/core").Montage,
+ Component = require("montage/ui/component").Component;
+
+
+exports.EditBindingView = Montage.create(Component, {
+ objectsList : {
+ value: ["Object1", "Object2", "Object3"]
+ },
+
+ prepareForDraw : {
+ value: function() {
+ console.log("Preparing to draw edit view");
+ }
+ }
+});
\ No newline at end of file
--
cgit v1.2.3
From 9274b3959384d21809c992f6f2e7860eb1682e06 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Tue, 5 Jun 2012 12:08:32 -0700
Subject: Binding Panel - Add getPropertyList and fix null currentObject
---
js/panels/binding/binding-item.reel/binding-item.js | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
(limited to 'js/panels/binding')
diff --git a/js/panels/binding/binding-item.reel/binding-item.js b/js/panels/binding/binding-item.reel/binding-item.js
index 294e8d35..55230fc3 100644
--- a/js/panels/binding/binding-item.reel/binding-item.js
+++ b/js/panels/binding/binding-item.reel/binding-item.js
@@ -20,8 +20,10 @@ exports.BindingItem = Montage.create(Component, {
set: function(value) {
if(value === this._sourceObject) { return; }
- this.sourceObjectLabel = value.identifier;
-
+ if(value && value.identifier) {
+ this.sourceObjectLabel = value.identifier;
+ }
+
this._sourceObject = value;
}
},
@@ -33,7 +35,9 @@ exports.BindingItem = Montage.create(Component, {
set: function(value) {
if(value === this._boundObject) { return; }
- this.boundObjectLabel = value.identifier;
+ if(value && value.identifier) {
+ this.boundObjectLabel = value.identifier;
+ }
this._boundObject = value;
}
--
cgit v1.2.3