diff options
Diffstat (limited to 'node_modules/montage/ui/youtube-channel.reel')
-rw-r--r-- | node_modules/montage/ui/youtube-channel.reel/youtube-channel.html | 126 | ||||
-rw-r--r-- | node_modules/montage/ui/youtube-channel.reel/youtube-channel.js | 242 |
2 files changed, 0 insertions, 368 deletions
diff --git a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.html b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.html deleted file mode 100644 index 88fc3889..00000000 --- a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.html +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
4 | No 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> | ||
8 | <head> | ||
9 | <title></title> | ||
10 | <script type="text/montage-serialization"> | ||
11 | { | ||
12 | "player": { | ||
13 | "prototype": "montage/ui/youtube-player.reel", | ||
14 | "properties": { | ||
15 | "element": {"#": "player"} | ||
16 | } | ||
17 | }, | ||
18 | "imageA": { | ||
19 | "prototype": "montage/ui/image.reel", | ||
20 | "properties": { | ||
21 | "element": {"#": "imageA"} | ||
22 | } | ||
23 | }, | ||
24 | "imageB": { | ||
25 | "prototype": "montage/ui/image.reel", | ||
26 | "properties": { | ||
27 | "element": {"#": "imageB"} | ||
28 | } | ||
29 | }, | ||
30 | "imageC": { | ||
31 | "prototype": "montage/ui/image.reel", | ||
32 | "properties": { | ||
33 | "element": {"#": "imageC"} | ||
34 | } | ||
35 | }, | ||
36 | "button": { | ||
37 | "prototype": "montage/ui/button.reel", | ||
38 | "properties": { | ||
39 | "element": {"#": "close"} | ||
40 | } | ||
41 | }, | ||
42 | |||
43 | "owner": { | ||
44 | "module": "montage/ui/youtube-channel.reel", | ||
45 | "name": "YoutubeChannel", | ||
46 | "properties": { | ||
47 | "element": {"#": "container"}, | ||
48 | "player": {"@": "player"}, | ||
49 | "_popupElement": {"#": "popup"}, | ||
50 | "imageA": {"@": "imageA"}, | ||
51 | "imageB": {"@": "imageB"}, | ||
52 | "imageC": {"@": "imageC"} | ||
53 | } | ||
54 | } | ||
55 | } | ||
56 | </script> | ||
57 | <style type="text/css"> | ||
58 | .montage-youtube-channel { | ||
59 | width: 370px; | ||
60 | position: relative; | ||
61 | -webkit-transform-style: preserve-3d; | ||
62 | } | ||
63 | |||
64 | .montage-youtube-channel img { | ||
65 | cursor: pointer; | ||
66 | height: 90px; | ||
67 | width: 120px; | ||
68 | background-color: #000; | ||
69 | opacity: 1; | ||
70 | |||
71 | visibility: visible; | ||
72 | -webkit-transition: all 0.5s ease-in-out; | ||
73 | } | ||
74 | .montage-youtube-channel.show img { | ||
75 | opacity: 0; | ||
76 | visibility: hidden; | ||
77 | } | ||
78 | |||
79 | .montage-youtube-channel-popup { | ||
80 | position: fixed; | ||
81 | top: 0; | ||
82 | left: 0; | ||
83 | right: 0; | ||
84 | bottom: 0; | ||
85 | |||
86 | opacity: 0; | ||
87 | visibility: hidden; | ||
88 | -webkit-transform: scale3d(0, 0, 1); | ||
89 | -webkit-transition: all 0.5s ease-in-out; | ||
90 | } | ||
91 | .montage-youtube-channel-popup.show { | ||
92 | opacity: 1; | ||
93 | visibility: visible; | ||
94 | -webkit-transform: scale3d(1, 1, 1); | ||
95 | } | ||
96 | |||
97 | .montage-youtube-channel-close { | ||
98 | position: absolute; | ||
99 | top: 5px; | ||
100 | left: 5px; | ||
101 | |||
102 | width: 25px; | ||
103 | height: 25px; | ||
104 | |||
105 | background: #333; | ||
106 | border: 1px solid #999; | ||
107 | border-radius: 3px; | ||
108 | |||
109 | color: #EEE; | ||
110 | outline: none; | ||
111 | } | ||
112 | </style> | ||
113 | </head> | ||
114 | <body> | ||
115 | <div data-montage-id="container" class="montage-youtube-channel"> | ||
116 | <img src="" alt="" data-montage-id="imageA"> | ||
117 | <img src="" alt="" data-montage-id="imageB"> | ||
118 | <img src="" alt="" data-montage-id="imageC"> | ||
119 | |||
120 | <div data-montage-id="popup" class="montage-youtube-channel-popup" class="hide"> | ||
121 | <button data-montage-id="close" class="montage-youtube-channel-close">×</button> | ||
122 | <div data-montage-id="player"></div> | ||
123 | </div> | ||
124 | </div> | ||
125 | </body> | ||
126 | </html> | ||
diff --git a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js deleted file mode 100644 index 5b05f2c5..00000000 --- a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js +++ /dev/null | |||
@@ -1,242 +0,0 @@ | |||
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 | /*global require,exports*/ | ||
7 | var Montage = require("montage").Montage, | ||
8 | Component = require("ui/component").Component, | ||
9 | Uuid = require("core/Uuid"); | ||
10 | |||
11 | var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { | ||
12 | |||
13 | _userRe: { | ||
14 | enumerable: false, | ||
15 | value: /youtube.com\/(user\/)?([a-z0-9]+)/i | ||
16 | }, | ||
17 | |||
18 | imageA: { | ||
19 | value: null | ||
20 | }, | ||
21 | imageB: { | ||
22 | value: null | ||
23 | }, | ||
24 | imageC: { | ||
25 | value: null | ||
26 | }, | ||
27 | _popupElement: { | ||
28 | enumerable: false, | ||
29 | value: null | ||
30 | }, | ||
31 | |||
32 | _shouldShowPopup: { | ||
33 | enumerable: false, | ||
34 | value: false | ||
35 | }, | ||
36 | |||
37 | _channelUrl: { | ||
38 | enumerable: false, | ||
39 | value: null | ||
40 | }, | ||
41 | channelUrl: { | ||
42 | depends: ["channel"], | ||
43 | get: function() { | ||
44 | return this._channelUrl; | ||
45 | }, | ||
46 | set: function(value, fromChannel) { | ||
47 | if (this._channelUrl !== value) { | ||
48 | this._channelUrl = value; | ||
49 | |||
50 | // prevent infinite loop | ||
51 | if (!fromChannel) { | ||
52 | var match = this._userRe.exec(value); | ||
53 | if (match && match[2]) { | ||
54 | Object.getPropertyDescriptor(this, "channel").set.call(this, match[2], true); | ||
55 | } | ||
56 | } | ||
57 | } | ||
58 | } | ||
59 | }, | ||
60 | |||
61 | _channel: { | ||
62 | enumerable: false, | ||
63 | value: null | ||
64 | }, | ||
65 | channel: { | ||
66 | get: function() { | ||
67 | return this._channel; | ||
68 | }, | ||
69 | set: function(value, fromUrl) { | ||
70 | if (this._channel !== value) { | ||
71 | this._channel = value; | ||
72 | |||
73 | // prevent infinite loop | ||
74 | if (!fromUrl) { | ||
75 | Object.getPropertyDescriptor(this, "channelUrl").set.call(this, "http://www.youtube.com/user/" + value, true); | ||
76 | } | ||
77 | |||
78 | this._loadChannel(); | ||
79 | } | ||
80 | } | ||
81 | }, | ||
82 | |||
83 | _loadChannel: { | ||
84 | enumerable: false, | ||
85 | value: function() { | ||
86 | var self = this; | ||