updated select2 to latest version (v4.0.7)

This commit is contained in:
REJack
2019-07-08 19:24:08 +02:00
parent 9b29fa6cf0
commit 070193e486
174 changed files with 11602 additions and 9677 deletions

View File

@@ -3,6 +3,16 @@ module('Data adapters - Array');
var ArrayData = require('select2/data/array');
var $ = require('jquery');
var Options = require('select2/options');
var Utils = require('select2/utils');
var UserDefinedType = function (id, text) {
var self = this;
self.id = id;
self.text = text;
return self;
};
var arrayOptions = new Options({
data: [
@@ -17,7 +27,8 @@ var arrayOptions = new Options({
{
id: '2',
text: '2'
}
},
new UserDefinedType(1, 'aaaaaa')
]
});
@@ -216,7 +227,7 @@ test('option tags are automatically generated', function (assert) {
assert.equal(
$select.find('option').length,
3,
4,
'An <option> element should be created for each object'
);
});
@@ -237,7 +248,7 @@ test('option tags can receive new data', function(assert) {
});
assert.ok(
$select.find(':selected').data('data').extra,
Utils.GetData($select.find(':selected')[0], 'data').extra,
'<option> default should have new data'
);
@@ -246,7 +257,7 @@ test('option tags can receive new data', function(assert) {
});
assert.ok(
$select.find(':selected').data('data').extra,
Utils.GetData($select.find(':selected')[0], 'data').extra,
'<option> One should have new data'
);
});