removing tests for ranking
This commit is contained in:
@@ -12,32 +12,6 @@
|
|||||||
type='text/javascript'
|
type='text/javascript'
|
||||||
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
|
||||||
</script>
|
</script>
|
||||||
<script>
|
|
||||||
$(function() {
|
|
||||||
$("td.rankingtoggle").click( function() {
|
|
||||||
var workout_id = $(this).attr('workoutid');
|
|
||||||
console.log(workout_id);
|
|
||||||
$.getJSON(window.location.protocol + '//'+window.location.host + '/rowers/workout/'+workout_id+'/toggle-ranking/', function(json) {
|
|
||||||
console.log(JSON.stringify(json));
|
|
||||||
rankingpiece = json.result;
|
|
||||||
tdid = "#star"+workout_id;
|
|
||||||
console.log(rankingpiece);
|
|
||||||
console.log($(tdid).length);
|
|
||||||
if (rankingpiece) {
|
|
||||||
$(tdid).addClass('yellow');
|
|
||||||
$(tdid).removeClass('notyellow');
|
|
||||||
$(tdid).html('☆');
|
|
||||||
console.log('adding yellow '+tdid);
|
|
||||||
} else {
|
|
||||||
$(tdid).removeClass('yellow');
|
|
||||||
$(tdid).addClass('notyellow');
|
|
||||||
$(tdid).html('☆');
|
|
||||||
console.log('remove yellow '+tdid);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
@@ -100,16 +74,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{% if rankingonly and not team %}
|
|
||||||
<a href="/rowers/list-workouts/">
|
|
||||||
<i class="far fa-star"></i>Show All Workouts
|
|
||||||
</a>
|
|
||||||
{% elif not team %}
|
|
||||||
<a href="/rowers/list-workouts/ranking/">
|
|
||||||
<i class="fas fa-star"></i>Show Only Ranking Pieces
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
<p>
|
<p>
|
||||||
<span>
|
<span>
|
||||||
{% if workouts.has_previous %}
|
{% if workouts.has_previous %}
|
||||||
|
|||||||
@@ -298,7 +298,6 @@ class WorkoutCompareTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'workouts':[1,2,3]
|
'workouts':[1,2,3]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,7 +395,6 @@ class WorkoutBoxPlotTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'workouts':[1,2,3]
|
'workouts':[1,2,3]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +492,6 @@ class WorkoutHistoTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'workouts':[1,2,3]
|
'workouts':[1,2,3]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -779,7 +776,6 @@ class WorkoutFlexallTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'workouts':[1,2,3]
|
'workouts':[1,2,3]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -884,7 +880,6 @@ class WorkoutStatsTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'ids':[1,2,3],
|
'ids':[1,2,3],
|
||||||
'userid':self.u.id,
|
'userid':self.u.id,
|
||||||
}
|
}
|
||||||
@@ -947,7 +942,6 @@ class WorkoutStatsTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'ids':[1,2,3],
|
'ids':[1,2,3],
|
||||||
'userid':self.u.id,
|
'userid':self.u.id,
|
||||||
'function':'boxplot'
|
'function':'boxplot'
|
||||||
@@ -1019,7 +1013,6 @@ class WorkoutStatsTestNew(TestCase):
|
|||||||
'includereststrokes':False,
|
'includereststrokes':False,
|
||||||
'modality':'all',
|
'modality':'all',
|
||||||
'waterboattype':['1x','2x','4x'],
|
'waterboattype':['1x','2x','4x'],
|
||||||
'rankingonly':False,
|
|
||||||
'workouts':[1,2,3]
|
'workouts':[1,2,3]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ class URLTests(TestCase):
|
|||||||
'/rowers/list-graphs/',
|
'/rowers/list-graphs/',
|
||||||
'/rowers/list-jobs/',
|
'/rowers/list-jobs/',
|
||||||
'/rowers/list-workouts/',
|
'/rowers/list-workouts/',
|
||||||
'/rowers/list-workouts/ranking/',
|
|
||||||
'/rowers/list-workouts/user/1/',
|
'/rowers/list-workouts/user/1/',
|
||||||
'/rowers/me/calcdps/',
|
'/rowers/me/calcdps/',
|
||||||
'/rowers/me/edit/',
|
'/rowers/me/edit/',
|
||||||
@@ -157,7 +156,6 @@ class URLTests(TestCase):
|
|||||||
'/rowers/workout/'+encoded1+'/split/',
|
'/rowers/workout/'+encoded1+'/split/',
|
||||||
'/rowers/workout/'+encoded1+'/stats/',
|
'/rowers/workout/'+encoded1+'/stats/',
|
||||||
'/rowers/workout/'+encoded1+'/stream/',
|
'/rowers/workout/'+encoded1+'/stream/',
|
||||||
'/rowers/workout/'+encoded1+'/toggle-ranking/',
|
|
||||||
'/rowers/workout/'+encoded1+'/undosmoothenpace/',
|
'/rowers/workout/'+encoded1+'/undosmoothenpace/',
|
||||||
'/rowers/workout/'+encoded1+'/unsubscribe/',
|
'/rowers/workout/'+encoded1+'/unsubscribe/',
|
||||||
'/rowers/workout/'+encoded1+'/view/',
|
'/rowers/workout/'+encoded1+'/view/',
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ defaultoptions = {
|
|||||||
'includereststrokes': False,
|
'includereststrokes': False,
|
||||||
'workouttypes':['rower','dynamic','slides'],
|
'workouttypes':['rower','dynamic','slides'],
|
||||||
'waterboattype': mytypes.waterboattype,
|
'waterboattype': mytypes.waterboattype,
|
||||||
'rankingonly': False,
|
|
||||||
'function':'boxplot'
|
'function':'boxplot'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,11 +77,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
|
|||||||
worldclass = False
|
worldclass = False
|
||||||
|
|
||||||
|
|
||||||
try:
|
|
||||||
rankingonly = options['rankingonly']
|
|
||||||
except KeyError: # pragma: no cover
|
|
||||||
rankingonly = False
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
includereststrokes = options['includereststrokes']
|
includereststrokes = options['includereststrokes']
|
||||||
except KeyError: # pragma: no cover
|
except KeyError: # pragma: no cover
|
||||||
@@ -129,12 +123,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
|
|||||||
if modality != 'water':
|
if modality != 'water':
|
||||||
waterboattype = [b[0] for b in mytypes.boattypes]
|
waterboattype = [b[0] for b in mytypes.boattypes]
|
||||||
|
|
||||||
|
|
||||||
if 'rankingonly' in optionsform.cleaned_data:
|
|
||||||
rankingonly = optionsform.cleaned_data['rankingonly']
|
|
||||||
else: # pragma: no cover
|
|
||||||
rankingonly = False
|
|
||||||
|
|
||||||
options['modalities'] = modalities
|
options['modalities'] = modalities
|
||||||
options['waterboattype'] = waterboattype
|
options['waterboattype'] = waterboattype
|
||||||
try:
|
try:
|
||||||
@@ -224,8 +212,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
|
|||||||
).exclude(boattype__in=negtypes)
|
).exclude(boattype__in=negtypes)
|
||||||
|
|
||||||
|
|
||||||
if rankingonly: # pragma: no cover
|
|
||||||
workouts = workouts.exclude(rankingpiece=False)
|
|
||||||
|
|
||||||
query = request.POST.get('q')
|
query = request.POST.get('q')
|
||||||
if query: # pragma: no cover
|
if query: # pragma: no cover
|
||||||
@@ -257,7 +243,6 @@ def analysis_new(request,userid=0,function='boxplot',teamid=0,id=''):
|
|||||||
optionsform = AnalysisOptionsForm(initial={
|
optionsform = AnalysisOptionsForm(initial={
|
||||||
'modality':modality,
|
'modality':modality,
|
||||||
'waterboattype':waterboattype,
|
'waterboattype':waterboattype,
|
||||||
'rankingonly':rankingonly,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user