Recompile dist
This commit is contained in:
parent
0840c3923f
commit
97f7eea9ce
2
dist/css/select2.min.css
vendored
2
dist/css/select2.min.css
vendored
File diff suppressed because one or more lines are too long
29
dist/js/select2.full.js
vendored
29
dist/js/select2.full.js
vendored
@ -3332,7 +3332,7 @@ S2.define('select2/data/array',[
|
|||||||
var $existingOption = $existing.filter(onlyItem(item));
|
var $existingOption = $existing.filter(onlyItem(item));
|
||||||
|
|
||||||
var existingData = this.item($existingOption);
|
var existingData = this.item($existingOption);
|
||||||
var newData = $.extend(true, {}, existingData, item);
|
var newData = $.extend(true, {}, item, existingData);
|
||||||
|
|
||||||
var $newOption = this.option(newData);
|
var $newOption = this.option(newData);
|
||||||
|
|
||||||
@ -3440,7 +3440,9 @@ S2.define('select2/data/ajax',[
|
|||||||
|
|
||||||
callback(results);
|
callback(results);
|
||||||
}, function () {
|
}, function () {
|
||||||
// TODO: Handle AJAX errors
|
self.trigger('results:message', {
|
||||||
|
message: 'errorLoading'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
self._request = $request;
|
self._request = $request;
|
||||||
@ -3472,6 +3474,12 @@ S2.define('select2/data/tags',[
|
|||||||
this.createTag = createTag;
|
this.createTag = createTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var insertTag = options.get('insertTag');
|
||||||
|
|
||||||
|
if (insertTag !== undefined) {
|
||||||
|
this.insertTag = insertTag;
|
||||||
|
}
|
||||||
|
|
||||||
decorated.call(this, $element, options);
|
decorated.call(this, $element, options);
|
||||||
|
|
||||||
if ($.isArray(tags)) {
|
if ($.isArray(tags)) {
|
||||||
@ -4171,7 +4179,6 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
|
|
||||||
var newDirection = null;
|
var newDirection = null;
|
||||||
|
|
||||||
var position = this.$container.position();
|
|
||||||
var offset = this.$container.offset();
|
var offset = this.$container.offset();
|
||||||
|
|
||||||
offset.bottom = offset.top + this.$container.outerHeight(false);
|
offset.bottom = offset.top + this.$container.outerHeight(false);
|
||||||
@ -4200,14 +4207,20 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
top: container.bottom
|
top: container.bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fix positioning with static parents
|
// Determine what the parent element is to use for calciulating the offset
|
||||||
if (this.$dropdownParent[0].style.position !== 'static') {
|
var $offsetParent = this.$dropdownParent;
|
||||||
var parentOffset = this.$dropdownParent.offset();
|
|
||||||
|
|
||||||
css.top -= parentOffset.top;
|
// For statically positoned elements, we need to get the element
|
||||||
css.left -= parentOffset.left;
|
// that is determining the offset
|
||||||
|
if ($offsetParent.css('position') === 'static') {
|
||||||
|
$offsetParent = $offsetParent.offsetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parentOffset = $offsetParent.offset();
|
||||||
|
|
||||||
|
css.top -= parentOffset.top;
|
||||||
|
css.left -= parentOffset.left;
|
||||||
|
|
||||||
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
||||||
newDirection = 'below';
|
newDirection = 'below';
|
||||||
}
|
}
|
||||||
|
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
29
dist/js/select2.js
vendored
29
dist/js/select2.js
vendored
@ -3332,7 +3332,7 @@ S2.define('select2/data/array',[
|
|||||||
var $existingOption = $existing.filter(onlyItem(item));
|
var $existingOption = $existing.filter(onlyItem(item));
|
||||||
|
|
||||||
var existingData = this.item($existingOption);
|
var existingData = this.item($existingOption);
|
||||||
var newData = $.extend(true, {}, existingData, item);
|
var newData = $.extend(true, {}, item, existingData);
|
||||||
|
|
||||||
var $newOption = this.option(newData);
|
var $newOption = this.option(newData);
|
||||||
|
|
||||||
@ -3440,7 +3440,9 @@ S2.define('select2/data/ajax',[
|
|||||||
|
|
||||||
callback(results);
|
callback(results);
|
||||||
}, function () {
|
}, function () {
|
||||||
// TODO: Handle AJAX errors
|
self.trigger('results:message', {
|
||||||
|
message: 'errorLoading'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
self._request = $request;
|
self._request = $request;
|
||||||
@ -3472,6 +3474,12 @@ S2.define('select2/data/tags',[
|
|||||||
this.createTag = createTag;
|
this.createTag = createTag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var insertTag = options.get('insertTag');
|
||||||
|
|
||||||
|
if (insertTag !== undefined) {
|
||||||
|
this.insertTag = insertTag;
|
||||||
|
}
|
||||||
|
|
||||||
decorated.call(this, $element, options);
|
decorated.call(this, $element, options);
|
||||||
|
|
||||||
if ($.isArray(tags)) {
|
if ($.isArray(tags)) {
|
||||||
@ -4171,7 +4179,6 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
|
|
||||||
var newDirection = null;
|
var newDirection = null;
|
||||||
|
|
||||||
var position = this.$container.position();
|
|
||||||
var offset = this.$container.offset();
|
var offset = this.$container.offset();
|
||||||
|
|
||||||
offset.bottom = offset.top + this.$container.outerHeight(false);
|
offset.bottom = offset.top + this.$container.outerHeight(false);
|
||||||
@ -4200,14 +4207,20 @@ S2.define('select2/dropdown/attachBody',[
|
|||||||
top: container.bottom
|
top: container.bottom
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fix positioning with static parents
|
// Determine what the parent element is to use for calciulating the offset
|
||||||
if (this.$dropdownParent[0].style.position !== 'static') {
|
var $offsetParent = this.$dropdownParent;
|
||||||
var parentOffset = this.$dropdownParent.offset();
|
|
||||||
|
|
||||||
css.top -= parentOffset.top;
|
// For statically positoned elements, we need to get the element
|
||||||
css.left -= parentOffset.left;
|
// that is determining the offset
|
||||||
|
if ($offsetParent.css('position') === 'static') {
|
||||||
|
$offsetParent = $offsetParent.offsetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var parentOffset = $offsetParent.offset();
|
||||||
|
|
||||||
|
css.top -= parentOffset.top;
|
||||||
|
css.left -= parentOffset.left;
|
||||||
|
|
||||||
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
if (!isCurrentlyAbove && !isCurrentlyBelow) {
|
||||||
newDirection = 'below';
|
newDirection = 'below';
|
||||||
}
|
}
|
||||||
|
2
dist/js/select2.min.js
vendored
2
dist/js/select2.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user