Skip to content

JQueryMX breaks when JQuery is in no-conflicts mode #134

@etremel

Description

@etremel

JQueryMX, at least the View component, breaks when the local JQuery installation is set to no-conflicts mode because it uses the global window.$ variable to refer to jQuery -- when loading a view, JavaScript throws a "$ is undefined" error.

A cursory inspection of the view.js code suggests that the problem is a failure to correctly implement the "pass jQuery to a parameter called $" paradigm. There are several blocks of code wrapped in functions like this:

(function() {
    ...
})(jQuery);

which does not actually declare $ as a parameter but attempts to pass jQuery to it anyway. This means that calls to $.View inside these blocks will refer to the global $ variable instead of a local parameter, and will fail if JQuery is in no-conflicts mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions