mirror of
https://github.com/elastic/kibana.git
synced 2025-04-25 02:09:32 -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
|
// track request so we can abort it if needed
|
||||||
var request = {};
|
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 () {
|
var init = function () {
|
||||||
elem.after(errorElem);
|
elem.after(errorElem);
|
||||||
|
@ -84,10 +85,7 @@ define(function (require) {
|
||||||
msg = resp.body.error;
|
msg = resp.body.error;
|
||||||
}
|
}
|
||||||
|
|
||||||
errorElem.attr('tooltip', msg);
|
$scope.tooltipMsg = msg;
|
||||||
|
|
||||||
// Compile is needed for the tooltip
|
|
||||||
$compile(errorElem)($scope);
|
|
||||||
errorElem.show();
|
errorElem.show();
|
||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue