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/panels/css-panel/rule-list.reel/rule-list.css | 29 +++++++
js/panels/css-panel/rule-list.reel/rule-list.html | 85 ++++++++++++++++++
js/panels/css-panel/rule-list.reel/rule-list.js | 100 ++++++++++++++++++++++
3 files changed, 214 insertions(+)
create mode 100644 js/panels/css-panel/rule-list.reel/rule-list.css
create mode 100644 js/panels/css-panel/rule-list.reel/rule-list.html
create mode 100644 js/panels/css-panel/rule-list.reel/rule-list.js
(limited to 'js/panels/css-panel/rule-list.reel')
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.css b/js/panels/css-panel/rule-list.reel/rule-list.css
new file mode 100644
index 00000000..5f9092f3
--- /dev/null
+++ b/js/panels/css-panel/rule-list.reel/rule-list.css
@@ -0,0 +1,29 @@
+/*
+ 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.
+ */
+.rule-list-container {
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-box-flex: 1;
+}
+.rule-list {
+ background-color: #FFF;
+ background: #FFF -webkit-linear-gradient(top, rgba(0,0,0,0.12) 0%,rgba(0,0,0,0) 4px);
+ color: #333;
+ font-family: monospace;
+ padding: 0;
+ margin: 0;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-box-flex: 1;
+}
+.rule-list li {
+ list-style-type: none;
+ margin: 3px 6px;
+ position: relative;
+}
+.rule-list li {
+
+}
\ No newline at end of file
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.html b/js/panels/css-panel/rule-list.reel/rule-list.html
new file mode 100644
index 00000000..69154d8d
--- /dev/null
+++ b/js/panels/css-panel/rule-list.reel/rule-list.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.js b/js/panels/css-panel/rule-list.reel/rule-list.js
new file mode 100644
index 00000000..11cda89c
--- /dev/null
+++ b/js/panels/css-panel/rule-list.reel/rule-list.js
@@ -0,0 +1,100 @@
+/*
+ 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.RuleList = Montage.create(Component, {
+ hasTemplate: {
+ value: true
+ },
+ _rules: {
+ value: null
+ },
+ rules: {
+ get: function() {
+ return this._rules;
+ },
+ set: function(list) {
+ if(!list) {
+ return null;
+ }
+ console.log('list: ', list);
+ this._rules = list;
+ this.needsDraw = this._needsAppend = true;
+ }
+ },
+ _contentController: {
+ value: null
+ },
+ contentController: {
+ get: function() {
+ return this._contentController;
+ },
+ set: function(controller) {
+
+ Object.defineBinding(this, 'rules', {
+ "boundObject": controller,
+ "boundObjectPropertyPath": "ruleList",
+ "oneway": true
+
+ });
+
+ this._contentController = controller;
+ }
+ },
+ templateDidLoad : {
+ value: function() {
+ console.log("Rule List : template did load");
+ //this.condition = true;
+ }
+ },
+ prepareForDraw : {
+ value: function() {
+ console.log("Rule List : prepare for draw");
+ }
+ },
+ draw : {
+ value: function() {
+ if(this._needsAppend) {
+ this._rules.forEach(function(rule) {
+ var componentBase = this.supportedRules[rule.type],
+ instance, el;
+
+ if(componentBase) {
+ el = document.createElement(this.ruleNodeName);
+ instance = componentBase.create();
+ instance.element = el;
+ instance.rule = rule;
+ this.listElement.appendChild(el);
+ instance.needsDraw = true;
+ }
+
+
+ }, this);
+ }
+ console.log("Rule List : draw");
+ }
+ },
+ _createRuleComponent: {
+ value: function(ruleType) {
+
+ }
+ },
+ ruleNodeName : {
+ value: 'li'
+ },
+ ruleComponents : {
+ value: {
+ "1" : 'css-style-rule',
+ "3" : 'css-import-rule',
+ "4" : 'css-media-rule',
+ "5" : 'css-font-face-rule',
+ "6" : 'css-page-rule',
+ "10" : 'namespace-rule'
+ }
+ }
+});
--
cgit v1.2.3
From 42d9f27afea3066cbccf22c76753f407fd340c30 Mon Sep 17 00:00:00 2001
From: Eric Guzman
Date: Mon, 12 Mar 2012 15:24:29 -0700
Subject: CSS Panel Update - Rule List component update
---
js/panels/css-panel/rule-list.reel/rule-list.css | 6 ++---
js/panels/css-panel/rule-list.reel/rule-list.html | 7 ++---
js/panels/css-panel/rule-list.reel/rule-list.js | 33 ++++++++---------------
3 files changed, 15 insertions(+), 31 deletions(-)
(limited to 'js/panels/css-panel/rule-list.reel')
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.css b/js/panels/css-panel/rule-list.reel/rule-list.css
index 5f9092f3..8bb90331 100644
--- a/js/panels/css-panel/rule-list.reel/rule-list.css
+++ b/js/panels/css-panel/rule-list.reel/rule-list.css
@@ -12,10 +12,11 @@
background-color: #FFF;
background: #FFF -webkit-linear-gradient(top, rgba(0,0,0,0.12) 0%,rgba(0,0,0,0) 4px);
color: #333;
+ display: -webkit-box;
font-family: monospace;
padding: 0;
margin: 0;
- display: -webkit-box;
+ overflow-y: scroll;
-webkit-box-orient: vertical;
-webkit-box-flex: 1;
}
@@ -23,7 +24,4 @@
list-style-type: none;
margin: 3px 6px;
position: relative;
-}
-.rule-list li {
-
}
\ No newline at end of file
diff --git a/js/panels/css-panel/rule-list.reel/rule-list.html b/js/panels/css-panel/rule-list.reel/rule-list.html
index 69154d8d..efede847 100644
--- a/js/panels/css-panel/rule-list.reel/rule-list.html
+++ b/js/panels/css-panel/rule-list.reel/rule-list.html
@@ -14,8 +14,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
"module" : "js/panels/css-panel/rule-list.reel",
"name" : "RuleList",
"properties" : {
- "element" : {"#" : "container"},
- "listElement": {"#": "rules-list"}
+ "element" : {"#" : "rule-list"}
}
}
}
@@ -78,8 +77,6 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
-
+