show and unshow fav chart notes according user setting
This commit is contained in:
@@ -191,8 +191,8 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if favoritechartnotes %}
|
{% if favoritechartnotes %}
|
||||||
<div class="grid_12 alpha">
|
<div class="grid_6 prefix_6 alpha">
|
||||||
<p>{{ favoritechartnotes }}</p>
|
<p>Chart {{ favoritenr|add:1 }}:{{ favoritechartnotes }}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
<a href="/rowers/workout/{{ workout.id }}/flexchart?favoritechart={{ forloop.counter |add:"-1" }}">
|
<a href="/rowers/workout/{{ workout.id }}/flexchart?favoritechart={{ forloop.counter |add:"-1" }}">
|
||||||
{{ chart.div | safe }}
|
{{ chart.div | safe }}
|
||||||
</a>
|
</a>
|
||||||
|
{% if rower.showfavoritechartnotes %}
|
||||||
<span class="tooltiptext">{{ chart.notes }}</span>
|
<span class="tooltiptext">{{ chart.notes }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -6034,6 +6034,7 @@ def workout_workflow_view(request,id):
|
|||||||
'mapscript':mapscript,
|
'mapscript':mapscript,
|
||||||
'mapdiv':mapdiv,
|
'mapdiv':mapdiv,
|
||||||
'statcharts':statcharts,
|
'statcharts':statcharts,
|
||||||
|
'rower':r,
|
||||||
})
|
})
|
||||||
|
|
||||||
# The famous flex chart
|
# The famous flex chart
|
||||||
@@ -6052,7 +6053,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
try:
|
try:
|
||||||
favoritenr = int(request.GET['favoritechart'])
|
favoritenr = int(request.GET['favoritechart'])
|
||||||
except:
|
except:
|
||||||
favoritenr = 0
|
favoritenr = -1
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -6088,7 +6089,7 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
try:
|
try:
|
||||||
t = favorites[favoritenr].xparam
|
t = favorites[favoritenr].xparam
|
||||||
except IndexError:
|
except IndexError:
|
||||||
favoritenr=0
|
favoritenr=-1
|
||||||
|
|
||||||
if 'xparam' in kwargs:
|
if 'xparam' in kwargs:
|
||||||
xparam = kwargs['xparam']
|
xparam = kwargs['xparam']
|
||||||
@@ -6118,10 +6119,12 @@ def workout_flexchart3_view(request,*args,**kwargs):
|
|||||||
else:
|
else:
|
||||||
yparam2 = 'hr'
|
yparam2 = 'hr'
|
||||||
|
|
||||||
if favoritenr and r.showfavoritechartnotes:
|
print favoritenr
|
||||||
|
if favoritenr>=0 and r.showfavoritechartnotes:
|
||||||
favoritechartnotes = favorites[favoritenr].notes
|
favoritechartnotes = favorites[favoritenr].notes
|
||||||
else:
|
else:
|
||||||
favoritechartnotes = ''
|
favoritechartnotes = ''
|
||||||
|
favoritenr = 0
|
||||||
|
|
||||||
if 'plottype' in kwargs:
|
if 'plottype' in kwargs:
|
||||||
plottype = kwargs['plottype']
|
plottype = kwargs['plottype']
|
||||||
@@ -8770,6 +8773,7 @@ def rower_edit_view(request,message=""):
|
|||||||
email = ucd['email']
|
email = ucd['email']
|
||||||
defaultlandingpage = cd['defaultlandingpage']
|
defaultlandingpage = cd['defaultlandingpage']
|
||||||
weightcategory = cd['weightcategory']
|
weightcategory = cd['weightcategory']
|
||||||
|
showfavoritechartnotes = cd['showfavoritechartnotes']
|
||||||
getemailnotifications = cd['getemailnotifications']
|
getemailnotifications = cd['getemailnotifications']
|
||||||
defaulttimezone=cd['defaulttimezone']
|
defaulttimezone=cd['defaulttimezone']
|
||||||
u = request.user
|
u = request.user
|
||||||
@@ -8786,6 +8790,7 @@ def rower_edit_view(request,message=""):
|
|||||||
r.weightcategory = weightcategory
|
r.weightcategory = weightcategory
|
||||||
r.getemailnotifications = getemailnotifications
|
r.getemailnotifications = getemailnotifications
|
||||||
r.defaultlandingpage = defaultlandingpage
|
r.defaultlandingpage = defaultlandingpage
|
||||||
|
r.showfavoritechartnotes = showfavoritechartnotes
|
||||||
r.save()
|
r.save()
|
||||||
form = RowerForm(instance=r)
|
form = RowerForm(instance=r)
|
||||||
powerform = RowerPowerForm(instance=r)
|
powerform = RowerPowerForm(instance=r)
|
||||||
|
|||||||
Reference in New Issue
Block a user