bug fix
This commit is contained in:
@@ -1 +0,0 @@
|
||||
E408191@CZ27LT9RCGN72.1800:1516641451
|
||||
@@ -162,6 +162,42 @@
|
||||
});
|
||||
});
|
||||
|
||||
frm.submit(function() {
|
||||
console.log("Form submission");
|
||||
$(data.values()).each(function(value) {
|
||||
console.log(value);
|
||||
});
|
||||
|
||||
$("#id_drop-files").replaceWith(
|
||||
'<div id="id_waiting"><img src="/static/img/ajax_loader_blue_350.gif" width="120" height="100">'
|
||||
);
|
||||
$.ajax({
|
||||
data: data,
|
||||
type: $(this).attr('method'),
|
||||
url: '/rowers/workout/{{ workout.id }}/image',
|
||||
contentType: false,
|
||||
processData: false,
|
||||
error: function(result) {
|
||||
$("#id_waiting").replaceWith(
|
||||
'<div id="id_failed" class="grid_12 alpha message">Your upload failed</div>'
|
||||
);
|
||||
setTimeout(function() {
|
||||
location.reload();
|
||||
},1000);
|
||||
},
|
||||
success: function(result) {
|
||||
console.log('got something back');
|
||||
console.log(result);
|
||||
if (result.result == 1) {
|
||||
window.location.href = result.url;
|
||||
} else {
|
||||
console.log(result," reloading");
|
||||
location.reload();
|
||||
};
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
$('#id_drop-files').bind({
|
||||
|
||||
Reference in New Issue
Block a user