PluginProbe ʕ •ᴥ•ʔ
reCaptcha by BestWebSoft / 1.65
reCaptcha by BestWebSoft v1.65
1.79 1.80 1.82 1.83 1.84 1.85 1.86 1.87 trunk 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.30 1.31 1.32 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.40 1.41 1.42 1.43 1.44 1.45 1.46 1.47 1.48 1.49 1.50 1.51 1.52 1.53 1.54 1.55 1.56 1.57 1.58 1.59 1.60 1.61 1.62 1.63 1.64 1.65 1.66 1.67 1.68 1.70 1.71 1.72 1.73 1.74 1.75 1.78
google-captcha / bws_menu / js / bws_tooltip.js
google-captcha / bws_menu / js Last commit date
bws_menu.js 4 years ago bws_tooltip.js 4 years ago c_o_o_k_i_e.js 4 years ago codemirror.js 4 years ago general_script.js 4 years ago shortcode-button.js 4 years ago
bws_tooltip.js
91 lines
1 /**
2 * BWS tooltip function
3 *
4 */
5 (function($) {
6 "use strict";
7 $(document).ready( function() {
8 jQuery.bwsTooltip = function( pointer_options ) {
9 var pointer_buttons = pointer_options['buttons'];
10 /* extend pointer options - add close button */
11 pointer_options = $.extend( pointer_options, {
12 buttons: function(event, t) {
13 var button = '';
14 /* check and add dismiss-type buttons */
15 for ( var but in pointer_buttons ) {
16 if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] == 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
17 button += '<a style="margin:0px 5px 2px;" class="button-secondary">' + pointer_buttons[ but ]['text'] + '</a>';
18 }
19 }
20 button = jQuery( button );
21 button.on('click.pointer', function () {
22 t.element.pointer('close');
23 });
24 return button;
25 },
26 /* add ajax dismiss functionality */
27 close : $.proxy(function () {
28 if ( pointer_options['actions']['onload'] == true ) {
29 $.post( ajaxurl, this );
30 }
31 }, {
32 pointer: pointer_options['tooltip_id'],
33 action: 'dismiss-wp-pointer'
34 })
35 });
36 /* function to display pointer */
37 function displayPointer( cssSelector ) {
38 cssSelector.pointer( pointer_options ).pointer({
39 pointerClass: 'wp-pointer ' + pointer_options["tooltip_id"],
40 content: pointer_options['content'],
41 position: {
42 edge: pointer_options['position']['edge'],
43 align: pointer_options['position']['align'],
44 },
45 }).pointer('open');
46 /* display buttons that are not type of dismiss */
47 for ( var but in pointer_buttons ) {
48 if ( typeof pointer_buttons[ but ]['type'] != 'undefined' && pointer_buttons[ but ]['type'] != 'dismiss' && typeof pointer_buttons[ but ]['text'] != 'undefined' && pointer_buttons[ but ]['text'] != '' ) {
49 $( '.' + pointer_options['tooltip_id'] + ' .button-secondary').first().before( '<a class="button-primary" style="margin-right: 5px;" ' +
50 ( ( pointer_buttons[ but ]['type'] == 'link' && typeof pointer_buttons[ but ]['link'] != 'undefined' && pointer_buttons[ but ]['link'] != '') ? 'target="_blank" href="' + pointer_buttons[ but ]['link'] + '"' : '' )
51 + '>' + pointer_buttons[ but ]['text'] + '</a>' );
52 };
53 }
54 /* adjust position of pointer */
55 var topPos,
56 leftPos,
57 pointerZindex;
58 topPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css("top") ) + parseInt( pointer_options['position']['pos-top'] );
59 leftPos = parseInt( $( "." + pointer_options["tooltip_id"] ).css("left") ) + parseInt( pointer_options['position']['pos-left'] );
60 if ( pointer_options['position']['align'] == 'left' ) {
61 leftPos += cssSelector.outerWidth()/2;
62 };
63 $( "." + pointer_options["tooltip_id"] ).css({ "top": topPos + "px", "left": leftPos + "px" });
64 /* adjust z-index if need */
65 pointerZindex = parseInt( $( "." + pointer_options["tooltip_id"] ).css("z-index") );
66 if ( pointerZindex != pointer_options['position']['zindex'] ) {
67 $( "." + pointer_options["tooltip_id"] ).css({ "z-index": pointer_options['position']['zindex'] });
68 }
69 }
70
71 /* display pointer for the first time */
72 if ( pointer_options['actions']['onload'] ) {
73 if ( pointer_options['set_timeout'] > 0 ) {
74 var settime = parseInt( pointer_options['set_timeout'] );
75 setTimeout( function() {
76 displayPointer( $( pointer_options['css_selector'] ) );
77 }, settime );
78 } else {
79 displayPointer( $( pointer_options['css_selector'] ) );
80 }
81 }
82
83 /* display pointer when clicked on selector */
84 if ( pointer_options['actions']['click'] ) {
85 $( pointer_options['css_selector'] ).click( function () {
86 displayPointer( $( this ) );
87 });
88 }
89 };
90 })
91 })(jQuery);