tinymce
9 years ago
admin-forms.js
8 years ago
admin-forms.min.js
8 years ago
admin-scripts.js
8 years ago
admin-scripts.min.js
8 years ago
admin-settings.js
8 years ago
admin-settings.min.js
8 years ago
admin-shortcodes.js
9 years ago
admin-shortcodes.min.js
9 years ago
admin-widgets.js
8 years ago
admin-widgets.min.js
8 years ago
admin-widgets.js
44 lines
| 1 | /*! |
| 2 | * Give Admin Widgets JS |
| 3 | * |
| 4 | * @description: The Give Admin Widget scripts. Only enqueued on the admin widgets screen; used to validate fields, show/hide, and other functions |
| 5 | * @package: Give |
| 6 | * @subpackage: Assets/JS |
| 7 | * @copyright: Copyright (c) 2016, WordImpress |
| 8 | * @license: http://opensource.org/licenses/gpl-2.0.php GNU Public License |
| 9 | */ |
| 10 | |
| 11 | jQuery.noConflict(); |
| 12 | (function ( $ ) { |
| 13 | |
| 14 | /** |
| 15 | * Show/Hide continue button tile setting on basis of display setting for Give Form widget. |
| 16 | */ |
| 17 | var continue_button_setting_js = function() { |
| 18 | $( '.widget-liquid-right' ).on( 'change', '.give_forms_display_style_setting_row input', function(){ |
| 19 | var $parent = $(this).parents('p'), |
| 20 | $continue_button_title = $parent.next(); |
| 21 | |
| 22 | if( 'onpage' === $('input:checked', $parent ).val() ) { |
| 23 | $continue_button_title.hide(); |
| 24 | } else { |
| 25 | $continue_button_title.show(); |
| 26 | } |
| 27 | }); |
| 28 | }; |
| 29 | |
| 30 | |
| 31 | //On DOM Ready |
| 32 | $( function () { |
| 33 | continue_button_setting_js(); |
| 34 | $( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change'); |
| 35 | } ); |
| 36 | |
| 37 | //Function to Refresh jQuery toggles for Yelp Widget Pro upon saving specific widget |
| 38 | $( document ).ajaxSuccess( function ( e, xhr, settings ) { |
| 39 | continue_button_setting_js(); |
| 40 | $( '.give_forms_display_style_setting_row input', '.widget-liquid-right' ).trigger('change'); |
| 41 | } ); |
| 42 | |
| 43 | |
| 44 | })( jQuery ); |