//
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10628 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
49b2efe3a5
commit
bc3f7c89a9
2 files changed
+27
-37
No files matched your search
@@ -96,7 +96,7 @@
|
|||||||
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
<img id="ajax-loader" src="../img/loader.gif" style="float:left;margin:2px 0 0 5px;display:none">
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="lost"><a href="#" onclick="$('#error').hide();$('#login').revertFlip();return false;">{l s='Back to login'}</a></div>
|
<div id="lost"><a href="#" onclick="displayLogin();return false;">{l s='Back to login'}</a></div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<h2><a href="http://www.prestashop.com">© Copyright by PrestaShop. all rights reserved.</a></h2>
|
<h2><a href="http://www.prestashop.com">© Copyright by PrestaShop. all rights reserved.</a></h2>
|
||||||
|
|||||||
+26
-36
@@ -1,11 +1,9 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
if (document.getElementById('email'))
|
if (document.getElementById('email')) document.getElementById('email').focus();
|
||||||
document.getElementById('email').focus();
|
//$("#login").effect( "slide", { direction: "up" }, 1000 );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function displayForgotPassword() {
|
||||||
function displayForgotPassword()
|
|
||||||
{
|
|
||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$("#login").flip({
|
$("#login").flip({
|
||||||
direction: 'tb',
|
direction: 'tb',
|
||||||
@@ -13,9 +11,12 @@ function displayForgotPassword()
|
|||||||
content: $('#forgot_password')
|
content: $('#forgot_password')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
function displayLogin() {
|
||||||
function doAjaxLogin()
|
$('#error').hide();
|
||||||
{
|
$('#login').revertFlip();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
function doAjaxLogin() {
|
||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$('#ajax-loader').fadeIn('slow', function() {
|
$('#ajax-loader').fadeIn('slow', function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -31,16 +32,15 @@ function doAjaxLogin()
|
|||||||
passwd: $('#passwd').val(),
|
passwd: $('#passwd').val(),
|
||||||
email: $('#email').val()
|
email: $('#email').val()
|
||||||
},
|
},
|
||||||
success : function(jsonData)
|
success: function(jsonData) {
|
||||||
{
|
if (jsonData.hasErrors) {
|
||||||
if (jsonData.hasErrors)
|
|
||||||
{
|
|
||||||
displayErrors(jsonData.errors);
|
displayErrors(jsonData.errors);
|
||||||
$('#login').effect("shake", { times:3 }, 300);
|
} else {
|
||||||
}
|
$("#login").effect("slide", {
|
||||||
else
|
direction: "up"
|
||||||
{
|
}, 1000, function() {
|
||||||
window.location.href = jsonData.redirect;
|
window.location.href = jsonData.redirect;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
@@ -50,11 +50,8 @@ function doAjaxLogin()
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function doAjaxForgot() {
|
||||||
function doAjaxForgot()
|
|
||||||
{
|
|
||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$('#ajax-loader').fadeIn('slow', function() {
|
$('#ajax-loader').fadeIn('slow', function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@@ -69,15 +66,10 @@ function doAjaxForgot()
|
|||||||
submitForgot: "1",
|
submitForgot: "1",
|
||||||
email_forgot: $('#email_forgot').val()
|
email_forgot: $('#email_forgot').val()
|
||||||
},
|
},
|
||||||
success : function(jsonData)
|
success: function(jsonData) {
|
||||||
{
|
if (jsonData.hasErrors) {
|
||||||
if (jsonData.hasErrors)
|
|
||||||
{
|
|
||||||
displayErrors(jsonData.errors);
|
displayErrors(jsonData.errors);
|
||||||
$('#login').effect("shake", { times:3 }, 300);
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
window.location.href = jsonData.redirect;
|
window.location.href = jsonData.redirect;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -89,16 +81,14 @@ function doAjaxForgot()
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function displayErrors(errors) {
|
||||||
function displayErrors(errors)
|
|
||||||
{
|
|
||||||
str_errors = '<h3>' + (errors.length > 1 ? there_are : there_is) + ' ' + errors.length + ' ' + (errors.length > 1 ? label_errors : label_error) + '</h3><ol>';
|
str_errors = '<h3>' + (errors.length > 1 ? there_are : there_is) + ' ' + errors.length + ' ' + (errors.length > 1 ? label_errors : label_error) + '</h3><ol>';
|
||||||
for(error in errors)
|
for (error in errors) //IE6 bug fix
|
||||||
//IE6 bug fix
|
if (error != 'indexOf') str_errors += '<li>' + errors[error] + '</li>';
|
||||||
if(error != 'indexOf')
|
|
||||||
str_errors += '<li>'+errors[error] + '</li>';
|
|
||||||
$('#ajax-loader').fadeOut('slow');
|
$('#ajax-loader').fadeOut('slow');
|
||||||
$('#error').html(str_errors + '</ol>');
|
$('#error').html(str_errors + '</ol>');
|
||||||
$('#error').fadeIn();
|
$('#error').fadeIn();
|
||||||
|
$("#login").effect("shake", {
|
||||||
|
times: 4
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in new issue
Block a user