From b217bc4ad808ae5ca1fc0f609e115f51218a620b Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Wed, 14 Mar 2012 10:49:23 +0000 Subject: [PATCH] //small fix on BO login git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14141 b9a71923-0436-4b27-9f14-aed3839534dd --- .../template/controllers/login/content.tpl | 72 +++++++++---------- controllers/admin/AdminLoginController.php | 7 +- js/login.js | 16 +++-- 3 files changed, 52 insertions(+), 43 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/login/content.tpl b/admin-dev/themes/default/template/controllers/login/content.tpl index 13f301a42..cc6a02fa0 100755 --- a/admin-dev/themes/default/template/controllers/login/content.tpl +++ b/admin-dev/themes/default/template/controllers/login/content.tpl @@ -49,32 +49,32 @@ {/if}
{if !isset($wrong_folder_name)} -

{$shop_name}

-
-
- -
-
- -
-
-
- {if isset($redirect)} +
+

{$shop_name}

+ +
+ +
+
+ +
+
+
- {/if} - - - - + + + + +
+
- -
- - + + +
{else}

{$shop_name}

@@ -86,21 +86,21 @@
{l s='Please then access this page by the new url (eg.) http://www.domain.tld/admin'}{$randomNb}

{/if} -
-

© 2005 - {$smarty.now|date_format:"%Y"} Copyright by PrestaShop. all rights reserved.

diff --git a/controllers/admin/AdminLoginController.php b/controllers/admin/AdminLoginController.php index ae8b3aaf6..0b839d2f1 100755 --- a/controllers/admin/AdminLoginController.php +++ b/controllers/admin/AdminLoginController.php @@ -40,7 +40,6 @@ class AdminLoginControllerCore extends AdminController public function setMedia() { $this->addJquery(); - $this->addJqueryPlugin('flip'); $this->addCSS(_PS_CSS_DIR_.'login.css'); $this->addJS(_PS_JS_DIR_.'login.js'); $this->addJqueryUI('ui.widget'); @@ -79,6 +78,12 @@ class AdminLoginControllerCore extends AdminController // Redirect to admin panel if (isset($_GET['redirect']) && Validate::isControllerName($_GET['redirect'])) $this->context->smarty->assign(array('redirect' => Tools::getValue('redirect'))); + else + { + $tab = new Tab((int)$this->context->employee->default_tab); + $url = $this->context->link->getAdminLink($tab->class_name); + $this->context->smarty->assign(array('redirect' => $url)); + } if ($nbErrors = count($this->errors)) $this->context->smarty->assign( diff --git a/js/login.js b/js/login.js index da3506ef4..c25acfb39 100644 --- a/js/login.js +++ b/js/login.js @@ -4,15 +4,19 @@ $(document).ready(function() { function displayForgotPassword() { $('#error').hide(); - $("#login").flip({ - direction: 'tb', - color: '#FFF', - content: $('#forgot_password') - }) + $('#login_form').fadeOut('fast', function () { + $("#forgot_password").fadeIn('fast'); + }); + } + function displayLogin() { $('#error').hide(); - $('#login').revertFlip(); + + $('#forgot_password').fadeOut('fast', function () { + $("#login_form").fadeIn('fast'); + }); + return false; }