Bugzilla – Attachment 3291 Details for
Bug 5862
Incompatibility in ajax.js with "localName" for Internet Explorer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use "nodeName" for IE
0001-Bug-5862-Incompatibility-in-ajax.js-with-localNam.patch (text/plain), 2.48 KB, created by
Vicente Seguí Serrán
on 2011-03-14 09:04:23 UTC
(
hide
)
Description:
Use "nodeName" for IE
Filename:
MIME Type:
Creator:
Vicente Seguí Serrán
Created:
2011-03-14 09:04:23 UTC
Size:
2.48 KB
patch
obsolete
>From eb8e524bd7df4c0d86919b90d14c25a1474188b2 Mon Sep 17 00:00:00 2001 >From: Salvador Zaragoza Rubio <salvazm@masmedios.com> >Date: Mon, 14 Mar 2011 09:48:30 +0100 >Subject: [PATCH] Bug 5862 - Incompatibility in ajax.js with "localName" for Internet Explorer > >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 >--- > 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.5.6.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5862
: 3291