Commit c357f2ad authored by Tom Kunze's avatar Tom Kunze
Browse files

server: beamer mode: Change more default settings via cookies.

parent b22791ff
......@@ -880,7 +880,7 @@ function compressSingleCoordinate(coord_list){
var transformed_coors = {}
var cur = mi;
if(Cookies.get('cipmap-beamer-user') == 'True'){
if(Cookies.get('cipmap-beamer-user') == 'true'){
for(var i = mi; i <= ma; i++){
transformed_coors[i] = cur;
if(used_coords.has(i)){
......
......@@ -112,8 +112,14 @@ def legalnotice(request):
def cipmap_beamer_user(request):
response = redirect('index-room', room='cip2')
response.set_cookie(key='cipmap-beamer-user', value=True, secure=True)
roomname = remote_cip_roomname(request)
response = redirect('index-room', room=roomname)
response.set_cookie(key='cipmap-beamer-user', value='true', secure=True)
response.set_cookie(key='cookieconsent_status', value='dismiss',
secure=True)
response.set_cookie(key='sidebar-collapsed', value='true', secure=True)
response.set_cookie(key='requestbar-collapsed', value='false', secure=True)
response.set_cookie(key='footer-collapsed', value='true', secure=True)
return response
......@@ -324,6 +330,7 @@ def _requests(request, send_hostname=None):
'requests': collections.defaultdict(list),
'exercises': collections.defaultdict(list),
'hostname': send_hostname,
'roomname': remote_cip_roomname(request),
}
for r in Request.objects.\
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment