catch up to master
This commit is contained in:
parent
803da6fcdc
commit
e71783235e
@ -335,16 +335,23 @@
|
|||||||
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
.select2-container-multi .select2-choices .select2-search-choice-focus {
|
||||||
background: #d4d4d4;
|
background: #d4d4d4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select2-search-choice-close {
|
.select2-search-choice-close {
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 3px;
|
right: 3px;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 13px;
|
height: 13px;
|
||||||
font-size: 1px;
|
font-size: 1px;
|
||||||
background: url(select2.png) right top no-repeat;
|
background: url(select2.png) right top no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.select2-container-multi .select2-search-choice-close {
|
||||||
|
left: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
.select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
|
||||||
background-position: right -11px;
|
background-position: right -11px;
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,24 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function indexOf(value, array) {
|
||||||
|
var i = 0, l = array.length, v;
|
||||||
|
|
||||||
|
if (value.constructor === String) {
|
||||||
|
for (; i < l; i++) if (value.localeCompare(array[i]) === 0) return i;
|
||||||
|
} else {
|
||||||
|
for (; i < l; i++) {
|
||||||
|
v = array[i];
|
||||||
|
if (v.constructor === String) {
|
||||||
|
if (v.localeCompare(value) === 0) return i;
|
||||||
|
} else {
|
||||||
|
if (v === value) return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
function getSideBorderPadding(element) {
|
function getSideBorderPadding(element) {
|
||||||
return element.outerWidth() - element.width();
|
return element.outerWidth() - element.width();
|
||||||
}
|
}
|
||||||
@ -970,7 +988,7 @@
|
|||||||
throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
|
throw "Invalid argument: " + selected + ". Must be .select2-search-choice";
|
||||||
}
|
}
|
||||||
|
|
||||||
index = val.indexOf(selected.data("select2-data").id);
|
index = indexOf(selected.data("select2-data").id, val);
|
||||||
|
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
val.splice(index, 1);
|
val.splice(index, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user