http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10522

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #19342|0                           |1
        is obsolete|                            |

--- Comment #5 from Jonathan Druart <[email protected]> ---
Created attachment 19358
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19358&action=edit
Bug 10522 - Javascript error on acquisition pages: YAHOO is not defined

acq.js includes an immediately invoked function expression, which means
that it runs whether or not it is called. Because this function tries to
reference the YAHOO object, it triggers an error on pages which don't
include the main YAHOO assets. Only the basketgroups page uses this
function and YAHOO assets.

It's probably possible to make this a regular function, but I propose
simply wrapping it in a check for the YAHOO object so that it only
executes on pages where YAHOO exists--the basketgroups page.

To test, apply the patch, clear your browser cache, and test on both the
basketgroups page and at least one page which also includes acq.js
(addorderiso2709.pl, neworderempty.pl, aqbudgets.pl, suggestion.pl,
etc.) and confirm that the browser reports no JavaScript errors.

Signed-off-by: Jonathan Druart <[email protected]>
$ git show HEAD -w
[...]
-
+if( typeof(YAHOO) === "object"){
     (function() {

     var Dom = YAHOO.util.Dom;
@@ -234,7 +234,7 @@ YAHOO.extend(DDList, YAHOO.util.DDProxy, {
         }
     });
     })();
-
+}

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to