Fixed missing jQuery import
Now we are using `jQuery.noConflict()` in tests, so it should be slightly easier to detect when this happens next time. Tests just need to be written for the component. This closes https://github.com/select2/select2/issues/2985.
This commit is contained in:
parent
36cfc26cc1
commit
01461813d8
4
dist/js/select2.amd.full.js
vendored
4
dist/js/select2.amd.full.js
vendored
@ -1,4 +1,6 @@
|
|||||||
define(['jquery'], function ($) {define('select2/utils',[], function () {
|
define(['jquery'], function ($) {define('select2/utils',[
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
var Utils = {};
|
var Utils = {};
|
||||||
|
|
||||||
Utils.Extend = function (ChildClass, SuperClass) {
|
Utils.Extend = function (ChildClass, SuperClass) {
|
||||||
|
4
dist/js/select2.amd.js
vendored
4
dist/js/select2.amd.js
vendored
@ -1,4 +1,6 @@
|
|||||||
define(['jquery'], function ($) {define('select2/utils',[], function () {
|
define(['jquery'], function ($) {define('select2/utils',[
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
var Utils = {};
|
var Utils = {};
|
||||||
|
|
||||||
Utils.Extend = function (ChildClass, SuperClass) {
|
Utils.Extend = function (ChildClass, SuperClass) {
|
||||||
|
4
dist/js/select2.full.js
vendored
4
dist/js/select2.full.js
vendored
@ -436,7 +436,9 @@ define('jquery',[],function () {
|
|||||||
return _$;
|
return _$;
|
||||||
});
|
});
|
||||||
|
|
||||||
define('select2/utils',[], function () {
|
define('select2/utils',[
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
var Utils = {};
|
var Utils = {};
|
||||||
|
|
||||||
Utils.Extend = function (ChildClass, SuperClass) {
|
Utils.Extend = function (ChildClass, SuperClass) {
|
||||||
|
4
dist/js/select2.full.min.js
vendored
4
dist/js/select2.full.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/select2.js
vendored
4
dist/js/select2.js
vendored
@ -436,7 +436,9 @@ define('jquery',[],function () {
|
|||||||
return _$;
|
return _$;
|
||||||
});
|
});
|
||||||
|
|
||||||
define('select2/utils',[], function () {
|
define('select2/utils',[
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
var Utils = {};
|
var Utils = {};
|
||||||
|
|
||||||
Utils.Extend = function (ChildClass, SuperClass) {
|
Utils.Extend = function (ChildClass, SuperClass) {
|
||||||
|
4
dist/js/select2.min.js
vendored
4
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
4
src/js/select2/utils.js
vendored
4
src/js/select2/utils.js
vendored
@ -1,4 +1,6 @@
|
|||||||
define([], function () {
|
define([
|
||||||
|
'jquery'
|
||||||
|
], function ($) {
|
||||||
var Utils = {};
|
var Utils = {};
|
||||||
|
|
||||||
Utils.Extend = function (ChildClass, SuperClass) {
|
Utils.Extend = function (ChildClass, SuperClass) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
module('Dropdown - selectOnClose');
|
module('Dropdown - selectOnClose');
|
||||||
|
|
||||||
|
var $ = require('jquery');
|
||||||
|
|
||||||
var Utils = require('select2/utils');
|
var Utils = require('select2/utils');
|
||||||
var Options = require('select2/options');
|
var Options = require('select2/options');
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
|
// Restore the require/define
|
||||||
var require = $.fn.select2.amd.require;
|
var require = $.fn.select2.amd.require;
|
||||||
var define = $.fn.select2.amd.define;
|
var define = $.fn.select2.amd.define;
|
||||||
|
|
||||||
|
// Disable jQuery's binding to $
|
||||||
|
jQuery.noConflict();
|
||||||
|
|
||||||
var Utils = require('select2/utils');
|
var Utils = require('select2/utils');
|
||||||
|
|
||||||
function MockContainer () {
|
function MockContainer () {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
module('Options - Attributes');
|
module('Options - Attributes');
|
||||||
|
|
||||||
|
var $ = require('jquery');
|
||||||
|
|
||||||
var Options = require('select2/options');
|
var Options = require('select2/options');
|
||||||
|
|
||||||
test('no nesting', function (assert) {
|
test('no nesting', function (assert) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
module('Options - Width');
|
module('Options - Width');
|
||||||
|
|
||||||
|
var $ = require('jquery');
|
||||||
|
|
||||||
var Select2 = require('select2/core');
|
var Select2 = require('select2/core');
|
||||||
var select = new Select2($('<select></select>'));
|
var select = new Select2($('<select></select>'));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user