Added icon and style information for elected/not elected candidates.
This commit is contained in:
parent
4fb4691f14
commit
8cd0ac8778
@ -145,12 +145,19 @@
|
|||||||
<tr class="{% cycle 'odd' '' %}">
|
<tr class="{% cycle 'odd' '' %}">
|
||||||
<td class="candidate">
|
<td class="candidate">
|
||||||
{% with vote|first as candidate %}
|
{% with vote|first as candidate %}
|
||||||
{{ candidate.0 }}
|
|
||||||
{% if candidate.1 %}
|
{% if candidate.1 %}
|
||||||
<a class="election_link iselected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'>{% trans 'not elected' %}</a>
|
{% if perms.assignment.can_manage_assignment %}
|
||||||
|
<a class="election_link elected" href='{% url assignment_user_not_elected assignment.id candidate.0.id %}'></a>
|
||||||
|
{% else %}
|
||||||
|
<img src="/static/images/icons/games-highscores.png" title="{% trans 'Participant is elected' %}">
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'>{% trans 'elected' %}</a>
|
{% if perms.assignment.can_manage_assignment %}
|
||||||
|
<a class="election_link" href='{% url assignment_user_elected assignment.id candidate.0.id %}'></a>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{{ candidate.0 }}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</td>
|
</td>
|
||||||
{% for v in vote|last %}
|
{% for v in vote|last %}
|
||||||
|
BIN
openslides/static/images/icons/games-highscores-grey.png
Normal file
BIN
openslides/static/images/icons/games-highscores-grey.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
@ -1,5 +1,5 @@
|
|||||||
$(function() {
|
$(function() {
|
||||||
$('a.iselected').parent().parent().children('td').addClass('iselected');
|
$('a.elected').parent().parent().children('td').addClass('elected');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -11,15 +11,14 @@ $(function() {
|
|||||||
url: line.attr('href'),
|
url: line.attr('href'),
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
if (line.hasClass('iselected') && !data.elected) {
|
if (line.hasClass('elected') && !data.elected) {
|
||||||
line.removeClass('iselected')
|
line.removeClass('elected')
|
||||||
line.parent().parent().children('td').removeClass('iselected')
|
line.parent().parent().children('td').removeClass('elected')
|
||||||
} else if (!line.hasClass('iselected') && data.elected) {
|
} else if (!line.hasClass('elected') && data.elected) {
|
||||||
line.addClass('iselected')
|
line.addClass('elected')
|
||||||
line.parent().parent().children('td').addClass('iselected')
|
line.parent().parent().children('td').addClass('elected')
|
||||||
}
|
}
|
||||||
line.attr('href', data.link);
|
line.attr('href', data.link);
|
||||||
line.text(data.text);
|
|
||||||
},
|
},
|
||||||
error: function () {
|
error: function () {
|
||||||
alert("Ajax Error");
|
alert("Ajax Error");
|
||||||
|
@ -1,5 +1,25 @@
|
|||||||
td.iselected {
|
td.elected {
|
||||||
background-color: green !important;
|
background-color: #BED4DE !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td.elected a.election_link {
|
||||||
|
background-image: url(/static/images/icons/games-highscores.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-right: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
td a.election_link {
|
||||||
|
background-image: url(/static/images/icons/games-highscores-grey.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
display: block;
|
||||||
|
margin-right: 5px;
|
||||||
|
float: left;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user