1
0
mirror of synced 2025-02-09 16:49:24 +03:00

Rebuilt dist

This commit is contained in:
Kevin Brown 2015-08-19 21:39:21 -04:00
parent ea538819c3
commit 989bd02649
6 changed files with 55 additions and 30 deletions

View File

@ -40,7 +40,8 @@
box-sizing: border-box;
border: none;
font-size: 100%;
margin-top: 5px; }
margin-top: 5px;
padding: 0; }
.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button {
-webkit-appearance: none; }

File diff suppressed because one or more lines are too long

View File

@ -1556,18 +1556,26 @@ S2.define('select2/selection/multiple',[
});
});
this.$selection.on('click', '.select2-selection__choice__remove',
this.$selection.on(
'click',
'.select2-selection__choice__remove',
function (evt) {
var $remove = $(this);
var $selection = $remove.parent();
// Ignore the event if it is disabled
if (self.options.get('disabled')) {
return;
}
var data = $selection.data('data');
var $remove = $(this);
var $selection = $remove.parent();
self.trigger('unselect', {
originalEvent: evt,
data: data
});
});
var data = $selection.data('data');
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}
);
};
MultipleSelection.prototype.clear = function () {
@ -3274,7 +3282,7 @@ S2.define('select2/data/array',[
var existingData = this.item($existingOption);
var newData = $.extend(true, {}, existingData, item);
var $newOption = this.option(existingData);
var $newOption = this.option(newData);
$existingOption.replaceWith($newOption);
@ -4014,6 +4022,12 @@ S2.define('select2/dropdown/attachBody',[
});
};
AttachBody.prototype.destroy = function (decorated) {
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
// Clone all of the container classes
$dropdown.attr('class', $container.attr('class'));
@ -4147,8 +4161,6 @@ S2.define('select2/dropdown/attachBody',[
};
AttachBody.prototype._resizeDropdown = function () {
this.$dropdownContainer.width();
var css = {
width: this.$container.outerWidth(false) + 'px'
};

File diff suppressed because one or more lines are too long

36
dist/js/select2.js vendored
View File

@ -1556,18 +1556,26 @@ S2.define('select2/selection/multiple',[
});
});
this.$selection.on('click', '.select2-selection__choice__remove',
this.$selection.on(
'click',
'.select2-selection__choice__remove',
function (evt) {
var $remove = $(this);
var $selection = $remove.parent();
// Ignore the event if it is disabled
if (self.options.get('disabled')) {
return;
}
var data = $selection.data('data');
var $remove = $(this);
var $selection = $remove.parent();
self.trigger('unselect', {
originalEvent: evt,
data: data
});
});
var data = $selection.data('data');
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}
);
};
MultipleSelection.prototype.clear = function () {
@ -3274,7 +3282,7 @@ S2.define('select2/data/array',[
var existingData = this.item($existingOption);
var newData = $.extend(true, {}, existingData, item);
var $newOption = this.option(existingData);
var $newOption = this.option(newData);
$existingOption.replaceWith($newOption);
@ -4014,6 +4022,12 @@ S2.define('select2/dropdown/attachBody',[
});
};
AttachBody.prototype.destroy = function (decorated) {
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position = function (decorated, $dropdown, $container) {
// Clone all of the container classes
$dropdown.attr('class', $container.attr('class'));
@ -4147,8 +4161,6 @@ S2.define('select2/dropdown/attachBody',[
};
AttachBody.prototype._resizeDropdown = function () {
this.$dropdownContainer.width();
var css = {
width: this.$container.outerWidth(false) + 'px'
};

File diff suppressed because one or more lines are too long