fixed tagsinput and tooltip js error.
This commit is contained in:
@@ -45,16 +45,22 @@ function loadPinnedNotes(vehicleId) {
|
|||||||
new bootstrap.Tooltip(hoveredGrid);
|
new bootstrap.Tooltip(hoveredGrid);
|
||||||
hoveredGrid.tooltip("show");
|
hoveredGrid.tooltip("show");
|
||||||
} else {
|
} else {
|
||||||
|
//disable the tooltip
|
||||||
|
//hoveredGrid.attr("data-bs-toggle", "");
|
||||||
hoveredGrid.attr("data-bs-title", "");
|
hoveredGrid.attr("data-bs-title", "");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (hoveredGrid.attr("data-bs-title") != '') {
|
||||||
hoveredGrid.tooltip("show");
|
hoveredGrid.tooltip("show");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function hidePinnedNotes(vehicleId) {
|
function hidePinnedNotes(vehicleId) {
|
||||||
|
if ($(`#gridVehicle_${vehicleId}`).attr('data-bs-title') != '') {
|
||||||
$(`#gridVehicle_${vehicleId}`).tooltip("hide");
|
$(`#gridVehicle_${vehicleId}`).tooltip("hide");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function filterGarage(sender) {
|
function filterGarage(sender) {
|
||||||
var tagName = sender.textContent;
|
var tagName = sender.textContent;
|
||||||
|
|||||||
@@ -429,10 +429,11 @@
|
|||||||
self.$input.attr('disabled', 'disabled');
|
self.$input.attr('disabled', 'disabled');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var text = $input.val(),
|
var text = $input.val(),
|
||||||
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
maxLengthReached = self.options.maxChars && text.length >= self.options.maxChars;
|
||||||
if (self.options.freeInput && (keyCombinationInList(event, self.options.confirmKeys) || maxLengthReached)) {
|
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
|
// Only attempt to add a tag if there is data in the field
|
||||||
if (text.length !== 0) {
|
if (text.length !== 0) {
|
||||||
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
self.add(maxLengthReached ? text.substr(0, self.options.maxChars) : text);
|
||||||
|
|||||||
Reference in New Issue
Block a user