mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°1727: Fix non disappearing tooltip for mandatory HTML field
This commit is contained in:
@@ -202,13 +202,17 @@ function ReportFieldValidationStatus(sFieldId, sFormId, bValid, sExplain)
|
|||||||
}
|
}
|
||||||
// Visual feedback
|
// Visual feedback
|
||||||
$('#v_'+sFieldId).html('<img src="../images/validation_error.png" style="vertical-align:middle" data-tooltip="'+sExplain+'"/>');
|
$('#v_'+sFieldId).html('<img src="../images/validation_error.png" style="vertical-align:middle" data-tooltip="'+sExplain+'"/>');
|
||||||
$('#v_'+sFieldId).tooltip({
|
//Avoid replacing exisiting tooltip for periodically checked element (like CKeditor fields)
|
||||||
items: 'span',
|
if($('#v_'+sFieldId).tooltip( "instance" ) === undefined)
|
||||||
tooltipClass: 'form_field_error',
|
{
|
||||||
content: function() {
|
$('#v_'+sFieldId).tooltip({
|
||||||
return $(this).find('img').attr('data-tooltip'); // As opposed to the default 'content' handler, do not escape the contents of 'title'
|
items: 'span',
|
||||||
}
|
tooltipClass: 'form_field_error',
|
||||||
});
|
content: function() {
|
||||||
|
return $(this).find('img').attr('data-tooltip'); // As opposed to the default 'content' handler, do not escape the contents of 'title'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user