document upload
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "newbase.html" %}
|
||||||
{% load staticfiles %}
|
{% load staticfiles %}
|
||||||
{% load rowerfilters %}
|
{% load rowerfilters %}
|
||||||
|
|
||||||
@@ -15,13 +15,15 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main %}
|
||||||
<div id="id_dropregion" class="grid_12 alpha watermark invisible">
|
<div id="id_main">
|
||||||
|
<ul class="main-content">
|
||||||
|
<li class="grid_2">
|
||||||
|
<div id="id_dropregion" class="watermark invisible">
|
||||||
<p>Drag and drop files here </p>
|
<p>Drag and drop files here </p>
|
||||||
</div>
|
</div>
|
||||||
<div id="id_drop-files" class="grid_12 alpha drop-files">
|
<div id="id_drop-files" class="drop-files">
|
||||||
<form id="file_form" enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
<form id="file_form" enctype="multipart/form-data" action="{{ formloc }}" method="post">
|
||||||
<div id="left" class="grid_6 alpha">
|
|
||||||
<h1>Upload Workout File</h1>
|
<h1>Upload Workout File</h1>
|
||||||
{% if user.is_authenticated and user|is_manager %}
|
{% if user.is_authenticated and user|is_manager %}
|
||||||
<p>Looking for <a href="/rowers/workout/upload/team/">Team Manager
|
<p>Looking for <a href="/rowers/workout/upload/team/">Team Manager
|
||||||
@@ -37,13 +39,11 @@
|
|||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div id="formbutton" class="grid_1 prefix_4 suffix_1">
|
|
||||||
<input class="button green" type="submit" value="Submit">
|
<input class="button green" type="submit" value="Submit">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
</div>
|
<li class="grid_2">
|
||||||
<div id="right" class="grid_6 omega">
|
|
||||||
<h1>Optional extra actions</h1>
|
<h1>Optional extra actions</h1>
|
||||||
<p>
|
<p>
|
||||||
<table>
|
<table>
|
||||||
@@ -67,11 +67,12 @@
|
|||||||
|
|
||||||
<p><b>Select Files with the File button or drag them on the marked area</b></p>
|
<p><b>Select Files with the File button or drag them on the marked area</b></p>
|
||||||
|
|
||||||
</div>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -221,8 +222,8 @@ $('#id_workouttype').change();
|
|||||||
console.log(value);
|
console.log(value);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#id_drop-files").replaceWith(
|
$("#id_main").replaceWith(
|
||||||
'<div id="id_waiting"><img src="/static/img/rowingtimer.gif" width="120" height="100">'
|
'<div id="id_waiting"><img src="/static/img/rowingtimer.gif" width="120" height="100" style="width:120px">'
|
||||||
);
|
);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
data: data,
|
data: data,
|
||||||
@@ -310,3 +311,8 @@ $('#id_workouttype').change();
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block sidebar %}
|
||||||
|
{% include 'menu_workouts.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@@ -9923,6 +9923,17 @@ def workout_upload_view(request,
|
|||||||
|
|
||||||
r = getrower(request.user)
|
r = getrower(request.user)
|
||||||
|
|
||||||
|
breadcrumbs = [
|
||||||
|
{
|
||||||
|
'url':'/rowers/list-workouts',
|
||||||
|
'name':'Workouts'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'url': reverse(workout_upload_view),
|
||||||
|
'name': 'Upload'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
if 'uploadoptions' in request.session:
|
if 'uploadoptions' in request.session:
|
||||||
uploadoptions = request.session['uploadoptions']
|
uploadoptions = request.session['uploadoptions']
|
||||||
try:
|
try:
|
||||||
@@ -10280,6 +10291,8 @@ def workout_upload_view(request,
|
|||||||
optionsform = UploadOptionsForm(initial=uploadoptions)
|
optionsform = UploadOptionsForm(initial=uploadoptions)
|
||||||
return render(request, 'document_form.html',
|
return render(request, 'document_form.html',
|
||||||
{'form':form,
|
{'form':form,
|
||||||
|
'active':'nav-workouts',
|
||||||
|
'breadcrumbs':breadcrumbs,
|
||||||
'teams':get_my_teams(request.user),
|
'teams':get_my_teams(request.user),
|
||||||
'optionsform': optionsform,
|
'optionsform': optionsform,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -223,98 +223,6 @@
|
|||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
main .cd-accordion-menu {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 600px;
|
|
||||||
background: #27aae2;
|
|
||||||
padding-left: 30px;
|
|
||||||
padding-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu ul {
|
|
||||||
/* by default hide all sub menus */
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu li {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu input[type=checkbox] {
|
|
||||||
/* hide native checkbox */
|
|
||||||
position: absolute;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu label,
|
|
||||||
main .cd-accordion-menu a {
|
|
||||||
position: relative;
|
|
||||||
display: block;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
main ul label:hover,
|
|
||||||
main ul ul label:hover,
|
|
||||||
main ul ul a:hover,
|
|
||||||
main ul ul ul label:hover,
|
|
||||||
main ul ul ul a:hover {
|
|
||||||
background: #1c74bb;
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu a::before {
|
|
||||||
content: '\00a0';
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
display: inline-block;
|
|
||||||
font-size: inherit;
|
|
||||||
text-rendering: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main .cd-accordion-menu label::before
|
|
||||||
{
|
|
||||||
/* icons */
|
|
||||||
font: normal normal normal 1.0em/1 FontAwesome;
|
|
||||||
font-size: inherit;
|
|
||||||
text-rendering: auto;
|
|
||||||
content: '\f0da';
|
|
||||||
display: inline-block;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
|
|
||||||
-webkit-transform: translateY(0%);
|
|
||||||
-moz-transform: translateY(0%);
|
|
||||||
-ms-transform: translateY(0%);
|
|
||||||
-o-transform: translateY(0%);
|
|
||||||
transform: translateY(0%);
|
|
||||||
}
|
|
||||||
|
|
||||||
main .cd-accordion-menu label {
|
|
||||||
cursor: pointer;
|
|
||||||
background: #27aae2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main .cd-accordion-menu input[type=checkbox]:checked + label::before {
|
|
||||||
/* rotate arrow */
|
|
||||||
-webkit-transform: translateY(20%) rotate(90deg);
|
|
||||||
-moz-transform: translateY(20%) rotate(90deg);
|
|
||||||
-ms-transform: translateY(20%) rotate(90deg);
|
|
||||||
-o-transform: translateY(20%) rotate(90deg);
|
|
||||||
transform: translateY(20%) rotate(90deg);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
main .cd-accordion-menu input[type=checkbox]:checked + label + ul,
|
|
||||||
main .cd-accordion-menu input[type=checkbox]:checked + label:nth-of-type(n) + ul {
|
|
||||||
/* use label:nth-of-type(n) to fix a bug on safari (<= 8.0.8) with multiple adjacent-sibling selectors*/
|
|
||||||
/* show children when item is checked */
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
user ul {
|
user ul {
|
||||||
|
|||||||
Reference in New Issue
Block a user