From 0dde1738cf7b7bea2ccc061ff303ba11c740c5b6 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 18 Apr 2012 18:07:24 +0200 Subject: [PATCH] fixed active line #88 --- openslides/projector/projector.py | 5 +++++ openslides/projector/static/javascript/projector-control.js | 3 ++- .../templates/projector/default_control_slidefunc.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openslides/projector/projector.py b/openslides/projector/projector.py index cb23f73bb..0cbc976cc 100644 --- a/openslides/projector/projector.py +++ b/openslides/projector/projector.py @@ -68,6 +68,11 @@ class Slide(object): self.weight = weight self.name = name + @property + def active(self): + from api import get_active_slide + return get_active_slide(True) == self.key + def get_items(self): try: return self.model.objects.all() diff --git a/openslides/projector/static/javascript/projector-control.js b/openslides/projector/static/javascript/projector-control.js index 3673f37e1..cfa00e525 100644 --- a/openslides/projector/static/javascript/projector-control.js +++ b/openslides/projector/static/javascript/projector-control.js @@ -2,7 +2,7 @@ $(function() { // activate an element to show it on projector $('.activate_link').click(function(event) { event.preventDefault(); - link = $(this); + var link = $(this); $.ajax({ type: 'GET', url: $(this).attr('href'), @@ -12,6 +12,7 @@ $(function() { $('.activate_link').removeClass('active'); $('li').removeClass('activeline'); link.addClass('active'); + link.parent().addClass('activeline'); }, error: function () { alert("Ajax Error"); diff --git a/openslides/projector/templates/projector/default_control_slidefunc.html b/openslides/projector/templates/projector/default_control_slidefunc.html index 9ba95cde5..c0b7ff592 100644 --- a/openslides/projector/templates/projector/default_control_slidefunc.html +++ b/openslides/projector/templates/projector/default_control_slidefunc.html @@ -2,7 +2,7 @@ {% load i18n %}