added image attach buttons to edit and workflow
This commit is contained in:
1
rowers/templates/.#image_form.html
Normal file
1
rowers/templates/.#image_form.html
Normal file
@@ -0,0 +1 @@
|
||||
E408191@CZ27LT9RCGN72.1800:1516641451
|
||||
@@ -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({
|
||||
|
||||
5
rowers/templates/panel_uploadimage.html
Normal file
5
rowers/templates/panel_uploadimage.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class="grid_2 alpha">
|
||||
<p>
|
||||
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/image">Attach Image</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -137,8 +137,12 @@
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_6 alpha">
|
||||
|
||||
<div class="grid_2 prefix_4 alpha">
|
||||
<div class="grid_2 alpha">
|
||||
<p>
|
||||
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/image">Attach Image</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="grid_2 prefix_2 omega">
|
||||
<p>
|
||||
<a class="button blue small" href="/rowers/workout/{{ workout.id }}/addpowerpiechart">Power Pie Chart</a>
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user