Private
Public Access
1
0

not fixed

This commit is contained in:
Sander Roosendaal
2018-10-23 11:23:55 +02:00
parent 966b9a2304
commit a1653f0b7d
2 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
<script
type='text/javascript'
src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js'>
</script>
<script>
$(document).ready(function(){
$(".has-children").each(
function(i, obj) {
var theid = $(this).attr('id');
var state = localStorage.getItem(theid);
if (state !== null) {
$(this).find('input:first').prop("checked",state);
};
});
});
$(function() {
$(".has-children").click( function() {
var theid = $(this).attr('id');
var state = $(this).find('input:first').is(':checked');
localStorage.setItem(theid,state);
});
});
</script>

View File

@@ -834,7 +834,11 @@ def rdata(file,rower=rrower()):
def get_my_teams(user):
try:
therower = Rower.objects.get(user=user)
teams1 = therower.team.all()
try:
teams1 = therower.team.all()
except AttributeError:
teams1 = []
teams2 = Team.objects.filter(manager=user)
teams = list(set(teams1).union(set(teams2)))
except TypeError: