From 1c528b42f9b1c9be9197921586388c3a3bdc5c17 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Wed, 22 Feb 2012 23:16:23 -0800
Subject: CSS Panel Update - Adding montage objects for css panel
---
.../style-sheets-view.reel/style-sheets-view.css | 0
.../style-sheets-view.reel/style-sheets-view.html | 68 ++++++++++++++++++++++
.../style-sheets-view.reel/style-sheets-view.js | 45 ++++++++++++++
3 files changed, 113 insertions(+)
create mode 100644 js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
create mode 100644 js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
create mode 100644 js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
(limited to 'js/panels/css-panel/style-sheets-view.reel')
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
new file mode 100644
index 00000000..e69de29b
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
new file mode 100644
index 00000000..78836f21
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -0,0 +1,68 @@
+
+
+
+
+
+
+
+
+
+
No document loaded. Please Open or Create a new document.
+
+
+
+
\ No newline at end of file
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
new file mode 100644
index 00000000..f93de830
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -0,0 +1,45 @@
+/*
+ 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.StyleSheetsView = Montage.create(Component, {
+ noDocumentCondition : {
+ value: true
+ },
+ styleSheets : {
+ value: []
+ },
+ stylesController : {
+ value: null
+ },
+ deserializedFromTemplate : {
+ value: function() {
+ console.log("style sheet view - deserialized");
+
+ this.stylesController = this.application.ninja.stylesController;
+
+ this.eventManager.addEventListener("styleSheetsReady", this, false);
+ }
+ },
+ handleStyleSheetsReady : {
+ value: function(e) {
+ //this.styleSheets = null;
+ this.styleSheets = this.stylesController.userStyleSheets;
+ }
+ },
+ prepareForDraw : {
+ value: function() {
+ console.log("style sheet view - prepare for draw");
+ }
+ },
+ draw : {
+ value: function() {
+ console.log("styles sheet view - draw");
+ }
+ }
+});
\ No newline at end of file
--
cgit v1.2.3
From a5ee11857f923d3e49b44c0a8c480e9d0b026d5b Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Wed, 22 Feb 2012 23:18:12 -0800
Subject: CSS Panel Update
---
.../style-sheets-view.reel/style-sheets-view.html | 25 +++++++++++++++-------
.../style-sheets-view.reel/style-sheets-view.js | 8 +++++--
2 files changed, 23 insertions(+), 10 deletions(-)
(limited to 'js/panels/css-panel/style-sheets-view.reel')
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
index 78836f21..d1dbfa2b 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -16,22 +16,31 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
"element" : {"#" : "style-sheet-view-container"}
}
},
+ "arrayController" : {
+ "module" : "montage/ui/controller/array-controller",
+ "name": "ArrayController",
+ "bindings": {
+ "content": {
+ "boundObject": {"@": "owner"},
+ "boundObjectPropertyPath": "styleSheets",
+ "oneway": true
+ }
+ }
+ },
"styleSheetList": {
"module" : "montage/ui/list.reel",
"name": "List",
"properties": {
- "element": {"#": "sheet-list" }
- },
- "bindings": {
- "content": {
- "boundObject": {"@": "owner" },
- "boundObjectPropertyPath": "styleSheets"
- }
+ "element": {"#": "sheet-list" },
+ "contentController": {"@": "arrayController"}
}
},
"sheet": {
"module": "js/panels/css-panel/style-sheet.reel",
"name": "StyleSheet",
+ "properties": {
+ "element": {"#": "sheet-item"}
+ },
"bindings": {
"source": {
"boundObject": {"@": "styleSheetList"},
@@ -61,7 +70,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
No document loaded. Please Open or Create a new document.
-
-
No document loaded. Please Open or Create a new document.
+
+
No style sheets to display.
+
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
index f93de830..f8826b18 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -28,8 +28,12 @@ exports.StyleSheetsView = Montage.create(Component, {
},
handleStyleSheetsReady : {
value: function(e) {
- //this.styleSheets = null;
- this.styleSheets = this.stylesController.userStyleSheets;
+ this.noDocumentCondition = false;
+
+ this.stylesController.userStyleSheets.forEach(function(sheet) {
+ this.styleSheets.push(sheet);
+ }, this);
+
}
},
prepareForDraw : {
--
cgit v1.2.3
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
---
.../style-sheets-view.reel/style-sheets-view.css | 19 +++++++++++
.../style-sheets-view.reel/style-sheets-view.html | 38 ++++++++++++++++++----
.../style-sheets-view.reel/style-sheets-view.js | 27 ++++++++++++---
3 files changed, 74 insertions(+), 10 deletions(-)
(limited to 'js/panels/css-panel/style-sheets-view.reel')
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
index e69de29b..dfb67d13 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.css
@@ -0,0 +1,19 @@
+/*
+ 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.
+ */
+.style-sheets-view-container ul {
+ margin: 0;
+ padding: 0;
+}
+.style-sheets-view-container li {
+ list-style-type: none;
+ margin: 0 8px;
+}
+.style-sheets-view-container li:first-child {
+ margin-top: 5px;
+}
+.style-sheets-view-container li:last-child {
+ margin-bottom: 5px;
+}
\ No newline at end of file
diff --git a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
index d1dbfa2b..092b189f 100644
--- a/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.html
@@ -7,13 +7,14 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
+