From 128dd0e9dac0f7d889d15a187a45e6a80784f35f Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Wed, 6 Sep 2017 13:59:22 +0000 Subject: - Tooltip Safari Problem git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6463 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/js/admin.js | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'views/js/admin.js') diff --git a/views/js/admin.js b/views/js/admin.js index c0143ce..fa32ba8 100644 --- a/views/js/admin.js +++ b/views/js/admin.js @@ -147,16 +147,34 @@ function wpsg_in_array(needle, haystack) } + var po; + function wpsg_ajaxBind() { // Hilfe Tooltips jQuery('*[data-wpsg-tip]').on('click', function() { - jQuery(this).off('click').on('click', function() { return false; } ); + //jQuery(this).off('click').on('click', function() { return false; } ); - var po = this; - + if (typeof po === "object") + { + + if (po != this) jQuery(po).popover('hide'); + + } + + po = this; + + if (jQuery(this).hasClass('activated')) + { + + jQuery(this).popover('show'); + + return false; + + } + jQuery(this).popover( { 'html': true, 'content': '
' + wpsg_ajax.label_pleasewait + '
', @@ -180,6 +198,8 @@ function wpsg_in_array(needle, haystack) } } ); + jQuery(this).addClass('activated'); + return false; } ); @@ -202,6 +222,12 @@ function wpsg_in_array(needle, haystack) return false; } ); + + jQuery("html,body").on("click touchstart", function() { + + if (typeof po === "object") jQuery(po).popover('hide'); + + }); jQuery('.wpsg_showhide_filter').bind('click', function() { -- cgit v1.2.3