aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheet.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel/style-sheet.reel')
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.css0
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.html43
-rw-r--r--js/panels/css-panel/style-sheet.reel/style-sheet.js54
3 files changed, 97 insertions, 0 deletions
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.css b/js/panels/css-panel/style-sheet.reel/style-sheet.css
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/js/panels/css-panel/style-sheet.reel/style-sheet.css
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.html b/js/panels/css-panel/style-sheet.reel/style-sheet.html
new file mode 100644
index 00000000..43ffec6f
--- /dev/null
+++ b/js/panels/css-panel/style-sheet.reel/style-sheet.html
@@ -0,0 +1,43 @@
1<!DOCTYPE html>
2<!-- <copyright>
3This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6</copyright> -->
7<html lang="en">
8<head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <script type="text/montage-serialization">
11 {
12 "owner": {
13 "module" : "js/panels/css-panel/style-sheet.reel",
14 "name" : "StyleSheet",
15 "properties" : {
16 "element" : {"#" : "style-sheet-container"}
17 }
18 },
19 "name": {
20 "module": "montage/ui/dynamic-text.reel",
21 "name": "DynamicText",
22 "properties": {
23 "element": {"#": "sheet-name"},
24 "defaultText": "Style sheet"
25 },
26 "bindings": {
27 "value": {
28 "boundObject": {"@": "owner"},
29 "boundObjectPropertyPath": "name",
30 "onewway": true
31 }
32 }
33
34 }
35 }
36 </script>
37</head>
38<body>
39<div id="style-sheet-container" class="style-sheet-container">
40 <span id="sheet-name"></span>
41</div>
42</body>
43</html> \ No newline at end of file
diff --git a/js/panels/css-panel/style-sheet.reel/style-sheet.js b/js/panels/css-panel/style-sheet.reel/style-sheet.js
new file mode 100644
index 00000000..a4fe5960
--- /dev/null
+++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js
@@ -0,0 +1,54 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7var Montage = require("montage/core/core").Montage,
8 Component = require("montage/ui/component").Component;
9
10exports.StyleSheet = Montage.create(Component, {
11 deserializedFromTemplate : {
12 value: function() {
13 console.log("style sheet view - deserialized");
14 }
15 },
16 prepareForDraw : {
17 value: function() {
18 console.log("style sheet view - prepare for draw");
19 }
20 },
21 draw : {
22 value: function() {
23 console.log("styles sheet view - draw");
24 }
25 },
26 _name: {
27 value: null
28 },
29 name : {
30 get: function() {
31 return this._name;
32 },
33 set: function(text) {
34 this._name = text;
35 }
36 },
37 _source : {
38 value: null
39 },
40 source : {
41 get: function() {
42 return this._source;
43 },
44 set: function(sheet) {
45 console.log('sheet being set');
46 if(sheet.href) {
47 this.name = sheet.href.substring(sheet.href.lastIndexOf('/'));
48 } else {
49 this.name = 'Style Tag';
50 }
51 this._source = sheet;
52 }
53 }
54}); \ No newline at end of file