Support for importing jQuery
Also remove Ember.Qunit error about Ember.$ for now
This commit is contained in:
parent
39159ad5e4
commit
9347108f02
|
@ -5,6 +5,7 @@ var define, requirejs;
|
|||
var EMBER_MODULES = {};
|
||||
if (typeof Ember !== "undefined") {
|
||||
EMBER_MODULES = {
|
||||
jquery: { default: $ },
|
||||
"@ember/component": { default: Ember.Component },
|
||||
"@ember/controller": { default: Ember.Controller },
|
||||
"@ember/object": { default: Ember.Object },
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import getUrl from "discourse-common/lib/get-url";
|
||||
import jQuery from "jquery";
|
||||
|
||||
let token;
|
||||
|
||||
|
@ -16,6 +17,6 @@ export function ajax(args) {
|
|||
args.success = data => Ember.run(null, resolve, data);
|
||||
args.error = xhr => Ember.run(null, reject, xhr);
|
||||
args.url = getUrl(args.url);
|
||||
Ember.$.ajax(args);
|
||||
jQuery.ajax(args);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1874,7 +1874,7 @@ define('ember-test-helpers/wait', ['exports', 'ember'], function (exports, _embe
|
|||
exports._setupAJAXHooks = _setupAJAXHooks;
|
||||
exports['default'] = wait;
|
||||
|
||||
var jQuery = _ember['default'].$;
|
||||
var jQuery = $;
|
||||
|
||||
var requests;
|
||||
function incrementAjaxPendingRequests(_, xhr) {
|
||||
|
@ -1988,4 +1988,4 @@ for (var exportName in emberQUnit) {
|
|||
}
|
||||
|
||||
})();
|
||||
//# sourceMappingURL=ember-qunit.map
|
||||
//# sourceMappingURL=ember-qunit.map
|
||||
|
|
Loading…
Reference in New Issue