From cd2d380b1f75bf310c2a8c62e2ec4e3d6f4e39f8 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 26 Jun 2012 15:41:00 -0700 Subject: fix for the youtube giving an error when having less than 3 images Signed-off-by: Valerio Virgillito --- .../montage-google/youtube-channel.reel/youtube-channel.html | 1 - .../montage-google/youtube-channel.reel/youtube-channel.js | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'node_modules/montage-google/youtube-channel.reel') diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html index 112fda72..01cc42f3 100644 --- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html +++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html @@ -41,7 +41,6 @@ }, "owner": { - "module": "youtube-channel.reel", "name": "YoutubeChannel", "properties": { "element": {"#": "container"}, diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js index ca08564b..95cd336a 100644 --- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js +++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js @@ -124,6 +124,8 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { draw: { value: function() { + var self = this; + if (this._script) { if(this.element.childNodes.length < 1) { this._savedReference.appendChild(this._script); @@ -135,9 +137,9 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { } if (this._entries) { - this.imageA.src = this._entries[0]["media$group"]["media$thumbnail"][0].url; - this.imageB.src = this._entries[1]["media$group"]["media$thumbnail"][0].url; - this.imageC.src = this._entries[2]["media$group"]["media$thumbnail"][0].url; + this.imageA.src = (this._entries[0]) ? this._entries[0]["media$group"]["media$thumbnail"][0].url : ""; + this.imageB.src = (this._entries[1]) ? this._entries[1]["media$group"]["media$thumbnail"][0].url : ""; + this.imageC.src = (this._entries[2]) ? this._entries[2]["media$group"]["media$thumbnail"][0].url : ""; } if (this._videoId) { @@ -145,8 +147,6 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { this._videoId = null; } - var self = this; - if (this._shouldShowPopup) { this._positionPopup(); -- cgit v1.2.3 From d2af32f2c8a408dbf6bf0aded5c381b9daf52aaa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 28 Jun 2012 14:58:49 -0700 Subject: Fix for the youtube component close button on windows Signed-off-by: Valerio Virgillito --- .../montage-google/youtube-channel.reel/youtube-channel.html | 10 +++++++++- .../montage-google/youtube-channel.reel/youtube-channel.js | 9 +++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'node_modules/montage-google/youtube-channel.reel') diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html index 01cc42f3..65ffc945 100644 --- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.html +++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.html @@ -96,7 +96,7 @@ .montage-youtube-channel-close { position: absolute; top: 5px; - left: 5px; + right: 5px; width: 25px; height: 25px; @@ -107,6 +107,14 @@ color: #EEE; outline: none; + text-align: center; + padding: 0; + } + + .montage-youtube-channel .montage-youtube-player { + border-top: 35px solid #000; + -webkit-box-sizing: border-box; + box-sizing: border-box; } diff --git a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js index 95cd336a..f06216e1 100644 --- a/node_modules/montage-google/youtube-channel.reel/youtube-channel.js +++ b/node_modules/montage-google/youtube-channel.reel/youtube-channel.js @@ -180,8 +180,12 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { // take the video from the top only once it's stopped animating window.setTimeout(function() { - self.element.style.zIndex = null; - }, 500); + self._element.style.zIndex = null; + // HACK: Trigger a redraw so that Flash in Chrome on + // Windows doesn't remain rendered on top of everything, + // despite actually being hidden + self.player.element.getBoundingClientRect(); + }, 510); } } @@ -196,6 +200,7 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, { value: function() { var doc = this._element.ownerDocument; + this._popupElement.style.width = doc.width + "px"; this.player.width = doc.width; this.player.height = doc.height; -- cgit v1.2.3