PageRenderTime 25ms CodeModel.GetById 13ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 7
 8sms_devel.virtualgw.getactivity = function() {
 9  var url = location.protocol +"//"+ location.host + Drupal.settings.basePath +"admin/smsframework/devel/virtualgw/getactivity";
10  $.ajax({
11    url: url,
12    dataType: 'json',
13    success: function () {
14      // Check was successful.
15      $("#clean-url input.form-radio").attr("disabled", false);
16      $("#clean-url input.form-radio").attr("checked", 1);
17      $("#clean-url .description span").append('<div class="ok">'+ Drupal.settings.cleanURL.success +"</div>");
18      $("#testing").hide();
19    },
20    error: function() {
21      // Check failed.
22      $("#clean-url .description span").append('<div class="warning">'+ Drupal.settings.cleanURL.failure +"</div>");
23      $("#testing").hide();
24    }
25  });
26  $("#clean-url").addClass('clean-url-processed');
27};
28
29this.timer = setTimeout(sms_devel.virtualgw.getactivity, 1000);
30
31//if (this.timer) {
32//  clearTimeout(this.timer);
33//}