Added link to activate agenda item in overview table.

This commit is contained in:
Emanuel Schuetze 2012-04-15 15:53:05 +02:00
parent 8b7fdc7a5c
commit f44f2723dc
3 changed files with 34 additions and 0 deletions

View File

@ -46,6 +46,25 @@ $(function() {
}
});
});
// activate an element to show it on projector
$('.activate_link').click(function(event) {
event.preventDefault();
link = $(this);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
dataType: 'json',
data: '',
success: function(data) {
$('.activate_link').removeClass('active');
//$('li').removeClass('activeline');
link.addClass('active');
},
error: function () {
alert("Ajax Error");
}
});
});
// hide closed items
$('#action_field span').after($('<a id="hidelink" class="hidelink hide" title="hide" href="#"><span></span></a>').click(function () {
if ($.cookie('Slide.HideClosed') == 1) {

View File

@ -31,4 +31,16 @@ a.hidelink.show span {
height: 16px;
display: inline-block;
}
/* activate link */
a.activate_link span {
background-image: url(../images/icons/task-accepted-grey.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: inline-block;
}
a.activate_link.active span {
background-image: url(../images/icons/task-accepted.png);
}

View File

@ -24,6 +24,9 @@
<td>
<span style="width: 1px; white-space: nowrap;">
{% if perms.agenda.can_manage_agenda %}
<a class="activate_link {% if item.active %}active{% endif %}" href="{% url projector_activate_slide item.sid %}">
<span></span>
</a>
<a href="{% url item_edit item.id %}"><img src="{% static 'images/icons/document-edit.png' %}" title="{% trans 'Edit item' %}"></a>
<a href="{% url item_delete item.id %}"><img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete item' %}"></a>
{% endif %}