Update AdminLTE

- from 2.4.5 to 2.4.18 (cannot detect any issues)
- set default scancycle for Apple Devices to 1
This commit is contained in:
leiweibau
2022-07-11 21:34:04 +02:00
parent a5a060b7c0
commit b2d2e3e9b6
3506 changed files with 228613 additions and 134604 deletions

View File

@@ -1,5 +1,7 @@
module('select2(val)');
var Utils = require('select2/utils');
test('multiple elements with arguments works', function (assert) {
var $ = require('jquery');
require('jquery.select2');
@@ -27,4 +29,70 @@ test('multiple elements with arguments works', function (assert) {
'2',
'The call should also change the value on the second element'
);
});
test('initializes when jQuery $.data contains' +
' cyclic reference', function (assert) {
var $ = require('jquery');
require('jquery.select2');
var $select = $(
'<select>' +
'<option>One</option>' +
'<option>Two</option>' +
'<option value="3" selected>Three</option>' +
'</select>'
);
// Add a circular reference object using jQuery.
var recursiveObject = {};
recursiveObject.same = recursiveObject;
$select.data('same', recursiveObject);
$select.select2();
assert.equal(
$select.val(),
'3',
'The option value should be pulled correctly'
);
});
test('$element.data returns instance and options correctly',
function (assert) {
var $ = require('jquery');
require('jquery.select2');
var $select = $(
'<select>' +
'<option value="1">One</option>' +
'<option value="2">Two</option>' +
'<option value="3" selected>Three</option>' +
'</select>'
);
// Initialize.
$select.select2({maximumSelectionLength: 2, multiple: true});
assert.equal(
$select.val(),
'3',
'Only 1 option should be pulled.'
);
// Try to resolve instance via .data('select2').
var $instance = $select.data('select2');
assert.ok($instance);
assert.ok($instance.options);
// Ensure $select.data('select2') is the same instance
// created by .select2()
assert.equal($instance, Utils.GetData($instance.$element[0],
'select2'));
// Ensure initialized property matches.
assert.equal($instance.options.options.maximumSelectionLength,
2);
});