diff options
Diffstat (limited to 'js/panels/css-panel/style-sheet.reel/style-sheet.js')
-rw-r--r-- | js/panels/css-panel/style-sheet.reel/style-sheet.js | 61 |
1 files changed, 61 insertions, 0 deletions
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..5caf69a4 --- /dev/null +++ b/js/panels/css-panel/style-sheet.reel/style-sheet.js | |||
@@ -0,0 +1,61 @@ | |||
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.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 | this.mediaInput.value = this._source.media.mediaText; | ||
26 | } | ||
27 | }, | ||
28 | |||
29 | mediaInput: { | ||
30 | value: null | ||
31 | }, | ||
32 | |||
33 | _name: { | ||
34 | value: null | ||
35 | }, | ||
36 | name : { | ||
37 | get: function() { | ||
38 | return this._name; | ||
39 | }, | ||
40 | set: function(text) { | ||
41 | this._name = text; | ||
42 | } | ||
43 | }, | ||
44 | _source : { | ||
45 | value: null | ||
46 | }, | ||
47 | source : { | ||
48 | get: function() { | ||
49 | return this._source; | ||
50 | }, | ||
51 | set: function(sheet) { | ||
52 | console.log('sheet being set'); | ||
53 | if(sheet.href) { | ||
54 | this.name = sheet.href.substring(sheet.href.lastIndexOf('/')+1); | ||
55 | } else { | ||
56 | this.name = 'Style Tag'; | ||
57 | } | ||
58 | this._source = sheet; | ||
59 | } | ||
60 | } | ||
61 | }); \ No newline at end of file | ||