From 0fc69ce3ad89844dd5fb2f87532e7b6fca55923d Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Tue, 22 Mar 2016 13:59:16 +0000 Subject: - sync git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5439 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/js/admin.js | 87 ++++++++++++++++++++++--------------------------------- 1 file changed, 35 insertions(+), 52 deletions(-) (limited to 'views/js/admin.js') diff --git a/views/js/admin.js b/views/js/admin.js index 7c3d016..f1ad1d3 100644 --- a/views/js/admin.js +++ b/views/js/admin.js @@ -26,58 +26,7 @@ wpsg_number_format = function (number, decimals, dec_point, thousands_sep) { return ui; }; - -jQuery.fn.tipTip = function() { - - if (jQuery(this).hasClass('tipTip')) return; - jQuery(this).addClass('tipTip'); - - jQuery(this).cluetip( { - width: '400px', - height: '400px', - activation: 'click', - sticky: true, - /*mouseOutClose: 'both',*/ - closePosition: 'title', - arrows: true, - closeText: 'Schließen', - onActivate: function() { - - jQuery('#cluetip').hide(); - - }, - onShow: function() { - - jQuery('.cluetip-title').prepend(jQuery('.cluetip-inner h1').first().text()); - jQuery('.cluetip-inner h1').first().remove(); - - jQuery('.cluetip-inner').css('overflow-y', 'show'); - jQuery('.cluetip-inner').css('height', 'auto'); - - var height_content = jQuery('.cluetip-inner').outerHeight(); - var height_title = jQuery('.cluetip-title').outerHeight(); - - if (height_content < 400) - { - - jQuery('.cluetip-outer').height((height_content + height_title) + "px"); - - } - else - { - - jQuery('.cluetip-outer').height("400px"); - - jQuery('.cluetip-inner').css('overflow-y', 'scroll'); - jQuery('.cluetip-inner').css('height', '332px'); - - } - - } - } ); - -}; - + jQuery.fn.wpsg_adminbox = function(options) { return this.each(function() { @@ -193,6 +142,40 @@ function wpsg_in_array(needle, haystack) } jQuery(document).ready(function() { + + // Hilfe Tooltips + jQuery('*[data-wpsg-tip]').bind('click', function() { + + jQuery(this).unbind('click'); + + var po = this; + + jQuery(this).popover( { + 'html': true, + 'content': '
' + wpsg_ajax.label_pleasewait + '
', + 'trigger': 'focus', + 'container': '#wpsg-bs', + 'placement': 'right' + } ).popover('show'); + + jQuery.ajax( { + url: '?page=wpsg-Admin&subaction=loadHelp&noheader=1', + data: { + field: jQuery(this).attr('data-wpsg-tip') + }, + success: function(data) { + + var popover = jQuery(po).attr('data-content', data).data('popover'); + jQuery(po).data('bs.popover').options.content = data; + + jQuery(po).popover('show'); + + } + } ); + + return false; + + } ); jQuery('.wpsg_showhide_filter').bind('click', function() { -- cgit v1.2.3