fixed partstable
This commit is contained in:
@@ -2743,6 +2743,28 @@ $(document).on("click", "#showHideImageBtn", function () {
|
|||||||
return px;
|
return px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Riallinea larghezza e posizione delle tendine Select2 aperte nella tabella
|
||||||
|
function syncOpenSelect2() {
|
||||||
|
$("#partsTable select.select2-hidden-accessible").each(function () {
|
||||||
|
const inst = $(this).data("select2");
|
||||||
|
if (!inst || typeof inst.isOpen !== "function" || !inst.isOpen()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const dd = inst.dropdown;
|
||||||
|
try {
|
||||||
|
if (dd && typeof dd._resizeDropdown === "function") {
|
||||||
|
dd._resizeDropdown();
|
||||||
|
}
|
||||||
|
if (dd && typeof dd._positionDropdown === "function") {
|
||||||
|
dd._positionDropdown();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Se la versione di Select2 non lo supporta, chiude la tendina
|
||||||
|
inst.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function render() {
|
function render() {
|
||||||
const n = getThs().length;
|
const n = getThs().length;
|
||||||
if (!n || !getAvail()) return;
|
if (!n || !getAvail()) return;
|
||||||
@@ -2754,6 +2776,8 @@ $(document).on("click", "#showHideImageBtn", function () {
|
|||||||
.each(function (i) {
|
.each(function (i) {
|
||||||
$(this).css("width", px[i] + "px");
|
$(this).css("width", px[i] + "px");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
syncOpenSelect2();
|
||||||
}
|
}
|
||||||
|
|
||||||
function addResizers() {
|
function addResizers() {
|
||||||
|
|||||||
Reference in New Issue
Block a user