mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Merge pull request #4413 from jbudz/issues/2985
Compile query validation tooltip once
This commit is contained in:
commit
932eba08c9
1 changed files with 3 additions and 5 deletions
|
@ -22,7 +22,8 @@ define(function (require) {
|
|||
// track request so we can abort it if needed
|
||||
var request = {};
|
||||
|
||||
var errorElem = $('<i class="fa fa-ban input-error"></i>').hide();
|
||||
var errorElem = $('<i tooltip={{tooltipMsg}} class="fa fa-ban input-error"></i>').hide();
|
||||
$compile(errorElem)($scope);
|
||||
|
||||
var init = function () {
|
||||
elem.after(errorElem);
|
||||
|
@ -84,10 +85,7 @@ define(function (require) {
|
|||
msg = resp.body.error;
|
||||
}
|
||||
|
||||
errorElem.attr('tooltip', msg);
|
||||
|
||||
// Compile is needed for the tooltip
|
||||
$compile(errorElem)($scope);
|
||||
$scope.tooltipMsg = msg;
|
||||
errorElem.show();
|
||||
|
||||
return undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue