-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use popovers instead of dialogs for help
The popovers are triggered by hovering over the icon. Once the cursor leaves the icon, the popover is hidden. The only exception is if the cursor moved over the actual popover, in which case it will disappear only after the cursor left it. JIRA: PDC-1115
- Loading branch information
Showing
11 changed files
with
80 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<button class="btn btn-default btn-lg pull-right help-button" data-toggle="modal" data-target="#helpOverlay"> | ||
<span class="glyphicon glyphicon-question-sign"></span> Help | ||
<button class="help-trigger btn btn-link btn-lg"> | ||
<span class="glyphicon glyphicon-question-sign"></span> | ||
</button> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="hidden help-content">{{ content }}</div> | ||
|
||
<script type="text/javascript"> | ||
var mouseIn = false; | ||
const timeout = 500; | ||
$("body").on('mouseenter', ".popover", function () { mouseIn = true }); | ||
$("body").on('mouseleave', ".popover", function () { mouseIn = false }); | ||
$(".help-trigger").popover({ | ||
content: function () { return $(".help-content").html(); }, | ||
html: true, | ||
trigger: 'hover', | ||
delay: {hide: timeout}, | ||
viewport: {selector: "body", padding: 100}, | ||
}).on('hide.bs.popover', function () { | ||
if (mouseIn) { | ||
$('.popover').on('mouseleave', function() { | ||
setTimeout(function () { | ||
$('.help-trigger').popover('hide'); | ||
}, timeout)}); | ||
return false; | ||
} | ||
}); | ||
</script> |