/modules/sms_devel/js/sms_devel_virtualgw.js

https://gitlab.com/vozmob/smsframework · JavaScript · 33 lines · 19 code · 4 blank · 10 comment · 0 complexity · a86945d7c250d419b594ada6aa324819 MD5 · raw file

  1. /**
  2. * @file
  3. *
  4. * Handles AJAX submission and response in SMS Framework: Devel virtual gateway
  5. */
  6. sms_devel.virtualgw.getactivity = function() {
  7. var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/smsframework/devel/virtualgw/getactivity";
  8. $.ajax({
  9. url: url,
  10. dataType: 'json',
  11. success: function () {
  12. // Check was successful.
  13. $("#clean-url input.form-radio").attr("disabled", false);
  14. $("#clean-url input.form-radio").attr("checked", 1);
  15. $("#clean-url .description span").append('<div class="ok">'+ Drupal.settings.cleanURL.success +"</div>");
  16. $("#testing").hide();
  17. },
  18. error: function() {
  19. // Check failed.
  20. $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>");
  21. $("#testing").hide();
  22. }
  23. });
  24. $("#clean-url").addClass('clean-url-processed');
  25. };
  26. this.timer = setTimeout(sms_devel.virtualgw.getactivity, 1000);
  27. //if (this.timer) {
  28. // clearTimeout(this.timer);
  29. //}