Skip to content

Commit

Permalink
should work now, temp closes #156
Browse files Browse the repository at this point in the history
  • Loading branch information
45kb committed Apr 30, 2016
1 parent 7b720e1 commit 55449ed
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 23 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-tooltips",
"version": "1.0.9",
"version": "1.0.10",
"description": "Angular.js tooltips module.",
"authors": [
"Filippo Oretti <filippo.oretti@gmail.com",
Expand Down
6 changes: 3 additions & 3 deletions dist/angular-tooltips.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/angular-tooltips.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/angular-tooltips.css.min.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions dist/angular-tooltips.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* angular-tooltips
* 1.0.9
* 1.0.10
*
* Angular.js tooltips module.
* http://720kb.github.io/angular-tooltips
*
* MIT license
* Wed Apr 13 2016
* Sat Apr 30 2016
*/
/*global angular,window*/
(function withAngular(angular, window) {
Expand Down Expand Up @@ -238,7 +238,7 @@
if ($attrs.tooltipTemplate &&
$attrs.tooltipTemplateUrl) {

throw new Error('You can not define tooltip-template and tooltip-url together');
throw new Error('You can not define tooltip-template and tooltip-template-url together');
}

if (!($attrs.tooltipTemplateUrl || $attrs.tooltipTemplate) &&
Expand Down Expand Up @@ -288,6 +288,7 @@
}
}
, onTooltipShow = function onTooltipShow(event) {

tipElement.addClass('_hidden');
if ($attrs.tooltipSmart) {

Expand Down Expand Up @@ -549,14 +550,18 @@
, onTooltipTemplateChange = function onTooltipTemplateChange(newValue) {

if (newValue) {

tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
tipTipElement.empty();
tipTipElement.append(closeButtonElement);
tipTipElement.append(newValue);
$timeout(function doLater() {
$timeout(function doLaterShow() {

onTooltipShow();
});
} else {
//hide tooltip because is empty
tipTipElement.empty();
tooltipElement.addClass('_force-hidden'); //force to be hidden if empty
}
}
, onTooltipTemplateUrlChange = function onTooltipTemplateUrlChange(newValue) {
Expand All @@ -568,6 +573,7 @@
if (response &&
response.data) {

tooltipElement.removeClass('_force-hidden'); //see lines below, this forces to hide tooltip when is empty
tipTipElement.empty();
tipTipElement.append(closeButtonElement);
tipTipElement.append($compile(response.data)(scope));
Expand All @@ -577,6 +583,10 @@
});
}
});
} else {
//hide tooltip because is empty
tipTipElement.empty();
tooltipElement.addClass('_force-hidden'); //force to be hidden if empty
}
}
, onTooltipSideChange = function onTooltipSideChange(newValue) {
Expand Down
Loading

0 comments on commit 55449ed

Please sign in to comment.