var percentage = json.job_status == 'completed' ? 100 :
json.job_size > 0 ? Math.floor(100 * json.progress / json.job_size) :
100;
- var bgproperty = (parseInt(percentage/2)*3-300)+"px 0px";
+ var bgproperty = (parseInt(percentage*2)-300)+"px 0px";
$("#jobprogress").css("background-position",bgproperty);
$("#jobprogresspercent").text(percentage);
// gather up form submission
var inputs = [];
- $(':input', f).each(function() {
+ $(':input:enabled', f).each(function() {
if (this.type == 'radio' || this.type == 'checkbox') {
if (this.checked) {
inputs.push(this.name + '=' + encodeURIComponent(this.value));
backgroundJobProgressTimer = setInterval("updateJobProgress()", 500);
},
error: function(xml, textStatus) {
- alert('Failed to submit form: ' + textStatus);
+ humanMsg.displayMsg( '<p>' + __('Import of record(s) failed: ') + textStatus + '</p></br>'+xml.responseText, { className: 'humanError' } );
}
});