-
Notifications
You must be signed in to change notification settings - Fork 488
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5596 from IQSS/3925-tooltip-icons
3925 tooltip icons
- Loading branch information
Showing
50 changed files
with
769 additions
and
787 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
33 changes: 30 additions & 3 deletions
33
doc/sphinx-guides/source/_static/dv_rebind_bootstrap_ui.js
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,4 +1,31 @@ | ||
function bind_tooltip(){ | ||
// bind tooltips to all necessary elements | ||
$("a.bootstrap-button-tooltip").tooltip({container: 'body'}); | ||
function bind_bsui_components(){ | ||
bind_tooltip_popover(); | ||
} | ||
|
||
function bind_tooltip_popover(){ | ||
// bind tooltips + popovers to all necessary elements | ||
$jqTheme(".bootstrap-button-tooltip, [data-toggle='tooltip']").tooltip({container: 'body'}); | ||
$jqTheme("[data-toggle='popver']").popover({container: 'body'}); | ||
|
||
// CLOSE OPEN TOOLTIPS + POPOVERS ON BODY CLICKS | ||
$jqTheme('body').on("touchstart", function(e){ | ||
$jqTheme(".bootstrap-button-tooltip, [data-toggle='tooltip']").each(function () { | ||
// hide any open tooltips when anywhere else in body is clicked | ||
if (!$jqTheme(this).is(e.target) && $jqTheme(this).has(e.target).length === 0 && $jqTheme('div.tooltip').has(e.target).length === 0) { | ||
$jqTheme(this).tooltip('hide'); | ||
}////end if | ||
}); | ||
$jqTheme("a.popoverHTML, [data-toggle='popover']").each(function () { | ||
//the 'is' for buttons that trigger popups | ||
//the 'has' for icons within a button that triggers a popup | ||
if (!$jqTheme(this).is(e.target) && $jqTheme(this).has(e.target).length === 0 && $jqTheme('div.popover').has(e.target).length === 0) { | ||
$jqTheme(this).popover('hide'); | ||
} | ||
}); | ||
}); | ||
|
||
// CLOSE OPEN TOOLTIPS ON BUTTON CLICKS | ||
$jqTheme('.bootstrap-button-tooltip').on('click', function () { | ||
$jqTheme(this).tooltip('hide'); | ||
}); | ||
} |
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
Large diffs are not rendered by default.
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
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
Oops, something went wrong.