show and unshow fav chart notes according user setting
This commit is contained in:
@@ -6034,6 +6034,7 @@ def workout_workflow_view(request,id):
|
||||
'mapscript':mapscript,
|
||||
'mapdiv':mapdiv,
|
||||
'statcharts':statcharts,
|
||||
'rower':r,
|
||||
})
|
||||
|
||||
# The famous flex chart
|
||||
@@ -6052,7 +6053,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
try:
|
||||
favoritenr = int(request.GET['favoritechart'])
|
||||
except:
|
||||
favoritenr = 0
|
||||
favoritenr = -1
|
||||
|
||||
|
||||
try:
|
||||
@@ -6088,7 +6089,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
try:
|
||||
t = favorites[favoritenr].xparam
|
||||
except IndexError:
|
||||
favoritenr=0
|
||||
favoritenr=-1
|
||||
|
||||
if 'xparam' in kwargs:
|
||||
xparam = kwargs['xparam']
|
||||
@@ -6118,10 +6119,12 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
||||
else:
|
||||
yparam2 = 'hr'
|
||||
|
||||
if favoritenr and r.showfavoritechartnotes:
|
||||
print favoritenr
|
||||
if favoritenr>=0 and r.showfavoritechartnotes:
|
||||
favoritechartnotes = favorites[favoritenr].notes
|
||||
else:
|
||||
favoritechartnotes = ''
|
||||
favoritenr = 0
|
||||
|
||||
if 'plottype' in kwargs:
|
||||
plottype = kwargs['plottype']
|
||||
@@ -8770,6 +8773,7 @@ def rower_edit_view(request,message=""):
|
||||
email = ucd['email']
|
||||
defaultlandingpage = cd['defaultlandingpage']
|
||||
weightcategory = cd['weightcategory']
|
||||
showfavoritechartnotes = cd['showfavoritechartnotes']
|
||||
getemailnotifications = cd['getemailnotifications']
|
||||
defaulttimezone=cd['defaulttimezone']
|
||||
u = request.user
|
||||
@@ -8786,6 +8790,7 @@ def rower_edit_view(request,message=""):
|
||||
r.weightcategory = weightcategory
|
||||
r.getemailnotifications = getemailnotifications
|
||||
r.defaultlandingpage = defaultlandingpage
|
||||
r.showfavoritechartnotes = showfavoritechartnotes
|
||||
r.save()
|
||||
form = RowerForm(instance=r)
|
||||
powerform = RowerPowerForm(instance=r)
|
||||
|
||||
Reference in New Issue
Block a user