From 1433f2bdf2e5b8c5c18fed5e9c17fd983ab3606d Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Fri, 2 Mar 2012 10:55:51 -0800
Subject: CSS Panel - Updating components, created toolbar components, and
small changes to styles controller
---
js/components/toolbar.reel/toolbar.css | 14 ++++++++++++++
js/components/toolbar.reel/toolbar.html | 34 +++++++++++++++++++++++++++++++++
js/components/toolbar.reel/toolbar.js | 27 ++++++++++++++++++++++++++
3 files changed, 75 insertions(+)
create mode 100644 js/components/toolbar.reel/toolbar.css
create mode 100644 js/components/toolbar.reel/toolbar.html
create mode 100644 js/components/toolbar.reel/toolbar.js
(limited to 'js/components')
diff --git a/js/components/toolbar.reel/toolbar.css b/js/components/toolbar.reel/toolbar.css
new file mode 100644
index 00000000..1ffae912
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.css
@@ -0,0 +1,14 @@
+/*
+ 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.
+ */
+.toolbar-container {
+ background-color: #474747;
+ border-bottom: 1px solid #333;
+ border-top: 1px solid #505050;
+ box-shadow: 0 4px 8px 0px rgba(0,0,0,0.75);
+ height: 22px;
+ width: 100%;
+ -webkit-box-flex: 0;
+}
\ No newline at end of file
diff --git a/js/components/toolbar.reel/toolbar.html b/js/components/toolbar.reel/toolbar.html
new file mode 100644
index 00000000..8ccce126
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/components/toolbar.reel/toolbar.js b/js/components/toolbar.reel/toolbar.js
new file mode 100644
index 00000000..79e7ff1f
--- /dev/null
+++ b/js/components/toolbar.reel/toolbar.js
@@ -0,0 +1,27 @@
+/*
+ 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.Toolbar = Montage.create(Component, {
+
+ deserializedFromTemplate : {
+ value: function() {
+ console.log("toolbar - deserialized");
+ }
+ },
+ prepareForDraw : {
+ value: function() {
+ console.log("toolbar - prepare for draw");
+ }
+ },
+ draw : {
+ value: function() {
+ console.log("toolbar - draw");
+ }
+ }
+});
\ No newline at end of file
--
cgit v1.2.3
From ec862af55e5c3d564b37eac2744a1a6815f81f4d Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 12 Mar 2012 15:28:40 -0700
Subject: Tree Node Component - Added method for handling source object set
---
js/components/treeview/tree-node.js | 4 ++++
1 file changed, 4 insertions(+)
(limited to 'js/components')
diff --git a/js/components/treeview/tree-node.js b/js/components/treeview/tree-node.js
index d7b864b5..fa6e1ba4 100644
--- a/js/components/treeview/tree-node.js
+++ b/js/components/treeview/tree-node.js
@@ -52,6 +52,10 @@ exports.TreeNode = Montage.create(Component, {
}, this);
}
this._sourceObject = object;
+
+ if(this.handleSourceObjectSet) {
+ this.handleSourceObjectSet();
+ }
}
},
childNodes : {
--
cgit v1.2.3
From 30e3f3d6c19025c37694127ac148146277681994 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Tue, 3 Apr 2012 14:43:52 -0700
Subject: CSS Panel - Stylesheet edit mode
---
js/components/toolbar.reel/toolbar.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'js/components')
diff --git a/js/components/toolbar.reel/toolbar.html b/js/components/toolbar.reel/toolbar.html
index 8ccce126..69eba194 100644
--- a/js/components/toolbar.reel/toolbar.html
+++ b/js/components/toolbar.reel/toolbar.html
@@ -18,7 +18,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
}
},
"button": {
- "module": "js/components/button.reel",
+ "module": "montage/ui/button.reel",
"name": "Button",
"properties": {
--
cgit v1.2.3
From 7246efab402664c75bd0de226c0b9a91b384839b Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Wed, 11 Apr 2012 16:45:23 -0700
Subject: CSS Style - Add disabled UI state. Added Hintable and editable UI
state.
---
js/components/editable.reel/editable.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'js/components')
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index 9c8946c4..ef4096fd 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -122,7 +122,7 @@ exports.Editable = Montage.create(Component, {
if(this.stopOnBlur) {
console.log('adding mousedown event listener');
///// Simulate blur on editable node by listening to the doc
- document.addEventListener('mouseup', this, false);
+ document.addEventListener('mousedown', this, false);
}
this._sendEvent('start');
@@ -179,7 +179,7 @@ exports.Editable = Montage.create(Component, {
this.accept();
}
this.stop();
- document.removeEventListener('mouseup', this, false);
+ document.removeEventListener('mousedown', this, false);
this._sendEvent('blur');
}
},
@@ -202,7 +202,7 @@ exports.Editable = Montage.create(Component, {
this._sendEvent('input');
}
},
- handleMouseup : {
+ handleMousedown : {
value : function(e) {
console.log('handle mouse down');
///// Listen for simulated blur event
--
cgit v1.2.3
From 0e1f95945434475adbf33b2073b6f8d7240aca91 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 23 Apr 2012 11:46:14 -0700
Subject: Editable - Pass event data with stop event
---
js/components/editable.reel/editable.js | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
(limited to 'js/components')
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js
index ef4096fd..1ebe33f1 100644
--- a/js/components/editable.reel/editable.js
+++ b/js/components/editable.reel/editable.js
@@ -131,11 +131,11 @@ exports.Editable = Montage.create(Component, {
}
},
stop : {
- value: function() {
+ value: function(eventData) {
this._isEditable = this._element.contentEditable = false;
this._element.classList.remove(this.editingClass);
- this._sendEvent('stop');
+ this._sendEvent('stop', eventData);
///// if value is different than pre-edit val, call onchange method
if(this._preEditValue !== this.value) {
@@ -174,11 +174,11 @@ exports.Editable = Montage.create(Component, {
}
},
blur : {
- value : function() {
+ value : function(eventData) {
if(this._hint) {
this.accept();
}
- this.stop();
+ this.stop(eventData);
document.removeEventListener('mousedown', this, false);
this._sendEvent('blur');
}
@@ -207,7 +207,10 @@ exports.Editable = Montage.create(Component, {
console.log('handle mouse down');
///// Listen for simulated blur event
if(this.stopOnBlur && e._event.target !== this._element) {
- this.blur();
+ this.blur({
+ "originalEventType": "mousedown",
+ "originalEvent": e
+ });
}
}
},
@@ -221,9 +224,9 @@ exports.Editable = Montage.create(Component, {
}
},
_sendEvent : {
- value : function(type) {
+ value : function(type, data) {
var evt = document.createEvent("CustomEvent");
- evt.initCustomEvent(type, true, true);
+ evt.initCustomEvent(type, true, true, data);
this.dispatchEvent(evt);
}
},
--
cgit v1.2.3
From 4cefebd99813f05713deb2f72bba0a035dfcb508 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 23 Apr 2012 11:46:54 -0700
Subject: Toolbar - Add buttons to toolbar component
---
js/components/toolbar.reel/toolbar.css | 39 ++++++++++++++++++++++++++++++
js/components/toolbar.reel/toolbar.html | 43 +++++++++++++++++++++++++++++++--
js/components/toolbar.reel/toolbar.js | 40 ++++++++++++++++++++++++++----
3 files changed, 115 insertions(+), 7 deletions(-)
(limited to 'js/components')
diff --git a/js/components/toolbar.reel/toolbar.css b/js/components/toolbar.reel/toolbar.css
index 1ffae912..e63b043e 100644
--- a/js/components/toolbar.reel/toolbar.css
+++ b/js/components/toolbar.reel/toolbar.css
@@ -3,12 +3,51 @@
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.
*/
+
+/*---------------------
+ Toolbar Container
+-----------------------*/
+
.toolbar-container {
background-color: #474747;
border-bottom: 1px solid #333;
border-top: 1px solid #505050;
box-shadow: 0 4px 8px 0px rgba(0,0,0,0.75);
height: 22px;
+ overflow: hidden;
width: 100%;
-webkit-box-flex: 0;
+}
+.toolbar-container ul, .toolbar-container li {
+ margin: 0;
+ padding: 0;
+}
+
+/*---------------------
+ Button Types
+-----------------------*/
+
+.toolbar-add-button {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1%2BjfqAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8%2FL5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N%2BQWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE%2BCDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9%2FNocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A%2FhXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V%2FpHDBYY1hrFGNuayJsym740u2C%2B02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT%2F%2FID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs%2BZmX8xlz7PPryjYVPiuWLskq3RV2ZsK%2FcqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta%2Bx%2F%2B5Em0mzJ%2F%2BdGj%2Ft8AyNmf2zvs9JmHt6vvmCpYtEFrcu%2BbYsc%2Fm9lSGrTq9xWbtvveWGbZtMNm%2FZarJt%2Bw6rnft3u%2B45uy9s%2F4ODOYd%2BHmk%2FJn58xUnrU%2BfOJJ%2F9dX7SRe1LR68kXv13fc5Nm1t379TfU75%2F4mHeY7En%2B59lvhB5efB1%2Flv5dxc%2BNH0y%2Ffzq64Lv4T8Ffp360%2FrP8f9%2FAA0ADzT6lvFdAAAAIGNIUk0AAHolAACAgwAA%2Bf8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAADPSURBVHjadNC7TQNREIXh75oNCIlWG0JC7BJoAmrAIVAAIkRCog9ThFtwCYTrtS2vBBKbDcG%2BbLD%2F5GpGc885M8nAItZga5YcYx4tD6Fw3ncn40Aa36mLIwM94YRC%2FFHqqkVshCRwCz6QhGRjloZo%2F1nFYygmTlC1ptNsbOTgy7czsJYosq2nLuK1e%2Fx4o0u1Qza7cuMS5s%2BVXC68v4xWmUbZFzkqiUatAWWmtmzPkrpoqC27b82BQoU1NEqfvcXeJV%2FB7mDdvYG7Ie4%2BvwMA%2BFNeHV16KUYAAAAASUVORK5CYII%3D);
+}
+
+/*---------------------
+ Generic button styles
+-----------------------*/
+
+.toolbar-container .toolbar-button {
+ background-color: transparent;
+ background-repeat: no-repeat;
+ border-style: none;
+ border-radius: 4px;
+ height: 16px;
+ margin: 3px 5px 0 0;
+ padding: 0 2px;
+ opacity: .85;
+ text-indent: -9999999px;
+ width: 16px;
+ float: right;
+}
+.left-button {
+ float: left;
}
\ No newline at end of file
diff --git a/js/components/toolbar.reel/toolbar.html b/js/components/toolbar.reel/toolbar.html
index 69eba194..53c6627a 100644
--- a/js/components/toolbar.reel/toolbar.html
+++ b/js/components/toolbar.reel/toolbar.html
@@ -14,14 +14,50 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
"module" : "js/panels/css-panel/style-sheet.reel",
"name" : "StyleSheet",
"properties" : {
- "element" : {"#" : "toolbar-container"}
+ "element" : {"#" : "toolbar-container"},
+ "repetition": {"@": "buttonList" }
}
},
+
+ "buttonList": {
+ "module": "montage/ui/repetition.reel",
+ "name": "Repetition",
+ "properties": {
+ "element": {"#": "repetition"}
+ },
+ "bindings": {
+ "objects" : {
+ "boundObject": {"@": "owner"},
+ "boundObjectPropertyPath": "buttons",
+ "oneway": true
+ }
+
+ }
+ },
+
"button": {
"module": "montage/ui/button.reel",
"name": "Button",
"properties": {
-
+ "element": {"#": "button" },
+ "label": " "
+ },
+ "bindings": {
+ "label" : {
+ "boundObject": {"@": "buttonList"},
+ "boundObjectPropertyPath": "objectAtCurrentIteration.title",
+ "oneway": true
+ },
+ "identifier": {
+ "boundObject": {"@": "buttonList"},
+ "boundObjectPropertyPath": "objectAtCurrentIteration.identifier",
+ "oneway": true
+ },
+ "sourceObject": {
+ "boundObject": {"@": "buttonList"},
+ "boundObjectPropertyPath": "objectAtCurrentIteration",
+ "oneway": true
+ }
}
}
}
@@ -29,6 +65,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot