Fixed indentation.
This commit is contained in:
parent
a1dc7f23d1
commit
6e9657105b
2
src/js/select2/compat/inputData.js
vendored
2
src/js/select2/compat/inputData.js
vendored
@ -118,7 +118,7 @@ define([
|
|||||||
|
|
||||||
InputData.prototype.addOptions = function (_, $options) {
|
InputData.prototype.addOptions = function (_, $options) {
|
||||||
var options = $.map($options, function ($option) {
|
var options = $.map($options, function ($option) {
|
||||||
return Utils.GetData($option[0], 'data');
|
return Utils.GetData($option[0], 'data');
|
||||||
});
|
});
|
||||||
|
|
||||||
this._currentData.push.apply(this._currentData, options);
|
this._currentData.push.apply(this._currentData, options);
|
||||||
|
8
src/js/select2/core.js
vendored
8
src/js/select2/core.js
vendored
@ -5,9 +5,9 @@ define([
|
|||||||
'./keys'
|
'./keys'
|
||||||
], function ($, Options, Utils, KEYS) {
|
], function ($, Options, Utils, KEYS) {
|
||||||
var Select2 = function ($element, options) {
|
var Select2 = function ($element, options) {
|
||||||
if (Utils.GetData($element[0], 'select2') != null) {
|
if (Utils.GetData($element[0], 'select2') != null) {
|
||||||
Utils.GetData($element[0], 'select2').destroy();
|
Utils.GetData($element[0], 'select2').destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$element = $element;
|
this.$element = $element;
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ define([
|
|||||||
|
|
||||||
this.$element.off('.select2');
|
this.$element.off('.select2');
|
||||||
this.$element.attr('tabindex',
|
this.$element.attr('tabindex',
|
||||||
Utils.GetData(this.$element[0], 'old-tabindex'));
|
Utils.GetData(this.$element[0], 'old-tabindex'));
|
||||||
|
|
||||||
this.$element.removeClass('select2-hidden-accessible');
|
this.$element.removeClass('select2-hidden-accessible');
|
||||||
this.$element.attr('aria-hidden', 'false');
|
this.$element.attr('aria-hidden', 'false');
|
||||||
|
6
src/js/select2/dropdown/attachBody.js
vendored
6
src/js/select2/dropdown/attachBody.js
vendored
@ -90,9 +90,9 @@ define([
|
|||||||
|
|
||||||
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
var $watchers = this.$container.parents().filter(Utils.hasScroll);
|
||||||
$watchers.each(function () {
|
$watchers.each(function () {
|
||||||
Utils.StoreData(this, 'select2-scroll-position', {
|
Utils.StoreData(this, 'select2-scroll-position', {
|
||||||
x: $(this).scrollLeft(),
|
x: $(this).scrollLeft(),
|
||||||
y: $(this).scrollTop()
|
y: $(this).scrollTop()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
4
src/js/select2/selection/base.js
vendored
4
src/js/select2/selection/base.js
vendored
@ -22,9 +22,9 @@ define([
|
|||||||
this._tabindex = 0;
|
this._tabindex = 0;
|
||||||
|
|
||||||
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
if (Utils.GetData(this.$element[0], 'old-tabindex') != null) {
|
||||||
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
this._tabindex = Utils.GetData(this.$element[0], 'old-tabindex');
|
||||||
} else if (this.$element.attr('tabindex') != null) {
|
} else if (this.$element.attr('tabindex') != null) {
|
||||||
this._tabindex = this.$element.attr('tabindex');
|
this._tabindex = this.$element.attr('tabindex');
|
||||||
}
|
}
|
||||||
|
|
||||||
$selection.attr('title', this.$element.attr('title'));
|
$selection.attr('title', this.$element.attr('title'));
|
||||||
|
@ -238,7 +238,7 @@ test('option tags can receive new data', function(assert) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
||||||
'<option> default should have new data'
|
'<option> default should have new data'
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ test('option tags can receive new data', function(assert) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
assert.ok(
|
assert.ok(
|
||||||
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
||||||
'<option> One should have new data'
|
'<option> One should have new data'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user