diff options
Diffstat (limited to 'js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js')
-rw-r--r-- | js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js new file mode 100644 index 00000000..f90104e1 --- /dev/null +++ b/js/panels/css-panel/rule-components/css-style-rule.reel/css-style-rule.js | |||
@@ -0,0 +1,48 @@ | |||
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 | |||
7 | var Montage = require("montage/core/core").Montage, | ||
8 | Component = require("montage/ui/component").Component; | ||
9 | |||
10 | exports.CssStyleRule = Montage.create(Component, { | ||
11 | hasTemplate: { | ||
12 | value: true | ||
13 | }, | ||
14 | _rule : { | ||
15 | value : null | ||
16 | }, | ||
17 | rule : { | ||
18 | get: function() { | ||
19 | return this._rule; | ||
20 | }, | ||
21 | set: function(rule) { | ||
22 | this.cssText = rule.cssText; | ||
23 | this.sheetName = rule.href || 'Style Tag'; | ||
24 | this.selector = rule.selectorText; | ||
25 | console.log('Rule with selector "' +rule.selectorText+ '" is set on componenet.'); | ||
26 | this._rule = rule; | ||
27 | } | ||
28 | }, | ||
29 | condition: { | ||
30 | value: false | ||
31 | }, | ||
32 | templateDidLoad : { | ||
33 | value: function() { | ||
34 | console.log("css style rule : template did load"); | ||
35 | //this.condition = true; | ||
36 | } | ||
37 | }, | ||
38 | prepareForDraw : { | ||
39 | value: function() { | ||
40 | console.log("css panel : prepare for draw"); | ||
41 | } | ||
42 | }, | ||
43 | draw : { | ||
44 | value: function() { | ||
45 | console.log("css panel : draw"); | ||
46 | } | ||
47 | } | ||
48 | }); | ||