PluginProbe
SendWP / 1.0.2
SendWP v1.0.2
trunk 0.0.1 0.0.2 0.0.3 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1 1.2.10 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3 1.3.1 1.4.4 1.4.5 1.4.6 1.4.8
sendwp / assets / js / admin / settings.js

settings.js in SendWP 1.0.2, at assets/js/admin/settings.js

41 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 jQuery( document ).ready(function() {
2 jQuery('#spoiler-title').click(function() {
3 if( jQuery('#spoiler-content').hasClass('closed') ) {
4 jQuery('#spoiler-content').removeClass('closed');
5 jQuery('#spoiler-content').addClass('open');
6 jQuery('#spoiler-arrow').removeClass('down');
7 jQuery('#spoiler-arrow').addClass('up');
8 } else {
9 jQuery('#spoiler-content').removeClass('open');
10 jQuery('#spoiler-content').addClass('closed');
11 jQuery('#spoiler-arrow').removeClass('up');
12 jQuery('#spoiler-arrow').addClass('down');
13 }
14 });
15
16 jQuery('#sendwp-enabled-checkbox').change(function() {
17 if( jQuery('#sendwp-enabled-checkbox').is(':checked') ) {
18 jQuery('#sendwp-enabled-status').html(sendwpAdmin.loading);
19 var data = {
20 action: 'sendwp_forwarding',
21 sendwp_forwarding: 'enable',
22 security: sendwpAdmin.ajaxNonce
23 };
24 jQuery.post( ajaxurl, data, function( response ){
25 var response = JSON.parse( response );
26 jQuery('#sendwp-enabled-status').html(sendwpAdmin.enabled);
27 });
28 } else {
29 jQuery('#sendwp-enabled-status').html(sendwpAdmin.loading);
30 var data = {
31 action: 'sendwp_forwarding',
32 sendwp_forwarding: 'disable',
33 security: sendwpAdmin.ajaxNonce
34 };
35 jQuery.post( ajaxurl, data, function( response ){
36 var response = JSON.parse( response );
37 jQuery('#sendwp-enabled-status').html(sendwpAdmin.disabled);
38 });
39 }
40 });
41 });