forked from 0x2620/pandora
fix a bug that would cause the home screen to flicker when loading /home directly
This commit is contained in:
parent
99b79000d2
commit
889e7f46a6
3 changed files with 9 additions and 4 deletions
|
@ -67,8 +67,10 @@ pandora.URL = (function() {
|
|||
} else if (state.page) {
|
||||
|
||||
if (state.page == 'home') {
|
||||
//pandora.$ui.home = pandora.ui.home().showScreen();
|
||||
pandora.$ui.home = pandora.ui.home().fadeInScreen();
|
||||
// if we're on page load, show screen immediately
|
||||
pandora.$ui.home = pandora.ui.home()[
|
||||
!pandora.$ui.appPanel ? 'showScreen' : 'fadeInScreen'
|
||||
]();
|
||||
} else if (
|
||||
Ox.getPositionById(pandora.site.sitePages, state.page) > -1
|
||||
|| state.page == 'software'
|
||||
|
|
|
@ -74,6 +74,11 @@ pandora.ui.accountDialogOptions = function(action, value) {
|
|||
}).bindEvent('click', function() {
|
||||
pandora.$ui.accountDialog.options(pandora.ui.accountDialogOptions(type));
|
||||
pandora.$ui.accountForm.find('input')[0].focus();
|
||||
if (['signin', 'signup'].indexOf(type) > -1) {
|
||||
// fixme: similar problem as in siteDialog,
|
||||
// the URL controller should handle this
|
||||
history.replaceState({}, '', '/' + type);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,6 @@ pandora.ui.home = function() {
|
|||
}
|
||||
|
||||
that.fadeInScreen = function() {
|
||||
Ox.Log('', 'FADE IN SCREEN')
|
||||
that.appendTo(Ox.UI.$body).animate({opacity: 1}, 500, function() {
|
||||
that.find(':not(#logo)').animate({opacity: 1}, 250, function() {
|
||||
$findInput.focusInput();
|
||||
|
@ -267,7 +266,6 @@ pandora.ui.home = function() {
|
|||
};
|
||||
|
||||
that.showScreen = function() {
|
||||
Ox.Log('', 'SHOW SCREEN')
|
||||
$logo.css({width: '320px'});
|
||||
that.find(':not(#logo)').css({opacity: 1});
|
||||
that.css({opacity: 1}).appendTo(Ox.UI.$body);
|
||||
|
|
Loading…
Reference in a new issue