From 6d00e2ade8d7a7f9aefe9951e23eb7839214a4aa Mon Sep 17 00:00:00 2001 From: Chris Van Date: Wed, 21 Dec 2011 18:18:08 -0500 Subject: [PATCH] close button appropriately --- media/js/zamboni/discovery_pane.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/media/js/zamboni/discovery_pane.js b/media/js/zamboni/discovery_pane.js index c12711d9a8..99581237cb 100644 --- a/media/js/zamboni/discovery_pane.js +++ b/media/js/zamboni/discovery_pane.js @@ -260,7 +260,11 @@ $(function() { // Make the video clean up after itself. $('#video-close').click(_pd(cleanupVideo)); function cleanupVideo() { - $('.watch-video').show(); + $learn.text($learn.attr('data-oldtext')); + $watch_link.text($watch_link.attr('data-oldtext')); + if ($('#intro').is(':hidden')) { + $('.watch-video').show(); + } $('#sub > section').show(); $('#promo-video-addons').hide(); $('.promo-video, #preload-personas').remove(); @@ -291,8 +295,6 @@ $(function() { $('#learn-more, .watch-video:visible a').show().addClass('video').click(_pd(function() { if ($('#main .promo-video:visible').length) { cleanupVideo(); - $learn.text($learn.attr('data-oldtext')); - $watch_link.text($watch_link.attr('data-oldtext')); return; }