MDL-57557 boost: allow any type of popover

This commit is contained in:
Dan Poltawski 2017-01-02 16:53:54 +00:00
parent 9ec952f237
commit facf039a00
2 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
define(["jquery","./tether","core/event"],function(a,b,c){return window.jQuery=a,window.Tether=b,require(["theme_boost/util","theme_boost/alert","theme_boost/button","theme_boost/carousel","theme_boost/collapse","theme_boost/dropdown","theme_boost/modal","theme_boost/scrollspy","theme_boost/tab","theme_boost/tooltip","theme_boost/popover"],function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"}),c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"})})})}),{}});
define(["jquery","./tether","core/event"],function(a,b,c){return window.jQuery=a,window.Tether=b,require(["theme_boost/util","theme_boost/alert","theme_boost/button","theme_boost/carousel","theme_boost/collapse","theme_boost/dropdown","theme_boost/modal","theme_boost/scrollspy","theme_boost/tab","theme_boost/tooltip","theme_boost/popover"],function(){a("body").popover({selector:"[data-toggle=popover][data-trigger!=hover]"}),a("html").popover({container:"body",selector:"[data-toggle=popover][data-trigger=hover]",trigger:"hover"}),c.getLegacyEvents().done(function(b){a(document).on(b.FILTER_CONTENT_UPDATED,function(){a("body").popover({selector:'[data-toggle="popover"]',trigger:"focus"})})})}),{}});

View File

@ -41,9 +41,15 @@ define(['jquery', './tether', 'core/event'], function(jQuery, Tether, Event) {
'theme_boost/popover'],
function() {
// We do twice because: https://github.com/twbs/bootstrap/issues/10547
jQuery('body').popover({
selector: '[data-toggle="popover"]',
trigger: 'focus'
selector: "[data-toggle=popover][data-trigger!=hover]"
});
jQuery("html").popover({
container: "body",
selector: "[data-toggle=popover][data-trigger=hover]",
trigger: "hover"
});
// We need to call popover automatically if nodes are added to the page later.