From 91e9d85d5889de60f7a8c13c74d2471b6d8225a1 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 9 Jul 2013 11:07:46 +0000 Subject: [PATCH] update indiancinema home screen --- static/js/pandora/home.indiancinema.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/static/js/pandora/home.indiancinema.js b/static/js/pandora/home.indiancinema.js index 2c72ba750..2b1397d2a 100644 --- a/static/js/pandora/home.indiancinema.js +++ b/static/js/pandora/home.indiancinema.js @@ -670,7 +670,6 @@ pandora.ui.home = function() { } that.fadeInScreen = function() { - // $box.css({marginTop: '80px'}); that.appendTo(Ox.UI.$body).animate({opacity: 1}, 500, function() { that.find('*').animate({opacity: 1}, 250, function() { $findInput.focusInput(true); @@ -691,21 +690,18 @@ pandora.ui.home = function() { }; that.showScreen = function(callback) { + var count = 0, $elements = that.find('*'); + $box.css({top: window.innerHeight / 2 - 40 + 'px'}); that.css({opacity: 1}).appendTo(Ox.UI.$body); - // $box.css({marginTop: '80px'}); - that.find('*').css({opacity: 1}); $findInput.focusInput(true); - showFeatures(); - /* - $box.animate({marginTop: '80px'}, 500); - setTimeout(function() { - that.find('*').animate({opacity: 1}, 250, function() { - $findInput.focusInput(true); - showFeatures(); + $box.animate({top: '80px'}, 500, function() { + $elements.animate({opacity: 1}, 250, function() { + if (++count == $elements.length) { + showFeatures(); + callback && callback(); + } }); - }, 250); - */ - callback && callback(); + }); return that; };