fix hide-closed-item function for non-manager

This commit is contained in:
Oskar Hahn 2012-07-04 13:12:07 +02:00
parent 76d2a33fc2
commit 7f2d10c9ca
4 changed files with 19 additions and 17 deletions

View File

@ -4,7 +4,7 @@
* :copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
* :license: GNU GPL, see LICENSE for more details.
*/
function hideLine(object) {
if (object == []) {
return;
@ -18,7 +18,7 @@ function hideLine(object) {
function hideClosedSlides(hide) {
if (hide) {
$('#hidelink').attr('title','show');
$('#hidelink').attr('title', 'show');
$('#hidelink').removeClass('hide').addClass('show');
$('.close_link.closed').parent().parent().each(function() {
hideLine($(this));
@ -60,7 +60,7 @@ $(function() {
$.cookie('Slide.HideClosed', 0);
hideClosedSlides(false);
$('#hide_closed_items').attr('checked', false);
}
}
else { // hide closed items
$.cookie('Slide.HideClosed', 1);
hideClosedSlides(true);

View File

@ -6,7 +6,7 @@
*/
/* agenda item open/closed */
a.close_link span {
.close_link span {
background-image: url(../images/icons/done-grey.png);
background-repeat: no-repeat;
background-position: center;
@ -14,7 +14,8 @@ a.close_link span {
height: 16px;
display: inline-block;
}
a.close_link.closed span {
.close_link.closed span {
background-image: url(../images/icons/done.png);
}

View File

@ -3,13 +3,15 @@
{% load tags %}
<td>
{% if perms.agenda.can_manage_agenda %}
<a class="close_link {% if item.closed %}closed{% endif %}" href="{% if item.closed %}{% url item_open item.id %}{% else %}{% url item_close item.id %}{% endif %}">
<span></span>
</a>
{% elif item.closed %}
<span class="close_link{% if item.closed %} closed{% endif %}">
{% if perms.agenda.can_manage_agenda %}
<a href="{% if item.closed %}{% url item_open item.id %}{% else %}{% url item_close item.id %}{% endif %}">
<span></span>
</a>
{% elif item.closed %}
<img src="{% static 'images/icons/done.png' %}" title="{% trans 'Item closed' %}">
{% endif %}
{% endif %}
</span>
</td>
<td>
{% for p in item.get_ancestors %}

View File

@ -10,13 +10,13 @@
{% block header %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/tabledrag.css' %}" />
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/agenda.css' %}" />
<script type="text/javascript" src="{% static 'javascript/agenda.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.cookie.js' %}"></script>
{% if perms.agenda.can_manage_agenda %}
<script type="text/javascript" src="{% static 'javascript/jquery.once.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.cookie.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.tmpl.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/tabledrag.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/agenda.js' %}"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
//This is Drupal Code
@ -33,7 +33,7 @@
}
});
//--><!]]>
</script>
</script>
{% endif %}
{% endblock %}
@ -93,8 +93,7 @@
</tr>
{% if items %}
{% for item in items %}
<tr class="draggable{% cycle ' odd' '' %}
{% if item.active %}activeline{% endif %}">
<tr class="itemline draggable{% cycle ' odd' '' %}{% if item.active %} activeline{% endif %}">
{% include "agenda/item_row.html" %}
</tr>
{% endfor %}