admin-currency-selector.js
1 year ago
admin-currency-selector.min.js
1 year ago
bacs-accounts-currencies.js
5 years ago
bacs-accounts-currencies.min.js
5 years ago
cart_widget.js
1 month ago
cart_widget.min.js
1 month ago
currency-switcher-settings.js
1 year ago
currency-switcher-settings.min.js
1 year ago
dialogs.js
5 years ago
dialogs.min.js
5 years ago
exchange-rates.js
3 years ago
exchange-rates.min.js
3 years ago
files.js
5 years ago
files.min.js
5 years ago
languages_notice.js
5 years ago
languages_notice.min.js
5 years ago
lock_fields.js
1 year ago
lock_fields.min.js
1 year ago
multi-currency.js
5 years ago
multi-currency.min.js
5 years ago
pointer.js
1 year ago
pointer.min.js
1 year ago
prices.js
5 years ago
prices.min.js
5 years ago
products-screen-option.js
5 years ago
products-screen-option.min.js
5 years ago
scripts.js
1 year ago
scripts.min.js
1 year ago
taxonomy_translation.js
1 year ago
taxonomy_translation.min.js
1 year ago
tooltip_init.js
5 years ago
tooltip_init.min.js
5 years ago
trnsl_interface_dialog_warning.js
5 years ago
trnsl_interface_dialog_warning.min.js
5 years ago
troubleshooting.js
1 year ago
troubleshooting.min.js
1 year ago
wcml-attributes.js
5 years ago
wcml-attributes.min.js
5 years ago
wcml-messages.js
5 years ago
wcml-messages.min.js
5 years ago
wcml-multi-currency.js
1 month ago
wcml-multi-currency.min.js
1 month ago
wcml-setup.js
3 years ago
wcml-setup.min.js
3 years ago
wcml-translation-editor.js
1 week ago
wcml-translation-editor.min.js
1 week ago
widgets.js
5 years ago
widgets.min.js
5 years ago
wpml_tm.js
5 years ago
wpml_tm.min.js
5 years ago
pointer.js
72 lines
| 1 | var WCML_Pointer = WCML_Pointer || {}; |
| 2 | |
| 3 | ( function( $ ) { |
| 4 | WCML_Pointer.openPointer = function( trigger ) { |
| 5 | var content = $( '#' + trigger.data( 'wcml-open-pointer' ) ); |
| 6 | $( '.wcml-information-active-pointer' ).pointer( 'close' ); |
| 7 | |
| 8 | if( trigger.length ) { |
| 9 | trigger.addClass( 'wcml-information-active-pointer' ); |
| 10 | trigger.pointer( { |
| 11 | pointerClass : 'wcml-information-pointer', |
| 12 | content: content.html(), |
| 13 | position: { |
| 14 | edge: 'bottom', |
| 15 | align: 'right' |
| 16 | }, |
| 17 | buttons: function( event, t ) { |
| 18 | var button_close = $( '<a href="javascript:void(0);" class="notice-dismiss alignright"></a>' ); |
| 19 | button_close.on( 'click.pointer', function( e ) { |
| 20 | e.preventDefault(); |
| 21 | t.element.pointer( 'close' ); |
| 22 | }); |
| 23 | return button_close; |
| 24 | }, |
| 25 | show: function( event, t ){ |
| 26 | t.pointer.css( 'marginLeft', '115px' ); |
| 27 | t.pointer.css( 'z-index', '99999' ); |
| 28 | }, |
| 29 | close: function( event, t ){ |
| 30 | t.pointer.css( 'marginLeft', '0' ); |
| 31 | }, |
| 32 | } ).pointer( 'open' ); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | $( 'body' ).on( 'click', '[data-wcml-open-pointer]', function() { |
| 37 | WCML_Pointer.openPointer( $( this ) ); |
| 38 | } ); |
| 39 | |
| 40 | $( 'body' ).on( 'click', 'a', function() { |
| 41 | if( ! $(this).hasClass( 'wcml-pointer-link' ) ){ |
| 42 | $( '.wcml-information-active-pointer' ).pointer( 'close' ); |
| 43 | } |
| 44 | } ); |
| 45 | |
| 46 | } )( jQuery ); |
| 47 | |
| 48 | jQuery( function($) { |
| 49 | |
| 50 | $('.wcml-pointer-block').each( function(){ |
| 51 | var selector = $(this).data('selector'); |
| 52 | if( selector ){ |
| 53 | var insert_method = $(this).data('insert-method'); |
| 54 | switch(insert_method){ |
| 55 | case 'prepend': |
| 56 | $(this).prependTo( $( '#'+selector ) ).show(); |
| 57 | break; |
| 58 | case 'append': |
| 59 | $(this).appendTo( $( '#'+selector ) ).show(); |
| 60 | break; |
| 61 | case 'before': |
| 62 | $(this).insertBefore( $( '#'+selector ) ).show(); |
| 63 | break; |
| 64 | default: |
| 65 | $(this).insertAfter( $( '#'+selector ) ).show(); |
| 66 | } |
| 67 | }else{ |
| 68 | $(this).show(); |
| 69 | } |
| 70 | }); |
| 71 | |
| 72 | }); |