Private
Public Access
1
0

added image attach buttons to edit and workflow

This commit is contained in:
Sander Roosendaal
2018-01-23 15:10:17 +01:00
parent 22cba46f3b
commit ed56a4179a
6 changed files with 22 additions and 39 deletions

View File

@@ -162,42 +162,6 @@
});
});
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({