Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed collapsing tooltips #756

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ In order to read more about upgrading and BC breaks have a look at the [UPGRADE

## 5.0.2

+ [#756](https://github.com/luyadev/luya-module-admin/pull/756) Fixed collapsing tooltips due empty content in this case the tooltip is no longer displayed
+ [#755](https://github.com/luyadev/luya-module-admin/pull/755) Provided popup delay `tooltip-popup-delay` for tooltip directive.
+ [#754](https://github.com/luyadev/luya-module-admin/pull/754) Improved setup outputs.
+ [#754](https://github.com/luyadev/luya-module-admin/pull/754) Improved `admin/setup` command outputs.

## 5.0.1 (7. February 2024)

Expand Down
29 changes: 16 additions & 13 deletions src/resources/js/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,13 @@ zaa.directive("linkObjectToString", function () {
* ```
*
*
* You can provide an Image URL beside or instead of text.
* In order to trigger an expression call instead of a static text use:
*
* ```html
* <span tooltip tooltip-image-url="http://image.url">...</span>
* <span tooltip tooltip-expression="scopeFunction(fooBar)">Span Text</span>
* ```
*
*
*
* Change the position (`top`, `right`, `bottom` or `left`):
*
* ```html
Expand All @@ -155,20 +156,20 @@ zaa.directive("linkObjectToString", function () {
* ```
*
*
* In order to trigger an expression call instead of a static text use:
*
* ```html
* <span tooltip tooltip-expression="scopeFunction(fooBar)">Span Text</span>
* ```
*
*
* Display a tooltip with delay in milliseconds:
*
* ```html
* <span tooltip tooltip-text="Tooltip" tooltip-popup-delay="500">...</span>
* ```
*
*
* You can provide an Image URL beside or instead of text.
*
*
* ```html
* <span tooltip tooltip-image-url="http://image.url">...</span>
* ```
*
*
* Disable tooltip based on variable (two way binding):
*
* ```html
Expand Down Expand Up @@ -262,8 +263,10 @@ zaa.directive("tooltip", ['$document', '$http', '$timeout', function ($document,
}

// Generate tooltip HTML for the first time
if ((!scope.pop || lastValue != scope.tooltipText) && (typeof scope.tooltipDisabled === 'undefined' || scope.tooltipDisabled === false)) {

if ( (!scope.pop || lastValue != scope.tooltipText)
&& (typeof scope.tooltipDisabled === 'undefined' || scope.tooltipDisabled === false)
&& (scope.tooltipText || scope.tooltipImageUrl || scope.tooltipPreviewUrl) ) {

lastValue = scope.tooltipText

var html = '<div class="tooltip tooltip-' + (scope.tooltipPosition || defaultPosition) + (scope.tooltipImageUrl ? ' tooltip-image' : '') + '" role="tooltip">' +
Expand Down
Loading