fixed active line #88
This commit is contained in:
parent
e9e9fa54b2
commit
0dde1738cf
@ -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()
|
||||
|
@ -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");
|
||||
|
@ -2,7 +2,7 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul style="line-height: 180%">
|
||||
<li>
|
||||
<li class="{% if slides.active %}activeline{% endif %}">
|
||||
<a href="{% url projector_activate_slide slides.key %}" class="activate_link {% if slides.active %}active{% endif %}">
|
||||
<div></div>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user