Cdnfsd_StackPath2_Page_View.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. jQuery(function($) {
  2. function w3tc_stackpath_resize(o) {
  3. o.resize();
  4. }
  5. $('body')
  6. .on('click', '.w3tc_cdn_stackpath2_fsd_authorize', function() {
  7. W3tc_Lightbox.open({
  8. id:'w3tc-overlay',
  9. close: '',
  10. width: 800,
  11. height: 300,
  12. url: ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  13. '&w3tc_action=cdn_stackpath2_fsd_intro',
  14. callback: w3tc_stackpath_resize
  15. });
  16. })
  17. .on('click', '.w3tc_cdn_stackpath2_fsd_list_stacks', function() {
  18. var url = ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  19. '&w3tc_action=cdn_stackpath2_fsd_list_stacks';
  20. W3tc_Lightbox.load_form(url, '.w3tc_cdn_stackpath2_fsd_form', w3tc_stackpath_resize);
  21. })
  22. .on('click', '.w3tc_cdn_stackpath2_fsd_list_sites', function() {
  23. var url = ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  24. '&w3tc_action=cdn_stackpath2_fsd_list_sites';
  25. W3tc_Lightbox.load_form(url, '.w3tc_cdn_stackpath2_fsd_form', w3tc_stackpath_resize);
  26. })
  27. .on('click', '.w3tc_cdn_stackpath2_fsd_view_site', function() {
  28. var url = ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  29. '&w3tc_action=cdn_stackpath2_fsd_view_site';
  30. W3tc_Lightbox.load_form(url, '.w3tc_cdn_stackpath2_fsd_form', w3tc_stackpath_resize);
  31. })
  32. .on('click', '.w3tc_cdn_stackpath2_fsd_configure_site', function() {
  33. var url = ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  34. '&w3tc_action=cdn_stackpath2_fsd_configure_site';
  35. W3tc_Lightbox.load_form(url, '.w3tc_cdn_stackpath2_fsd_form', w3tc_stackpath_resize);
  36. })
  37. .on('click', '.w3tc_cdn_stackpath2_fsd_configure_site_skip', function() {
  38. var url = ajaxurl + '?action=w3tc_ajax&_wpnonce=' + w3tc_nonce +
  39. '&w3tc_action=cdn_stackpath2_fsd_configure_site_skip';
  40. W3tc_Lightbox.load_form(url, '.w3tc_cdn_stackpath2_fsd_form', w3tc_stackpath_resize);
  41. })
  42. .on('click', '.w3tc_cdn_stackpath2_fsd_done', function() {
  43. // refresh page
  44. window.location = window.location + '&';
  45. })
  46. });