aboutsummaryrefslogtreecommitdiff
path: root/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js')
-rw-r--r--js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js68
1 files changed, 68 insertions, 0 deletions
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..b1315311
--- /dev/null
+++ b/js/panels/css-panel/style-sheets-view.reel/style-sheets-view.js
@@ -0,0 +1,68 @@
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.StyleSheetsView = Montage.create(Component, {
11 noDocumentCondition : {
12 value: true
13 },
14 showToolbar : {
15 value: false
16 },
17 styleSheets : {
18 value: []
19 },
20 stylesController : {
21 value: null
22 },
23 deserializedFromTemplate : {
24 value: function() {
25 console.log("style sheet view - deserialized");
26
27 this.stylesController = this.application.ninja.stylesController;
28
29 this.eventManager.addEventListener("styleSheetsReady", this, false);
30 this.eventManager.addEventListener("newStyleSheet", this, false);
31 }
32 },
33 _initView : {
34 value: false
35 },
36 handleStyleSheetsReady : {
37 value: function(e) {
38 this._initView = this.needsDraw = true;
39
40// this.noDocumentCondition = false;
41// this.showToolbar = true;
42// this.styleSheets = this.stylesController.userStyleSheets;
43
44 }
45 },
46 handleNewStyleSheet : {
47 value: function(e) {
48 this.styleSheets.push(e._event.detail);
49 }
50 },
51 prepareForDraw : {
52 value: function() {
53 console.log("style sheet view - prepare for draw");
54 }
55 },
56 draw : {
57 value: function() {
58 console.log("styles sheet view - draw");
59
60 if(this._initView) {
61 this.noDocumentCondition = false;
62 this.showToolbar = true;
63 this.styleSheets = this.stylesController.userStyleSheets;
64 this._initView = false;
65 }
66 }
67 }
68}); \ No newline at end of file