fixed tagsinput and tooltip js error.

This commit is contained in:
DESKTOP-GENO133\IvanPlex
2024-01-31 08:44:59 -07:00
parent ca65a6fb71
commit a49121b1d9
2 changed files with 12 additions and 5 deletions

View File

@@ -45,15 +45,21 @@ function loadPinnedNotes(vehicleId) {
new bootstrap.Tooltip(hoveredGrid);
hoveredGrid.tooltip("show");
} else {
//disable the tooltip
//hoveredGrid.attr("data-bs-toggle", "");
hoveredGrid.attr("data-bs-title", "");
}
});
} else {
if (hoveredGrid.attr("data-bs-title") != '') {
hoveredGrid.tooltip("show");
}
}
}
function hidePinnedNotes(vehicleId) {
if ($(`#gridVehicle_${vehicleId}`).attr('data-bs-title') != '') {
$(`#gridVehicle_${vehicleId}`).tooltip("hide");
}
}
function filterGarage(sender) {

View File

@@ -429,10 +429,11 @@
self.$input.attr('disabled', 'disabled');
return;
}
var text = $input.val(),
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
//check if confirm keys are in input and then replace them.
text = text.replace(String.fromCharCode(event.which), "")
// Only attempt to add a tag if there is data in the field
if (text.length !== 0) {
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);