Skip to content

Commit c92b58c

Browse files
author
kmoroder
committed
Remove console logs, update readme
1 parent 9c8d1e9 commit c92b58c

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

Readme.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ tooltip-template="" | String() | '' | Set your tooltip template (HTML or just Te
8787
| | | **to know**: don't use it together with `tooltip-template-url` attribute, use only one of them
8888
tooltip-template-url="" | String() | '' | Set your external tooltip template PATH
8989
| | | **to know**: don't use it together with `tooltip-template` attribute, use only one of them
90-
tooltip-template-url-cache="" | String(Boolean) | false | This attribute stores and retrieves the template from the cache
90+
tooltip-controller="" | String() | '' | Set a controller to your external tooltip template
91+
tooltip-template-url-cache="" | String(Boolean) | true | This attribute stores and retrieves the template from the cache
9192
tooltip-smart="" | String(Boolean) | false | Set the tooltip to automatically search the best position on the screen
9293
tooltip-show-trigger="" | String('event1 event2') | 'mouseover' | Show the tooltip on specific event/events
9394
tooltip-hide-trigger="" | String('event1 event2') | 'mouseleave' | Hide the tooltip on specific event/events

dist/angular-tooltips.js

+13-23
Original file line numberDiff line numberDiff line change
@@ -580,37 +580,30 @@
580580
}
581581
}
582582
, onTooltipTemplateUrlChange = function onTooltipTemplateUrlChange(newValue) {
583-
/* tslint:disable */
584-
console.log('======inside on tooltip url fn');
585583
if (newValue) {
586584

587-
var applyTemplate = function(template) {
588-
tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
589-
tipTipElement.empty();
590-
tipTipElement.append(closeButtonElement);
591-
tipTipElement.append($compile(response.data)(scope));
592-
$timeout(function doLater() {
593-
onTooltipShow();
594-
});
595-
}
596-
597585
$http.get(newValue).then(function onResponse(response) {
598-
if (response && response.data) {
599-
var template = $templateCache.put(newValue, response.data);
600-
applyTemplate(template);
586+
587+
if (response &&
588+
response.data) {
589+
590+
tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
591+
tipTipElement.empty();
592+
tipTipElement.append(closeButtonElement);
593+
tipTipElement.append($compile(response.data)(scope));
594+
$timeout(function doLater() {
595+
596+
onTooltipShow();
597+
});
601598
}
602599
});
603-
604600
} else {
605601
//hide tooltip because is empty
606602
tipTipElement.empty();
607603
tooltipElement.addClass('_force-hidden'); //force to be hidden if empty
608604
}
609605
}
610-
611606
, onTooltipTemplateUrlCacheChange = function onTooltipTemplateUrlCacheChange(newValue) {
612-
613-
console.log('SUCCESS!!! === inside on tooltip cache change function');
614607
if (newValue) {
615608

616609
var applyTemplate = function(template) {
@@ -625,20 +618,17 @@
625618

626619
if ($attrs.tooltipTemplateUrl) {
627620
var template = $templateCache.get($attrs.tooltipTemplateUrl);
628-
console.log('template is .... ', template);
629621

630622
if (typeof template !== 'undefined') {
631623
applyTemplate(cachedTemplate)
632624
return;
633625
}
634-
635626
} else {
636627
//hide tooltip because is empty
637628
tipTipElement.empty();
638629
tooltipElement.addClass('_force-hidden'); //force to be hidden if empty
639630
}
640631
}
641-
642632
, onTooltipSideChange = function onTooltipSideChange(newValue) {
643633

644634
if (newValue) {
@@ -841,7 +831,7 @@
841831
'priority': 1,
842832
'terminal': true,
843833
'link': linkingFunction
844-
};
834+
});
845835
}];
846836

847837
angular.module('720kb.tooltips', [])

0 commit comments

Comments
 (0)