diff --git a/client/core/src/drop-down/style.scss b/client/core/src/drop-down/style.scss index 626b68156..52adc1199 100644 --- a/client/core/src/drop-down/style.scss +++ b/client/core/src/drop-down/style.scss @@ -3,7 +3,7 @@ vn-drop-down { z-index: 9999; padding: 0 15px; margin-left: -15px; - + background: transparent; ul{ padding: 0; margin: 10px 0 0 0; diff --git a/client/core/src/tooltip/style.css b/client/core/src/tooltip/style.css index 943a92c9c..9d27976c0 100644 --- a/client/core/src/tooltip/style.css +++ b/client/core/src/tooltip/style.css @@ -6,7 +6,6 @@ position: fixed; background-color: #fff; padding: 15px; - max-width: 250px; color: #424242; z-index: 999; border: 1px solid #A7A7A7; @@ -23,6 +22,10 @@ height: 0; } +.tooltip-text{ + max-width: 250px; +} + .tooltip-down .tooltip-arrow { top: -15px; left: 50%; diff --git a/client/core/src/tooltip/tooltip.js b/client/core/src/tooltip/tooltip.js index d7620e41c..ff3f7472f 100644 --- a/client/core/src/tooltip/tooltip.js +++ b/client/core/src/tooltip/tooltip.js @@ -1,18 +1,41 @@ import {module} from '../module'; import './style.css'; -tooltip.$inject = ['$document', '$compile']; -function tooltip($document, $compile) { +tooltip.$inject = ['$document', '$compile', '$sce', '$templateCache', '$http']; +function tooltip($document, $compile, $sce, $templateCache, $http) { + function getTemplate(tooltipTemplateUrl) { + var template = $templateCache.get(tooltipTemplateUrl); + if (typeof template === 'undefined') { + template = $http.get(tooltipTemplateUrl).then(function onGetTemplateSuccess(response) { + return response.data; + }); + $templateCache.put(tooltipTemplateUrl, template); + } + return template; + } + return { restrict: 'A', - scope: true, + priority: -1, link: function(scope, element, attrs) { - var tip = $compile('