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

@ -18,7 +18,7 @@ function hideLine(object) {
function hideClosedSlides(hide) { function hideClosedSlides(hide) {
if (hide) { if (hide) {
$('#hidelink').attr('title','show'); $('#hidelink').attr('title', 'show');
$('#hidelink').removeClass('hide').addClass('show'); $('#hidelink').removeClass('hide').addClass('show');
$('.close_link.closed').parent().parent().each(function() { $('.close_link.closed').parent().parent().each(function() {
hideLine($(this)); hideLine($(this));

View File

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

View File

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

View File

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