Merge branch 'feature/stickypalette' into develop
This commit is contained in:
+28
-3
@@ -3344,6 +3344,27 @@ def user_multiflex_select(request,
|
|||||||
|
|
||||||
r = getrower(user)
|
r = getrower(user)
|
||||||
|
|
||||||
|
if 'options' in request.session:
|
||||||
|
options = request.session['options']
|
||||||
|
else:
|
||||||
|
options = {}
|
||||||
|
|
||||||
|
try:
|
||||||
|
palette = request.session['palette']
|
||||||
|
except KeyError:
|
||||||
|
palette = 'monochrome_blue'
|
||||||
|
|
||||||
|
try:
|
||||||
|
includereststrokes = request.session['includereststrokes']
|
||||||
|
except KeyError:
|
||||||
|
includereststrokes = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
ploterrorbars = request.session['ploterrorbars']
|
||||||
|
except:
|
||||||
|
ploterrobars = False
|
||||||
|
|
||||||
|
|
||||||
if 'startdate' in request.session:
|
if 'startdate' in request.session:
|
||||||
startdate = iso8601.parse_date(request.session['startdate'])
|
startdate = iso8601.parse_date(request.session['startdate'])
|
||||||
|
|
||||||
@@ -3395,7 +3416,11 @@ def user_multiflex_select(request,
|
|||||||
form = WorkoutMultipleCompareForm()
|
form = WorkoutMultipleCompareForm()
|
||||||
form.fields["workouts"].queryset = workouts
|
form.fields["workouts"].queryset = workouts
|
||||||
|
|
||||||
chartform = MultiFlexChoiceForm()
|
chartform = MultiFlexChoiceForm(initial={
|
||||||
|
'palette':palette,
|
||||||
|
'ploterrorbars':ploterrorbars,
|
||||||
|
'includereststrokes':includereststrokes,
|
||||||
|
})
|
||||||
|
|
||||||
messages.info(request,successmessage)
|
messages.info(request,successmessage)
|
||||||
messages.error(request,message)
|
messages.error(request,message)
|
||||||
@@ -3437,9 +3462,9 @@ def multiflex_view(request,userid=0,
|
|||||||
ploterrorbars = False
|
ploterrorbars = False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
palette = options['palette']
|
palette = request.session['palette']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
palette = 'blue_green'
|
palette = 'monochrome_blue'
|
||||||
|
|
||||||
workstrokesonly = not includereststrokes
|
workstrokesonly = not includereststrokes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user