Skip to content

Commit

Permalink
use jquery ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed May 30, 2015
1 parent ea75383 commit 5bd5685
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions media/com_joomlaupdate/js/update.js
Expand Up @@ -34,7 +34,7 @@ function doAjax(data, successCallback, errorCallback)

var structure =
{
onSuccess: function(msg, responseXML)
success: function(msg, responseXML)
{
// Initialize
var junk = null;
Expand Down Expand Up @@ -88,7 +88,7 @@ function doAjax(data, successCallback, errorCallback)
// Call the callback function
successCallback(data);
},
onFailure: function(req) {
error: function(req) {
var message = 'AJAX Loading Error: '+req.statusText;
if (joomlaupdate_error_callback != null)
{
Expand All @@ -97,10 +97,9 @@ function doAjax(data, successCallback, errorCallback)
}
};

var ajax_object = null;
structure.url = joomlaupdate_ajax_url;
ajax_object = new Request(structure);
ajax_object.send(post_data);
structure.method = "GET";
jQuery.ajax(structure);
}

/**
Expand Down Expand Up @@ -196,7 +195,7 @@ function processUpdateStep(data)

jQuery(function($) {
pingUpdate();
var $el = $('div.joomlaupdate_spinner');
$el.attr('spinner', {class: 'joomlaupdate_spinner'});
$el.get(0).spin();
//var $el = $('div.joomlaupdate_spinner');
//$el.attr('spinner', {class: 'joomlaupdate_spinner'});
//$el.get(0).spin();
});

0 comments on commit 5bd5685

Please sign in to comment.