[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5862 - Incompatibility in ajax.js with "localName" for Internet Explorer
Owen Leonard
oleonard at myacpl.org
Fri Mar 18 16:07:04 CET 2011
From: Salvador Zaragoza Rubio <salvazm at masmedios.com>
It has been detected an incompatibility with Internet Explorer in the ajax.js
file that cause a javascript error for this browser that prevents proper
operation.
The error occurs because the "localName" is not supported by Internet Explorer
and returns "undefined".
Bug 5862 - Incompatibility in ajax.js with "localName" for Internet Explorer
Fix error on comma for IE
Signed-off-by: Owen Leonard <oleonard at myacpl.org>
---
koha-tmpl/intranet-tmpl/prog/en/js/ajax.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js
index 95d59e7..dfc0444 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js
+++ b/koha-tmpl/intranet-tmpl/prog/en/js/ajax.js
@@ -7,7 +7,7 @@ KOHA.AJAX = {
cache: false,
dataType: 'json',
type: 'POST',
- error: function ( xhr, stat, error ) { KOHA.AJAX.BaseError( error_callback, xhr, stat, error ) },
+ error: function ( xhr, stat, error ) { KOHA.AJAX.BaseError( error_callback, xhr, stat, error ) }
} );
$.ajax( options );
},
@@ -37,7 +37,9 @@ KOHA.AJAX = {
.attr( 'disabled', 'disabled' )
.each( function () {
var $image = $( '<img src="/intranet-tmpl/prog/img/spinner-small.gif" alt="" class="spinner" />' );
- switch ( this.localName.toLowerCase() ) {
+ var selector_type = this.localName;
+ if (selector_type == undefined) selector_type = this.nodeName; // IE only
+ switch ( selector_type.toLowerCase() ) {
case 'input':
$( this ).data( 'original-text', this.value );
this.value = text;
@@ -62,7 +64,9 @@ KOHA.AJAX = {
$( selector )
.removeAttr( 'disabled' )
.each( function () {
- switch ( this.localName.toLowerCase() ) {
+ var selector_type = this.localName;
+ if (selector_type == undefined) selector_type = this.nodeName; // IE only
+ switch ( selector_type.toLowerCase() ) {
case 'input':
this.value = $( this ).data( 'original-text' );
break;
--
1.7.3
More information about the Koha-patches
mailing list