[PATCH conductor] BZ807436: Fix login error message on IE8
Matt Wagner
matt.wagner at redhat.com
Wed Mar 28 17:34:22 UTC 2012
On Wed, Mar 28, 2012 at 06:23:32PM +0200, ifarkas at redhat.com wrote:
> From: Imre Farkas <ifarkas at redhat.com>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=807436
>
> The issue was caused by the jQuery.isEmptyObject() call. As the documentation states it should not be used with strings.
> http://api.jquery.com/jQuery.isEmptyObject/
> ---
> src/app/views/user_sessions/new.html.haml | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/views/user_sessions/new.html.haml b/src/app/views/user_sessions/new.html.haml
> index 6a9d744..bb3eaa9 100644
> --- a/src/app/views/user_sessions/new.html.haml
> +++ b/src/app/views/user_sessions/new.html.haml
> @@ -34,7 +34,7 @@
> //we will have to check if status code == 0 in 'complete' callback
> $('#error-content').remove();
> $('#primary-container').prepend('<div id="error-content" class="error" style="opacity: 0; position: relative;"></div>');
> - var text = $.isEmptyObject(response.responseText) ? response.statusText : response.responseText;
> + var text = response.responseText == '' ? response.statusText : response.responseText;
> if(response.status !== 401) text = "Internal Server Error";
> $('#error-content').html('<p class="text">' + text + '</p>');
> $('#error-content').animate({ 'opacity': 1, 'top': -10 },{queue:false,duration:150});
> --
> 1.7.6.5
ACK. This fixes the issue. (And since it's all JS, there's no cucumber
test to randomly fail this time...)
-- Matt
More information about the aeolus-devel
mailing list