Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-794

name collision in javascript with prototype.js

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 3.0 RC3
    • 2.1.5
    • admininterface
    • None

    Description

      The $() function in /admindocroot/js/generic.js breaks the prototype.js function of the same name. Would be better to conditionally create it as the functionality for magnolia should be the same. Do it as follows:

      function get$Script() {
      try

      { $; return $; }

      catch(e) {
      return function (element)

      { return document.getElementById(element); }

      ;
      }
      }
      $ = get$Script();

      I don't really like the try/catch methodology but I don't know of any other way to check for the $ function that isn't there.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              fgiust Fabrizio Giustina
              tomjnsn Tom Jensen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

                    Estimated:
                    Original Estimate - 5m
                    5m
                    Remaining:
                    Remaining Estimate - 5m
                    5m
                    Logged:
                    Time Spent - Not Specified
                    Not Specified