Merge remote-tracking branch 'emanuel/newtemplate' into new_motion

Conflicts:
	openslides/motion/templates/motion/overview.html
	openslides/motion/templates/motion/poll_view.html
	openslides/motion/templates/motion/view.html
This commit is contained in:
Oskar Hahn 2013-02-06 09:25:27 +01:00
commit 27c73092e1
107 changed files with 1802 additions and 1751 deletions

6
THANKS
View File

@ -12,14 +12,14 @@ OpenSlides uses parts of the following projects:
* jQuery UI
<http://jqueryui.com/>
* Twitter Bootstrap
<http://twitter.github.com/bootstrap/>
* ReportLab
<http://www.reportlab.com/software/opensource/rl-toolkit/>
* Drupal (tabledrag function)
<http://www.drupal.org/>
* Oxygen-Icons
<http://www.oxygen-icons.org/>
* Ubuntu TrueType Font
<http://font.ubuntu.com/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

View File

@ -5,20 +5,6 @@
* :license: GNU GPL, see LICENSE for more details.
*/
/* agenda item open/closed */
.close_link span {
background-image: url(../images/icons/close-grey.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: inline-block;
}
.close_link.closed span {
background-image: url(../images/icons/close.png);
}
tr.topline td {
border-bottom: 1px solid #333333;
background-color: #CDCDCD;

View File

@ -1,5 +1,4 @@
{% load i18n %}
{% load staticfiles %}
{% load tags %}
<td>
@ -9,7 +8,9 @@
<i class="{% if item.closed %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
</a>
{% else %}
<i class="icon-"></i>
<span class="close_link">
<i class="{% if item.closed %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
</span>
{% endif %}
</td>
<td>
@ -43,7 +44,7 @@
<i class="icon-remove"></i>
</a>
{% if not item.is_leaf_node %}
<a href="{% url 'projector_activate_slide' item.sid 'summary' %}" class="activate_link btn btn-mini" title="{% trans 'Activate summary for this item' %}">
<a href="{% url 'projector_activate_slide' item.sid 'summary' %}" class="activate_link btn btn-mini" title="{% trans 'Show summary for this item' %}">
<i class="icon-summary"></i>
</a>
{% endif %}
@ -51,7 +52,6 @@
</span>
</td>
{% endif %}
{% if perms.agenda.can_manage_agenda %}
<td class="tabledrag-hide" style="display: none;">
{% with form=item.weight_form %}
{{ form.weight }}
@ -59,4 +59,5 @@
{{ form.parent }}
{% endwith %}
</td>
{% endif %}

View File

@ -17,7 +17,6 @@
<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.tmpl.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/tabledrag.js' %}"></script>
<script type="text/javascript">
@ -71,17 +70,17 @@
</i></small>
<table id="menu-overview" class="table table-striped table-bordered">
<tr>
<th width="10px"></th>
<th class="mini_width"></th>
<th>{% trans "Item" %}</th>
{% if perms.agenda.can_manage_agenda %}
<th width="200" class="optional">{% trans "Comment" %}</th>
{% endif %}
{% if perms.agenda.can_manage_agenda or perms.projector.can_manage_projector %}
<th width="50">{% trans "Actions" %}</th>
{% endif %}
{% if perms.agenda.can_manage_agenda %}
<th class="tabledrag-hide" style="display: none;">{% trans "Weight" %}</th>
<th class="mini_width">{% trans "Actions" %}</th>
{% endif %}
<th class="tabledrag-hide" style="display: none;">
{% trans "Weight" %}
</th>
</tr>
<tr class="topline{% if active_sid == 'agenda' %} activeline{% endif %}">
<td></td>
@ -95,7 +94,7 @@
<td>
{% if perms.projector.can_manage_projector %}
<span>
<a href="{% url 'projector_activate_slide' 'agenda' %}" class="activate_link btn {% if active_sid == 'agenda' %}btn-primary{% endif %} btn-mini" title="{% trans 'Activate agenda' %}">
<a href="{% url 'projector_activate_slide' 'agenda' %}" class="activate_link btn {% if active_sid == 'agenda' %}btn-primary{% endif %} btn-mini" title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if active_sid == 'agenda' %}icon-white{% endif %}"></i>
</a>
<span>

View File

@ -23,7 +23,7 @@
{% endif %}
</div>
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' item.sid %}" class="activate_link btn btn-mini {% if item.active %}btn-primary{% endif %}" rel="tooltip" data-original-title="{% trans 'Show item' %}">
<a href="{% url 'projector_activate_slide' item.sid %}" class="activate_link btn btn-mini {% if item.active %}btn-primary{% endif %}" rel="tooltip" data-original-title="{% trans 'Show' %}">
<i class="icon icon-facetime-video {% if item.active %}icon-white{% endif %}"></i>
</a>
{% endif %}

View File

@ -1,10 +1,9 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}
<ul style="line-height: 180%">
<li class="{% if agenda.active %}activeline{% endif %}">
<a href="{% url 'projector_activate_slide' agenda.key %}" class="activate_link btn {% if agenda.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show agenda' %}">
<a href="{% url 'projector_activate_slide' agenda.key %}" class="activate_link btn {% if agenda.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if agenda.active %}icon-white{% endif %}"></i>
</a>&nbsp;
<a href="{% url 'projctor_preview_slide' agenda.key %}" title="{% trans 'Preview' %}" class="icon preview right">
@ -27,7 +26,7 @@
<i class="icon-search"></i>
</a>
{% if not item.is_leaf_node %}
<a class="activate_link btn btn-mini {% if item.active %}btn-primary{% endif %} right" href="{% url 'projector_activate_slide' item.sid 'summary' %}" title="{% trans 'Activate summary for this item' %}">
<a class="activate_link btn btn-mini {% if item.active %}btn-primary{% endif %} right" href="{% url 'projector_activate_slide' item.sid 'summary' %}" title="{% trans 'Show summary for this item' %}">
<i class="icon-summary {% if item.active %}icon-white{% endif %}"></i>
</a>
{% endif %}

View File

@ -24,9 +24,6 @@ $(function() {
line.parent().parent().children('td').addClass('elected')
}
line.attr('href', data.link);
},
error: function () {
alert("Ajax Error");
}
});
});
@ -48,22 +45,24 @@ $(function() {
}
});
});
// change publish status of ballot
$('.publish_link').click(function(event) {
event.preventDefault();
link = $(this);
var link = $(this);
$.ajax({
type: 'GET',
url: link.attr('href'),
url: $(this).attr('href'),
dataType: 'json',
success: function(data) {
if (data.published) {
link.addClass('published');
//link.attr('title', gettext('Unpublish ballot'))
newclass = 'icon-checked-new_white';
link.addClass('btn-primary');
} else {
link.removeClass('published');
//link.attr('title', 'Publish ballot')
newclass = 'icon-unchecked-new';
link.removeClass('btn-primary');
}
link.children('i').removeClass('icon-checked-new_white icon-unchecked-new').addClass(newclass);
link.attr('href', data.link);
}
});
});
});
});});

View File

@ -10,7 +10,7 @@ td.elected {
}
td.elected a.election_link {
background-image: url(../images/icons/voting-yes.png);
background-image: url(../img/voting-yes.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -21,7 +21,7 @@ td.elected a.election_link {
}
td a.election_link {
background-image: url(../images/icons/voting-yes-grey.png);
background-image: url(../img/voting-yes-grey.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
@ -30,15 +30,3 @@ td a.election_link {
margin-right: 5px;
float: left;
}
a.publish_link span {
background-image: url(../images/icons/off.png);
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: inline-block;
}
a.publish_link.published span {
background-image: url(../images/icons/on.png);
}

View File

@ -1,7 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% block title %}{{ block.super }} {% trans "Elections" %}{% endblock %}
@ -36,11 +35,10 @@
<th><a href="?sort=name{% if 'name' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Election" %}</a></th>
<th>{% trans "Candidates" %}</th>
<th class="optional"><a href="?sort=status{% if 'status' in request.GET.sort and 'reverse' not in request.GET %}&reverse{%endif%}">{% trans "Status" %}</a></th>
<th style="width: 1px;">{% trans "Actions" %}</th>
<th class="mini_width">{% trans "Actions" %}</th>
</tr>
{% for assignment in assignments %}
<tr class="{% cycle '' 'odd' %}
{% if assignment.active %}activeline{% endif %}">
<tr {% if assignment.active %}activeline{% endif %}">
<td><a href="{% url 'assignment_view' assignment.id %}">{{ assignment }}</a></td>
<td>
{% blocktrans with posts=assignment.posts context "Number of searched candidates for an election"%}posts: {{ posts }}{% endblocktrans %}

View File

@ -11,10 +11,10 @@
{{ ballotnumber }}. {% trans "ballot" %}
</small>
<small class="pull-right">
<a href="{% url 'assignment_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
<a href="{% url 'assignment_view' assignment.id %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to election" %}</a>
<!-- activate projector -->
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' assignment.sid %}" class="activate_link btn {% if assignment.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show motion' %}">
<a href="{% url 'projector_activate_slide' assignment.sid %}" class="activate_link btn {% if assignment.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show election' %}">
<i class="icon-facetime-video {% if assignment.active %}icon-white{% endif %}"></i>
</a>
{% endif %}
@ -25,8 +25,9 @@
<p><b>{% trans "Short description (for ballot paper)" %}:</b> {{ assignment.polldescription }}</p>
{% endif %}
<i class="helptext">{% trans "Special values" %}: -1 = {% trans 'majority' %}; -2 = {% trans 'undocumented' %}</i>
<p>
{% trans "Special values" %}: <span class="badge badge-success">-1</span> = {% trans 'majority' %} | <span class="badge">-2</span> = {% trans 'undocumented' %}
</p>
<form action="" method="post" class="small-form">{% csrf_token %}
<table class="table table-striped table-bordered" style="width: auto;">
<tr>

View File

@ -20,10 +20,34 @@
<a href="{% url 'assignment_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
<!-- activate projector -->
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' assignment.sid %}" class="activate_link btn {% if assignment.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show motion' %}">
<a href="{% url 'projector_activate_slide' assignment.sid %}" class="activate_link btn {% if assignment.active %}btn-primary{% endif %} btn-mini" rel="tooltip" data-original-title="{% trans 'Show election' %}">
<i class="icon-facetime-video {% if assignment.active %}icon-white{% endif %}"></i>
</a>
{% endif %}
<div class="btn-group">
<a data-toggle="dropdown" href="#" class="btn btn-mini dropdown-toggle">
{% trans 'More actions' %}
<span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<!-- edit -->
<li><a href="{% url 'assignment_edit' assignment.id %}"><i class="icon-pencil"></i> {% trans 'Edit election' %}</a></li>
<!-- delete -->
<li><a href="{% url 'assignment_delete' assignment.id %}"><i class="icon-remove"></i> {% trans 'Delete election' %}</a></li>
<!-- edit poll -->
{% if perms.assignment.can_manage_assignment %}
{% for poll in motion.polls %}
<li><a href="{% url 'assignment_poll_view' poll.id %}"><i class="icon-edit"></i> {{ forloop.counter }}. {% trans "Ballot" %}</a></li>
{% endfor %}
{% endif %}
<!-- create agenda item -->
{% if perms.agenda.can_manage_agenda %}
<li>
<a href="{% url 'assignment_create_agenda' assignment.id %}"><i class="icon-plus"></i> {% trans 'New agenda item' %}</a>
</li>
{% endif %}
</ul>
</div>
</small>
</h1>
@ -53,7 +77,9 @@
| <b>{% trans "elected" %}</b>
{% if perms.assignment.can_manage_assignment %}
{% if assignment.status == "sea" or assignment.status == "vot" %}
<a href="{% url 'assignment_user_not_elected' assignment.id person.person_id %}"><img src="{% static 'images/icons/dialog-cancel.png' %}" title="{% trans 'Mark candidate as not elected' %}"></a>
<a class="btn btn-mini" href="{% url 'assignment_user_not_elected' assignment.id person.person_id %}" rel="tooltip" data-original-title="{% trans 'Mark candidate as not elected' %}">
<i class="icon-ban-circle"></i>
</a>
{% endif %}
{% endif %}
{% endif %}
@ -83,9 +109,9 @@
<label>{{ field.label }}:</label>
<div class="input-append">
{{ field }}
<button class="btn btn-primary" type="submit">{% trans 'Apply' %}</button>
<button class="btn btn-primary" type="submit" title="{% trans 'Apply' %}"><i class="icon-ok icon-white"></i></button>
{% if perms.participant.can_see_participant and perms.participant.can_manage_participant %}
<a href="{% url 'user_new' %}" target="_blank" class="btn"><img src="{% static 'images/icons/add-user.png' %}" title="{% trans 'Add new participant' %}"></a>
<a href="{% url 'user_new' %}" target="_blank" class="btn" title="{% trans 'Add new participant' %}"><i class="icon-add-user"></i></a>
{% endif %}
</div>
{% endfor %}
@ -98,11 +124,14 @@
{% endif %}
{% if perms.assignment.can_manage_assignments and blocked_candidates and assignment.status != "fin" %}
<h3>{% trans "Blocked Candidates" %}</h3>
<h4>{% trans "Blocked Candidates" %}</h4>
<ul>
{% for person in blocked_candidates %}
<li>
{{ person }}<a href="{% url 'assignment_delother' assignment.id person.person_id %}"><img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Remove candidate' %}"></a>
{{ person }}
<a class="btn btn-mini" href="{% url 'assignment_delother' assignment.id person.person_id %}" title="{% trans 'Remove candidate' %}">
<i class="icon-ban-circle"></i>
</a>
</li>
{% empty %}
<li>{% trans "No blocked candidates available." %}</li>
@ -131,10 +160,14 @@
{{ poll.get_ballot }}. {% trans 'ballot' %}
{% if perms.assignment.can_manage_assignment %}
<br>
<a class="publish_link {% if poll.published %}published{% endif %}"
<a class="publish_link btn btn-mini {% if poll.published %}btn-primary{% endif %}"
href="{% url 'assignment_poll_publish_status' poll.id %}"
title="{% trans 'Publish/unpublish results' %}">
<span></span>
rel="tooltip" data-original-title="{% trans 'Publish/unpublish results' %}">
{% if poll.published %}
<i class="icon-checked-new_white"></i>
{% else %}
<i class="icon-unchecked-new"></i>
{% endif %}
</a>
<a href="{% url 'assignment_poll_view' poll.id %}" class="btn btn-mini" title="{% trans 'Edit' %}"><i class="icon-pencil"></i></a>
<a href="{% url 'assignment_poll_delete' poll.id %}" class="btn btn-mini" title="{% trans 'Delete' %}"><i class="icon-remove"></i></a>
@ -154,10 +187,10 @@
<td>
{% if candidate in assignment.elected %}
{% if perms.assignment.can_manage_assignment %}
<a class="election_link elected" href="{% url 'assignment_user_not_elected assignment.id' candidate.person_id %}"></a>
<a class="election_link elected" href="{% url 'assignment_user_not_elected' assignment.id candidate.person_id %}"></a>
{% else %}
<a class="elected">
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}">
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}">
</a>
{% endif %}
{% else %}
@ -170,11 +203,11 @@
{% for vote in poll_list %}
<td style="white-space:nowrap;">
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
{% elif 'Votes' in vote %}
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
{% elif vote == None %}
{% trans 'was not a <br> candidate'%}
{% else %}
@ -193,7 +226,7 @@
{% if poll.published or perms.assignment.can_manage_assignment %}
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}">
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}">
{{ poll.print_votesinvalid }}
{% endif %}
</td>
@ -209,7 +242,7 @@
{% if poll.published or perms.assignment.can_manage_assignment %}
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}">
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}">
<strong>{{ poll.print_votescast }}</strong>
{% endif %}
</td>

View File

@ -1,4 +1,3 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}

View File

@ -66,7 +66,7 @@
<td class="candidate{% if candidate in assignment.elected %} elected{% endif %}">
{% if candidate in assignment.elected %}
<a class="elected">
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}">
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Candidate is elected' %}">
</a>
{% endif %}
{{ candidate }}
@ -75,11 +75,11 @@
<td style="white-space:nowrap;"{% if candidate in assignment.elected %} class="elected"{% endif %}>
{% if not assignment_publish_winner_results_only or candidate in assignment.elected %}
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
{% elif 'Votes' in vote %}
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
{% elif vote == None %}
{% trans 'was not a <br> candidate'%}
{% else %}
@ -97,7 +97,7 @@
{% for poll in polls %}
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}">
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}">
{{ poll.print_votesinvalid }}
{% endif %}
</td>
@ -112,7 +112,7 @@
<td style="white-space:nowrap;">
{% if poll.has_votes %}
<img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}">
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}">
<strong>{{ poll.print_votescast }}</strong>
{% endif %}
</td>

View File

@ -145,8 +145,9 @@ def edit(request, assignment_id=None):
def delete(request, assignment_id):
assignment = Assignment.objects.get(pk=assignment_id)
if request.method == 'POST':
assignment.delete()
messages.success(request, _('Election <b>%s</b> was successfully deleted.') % assignment)
if 'submit' in request.POST:
assignment.delete()
messages.success(request, _('Election <b>%s</b> was successfully deleted.') % assignment)
else:
del_confirm_form(request, assignment)
return redirect(reverse('assignment_overview'))
@ -204,16 +205,17 @@ def delother(request, assignment_id, user_id):
is_blocked = assignment.is_blocked(person)
if request.method == 'POST':
try:
assignment.delrun(person, blocked=False)
except Exception, e:
messages.error(request, e)
else:
if not is_blocked:
message = _("Candidate <b>%s</b> was withdrawn successfully.") % person
if 'submit' in request.POST:
try:
assignment.delrun(person, blocked=False)
except Exception, e:
messages.error(request, e)
else:
message = _("<b>%s</b> was unblocked successfully.") % person
messages.success(request, message)
if not is_blocked:
message = _("Candidate <b>%s</b> was withdrawn successfully.") % person
else:
message = _("<b>%s</b> was unblocked successfully.") % person
messages.success(request, message)
else:
if not is_blocked:
message = _("Do you really want to withdraw <b>%s</b> from the election?") % person

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}

View File

@ -11,10 +11,10 @@
<p><b>{% trans "Status" %}:</b><br>
{% if motion.status != "pub" %}
{% if motion.status == "acc" %}
<img src="{% static 'images/icons/voting-yes.png' %}">
<img src="{% static 'img/voting-yes.png' %}">
{% endif %}
{% if motion.status == "rej" %}
<img src="{% static 'images/icons/voting-no.png' %}">
<img src="{% static 'img/voting-no.png' %}">
{% endif %}
{% trans motion.status %}
{% else %}
@ -34,12 +34,12 @@
{% endif %}
{% with poll.get_options.0 as option %}
<div class="results">
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.Yes }} <br>
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.No }} <br>
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.Abstain }}<br>
<img src="{% static 'images/icons/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<img src="{% static 'img/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ option.Yes }} <br>
<img src="{% static 'img/voting-no.png' %}" title="{% trans 'No' %}"> {{ option.No }} <br>
<img src="{% static 'img/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ option.Abstain }}<br>
<img src="{% static 'img/voting-invalid.png' %}" title="{% trans 'Invalid' %}"> {{ poll.print_votesinvalid }}<br>
<hr>
<img src="{% static 'images/icons/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
<img src="{% static 'img/voting-total.png' %}" title="{% trans 'Votes cast' %}"> {{ poll.print_votescast }}
</div>
{% endwith %}
{% else %}

View File

@ -1,22 +0,0 @@
/**
* OpenSlides participants style
*
* :copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
* :license: GNU GPL, see LICENSE for more details.
*/
a.status_link span {
background-repeat: no-repeat;
background-position: center;
width: 16px;
height: 16px;
display: inline-block;
}
a.status_link.deactivate span {
background-image: url(../images/icons/on.png);
}
a.status_link.activate span {
background-image: url(../images/icons/off.png);
}

View File

@ -26,8 +26,8 @@
<form action="" method="post">{% csrf_token %}
{% include "form.html" %}
{% if edit_user %}
<p>
<a href="{% url 'user_reset_password' edit_user.id %}">{% trans 'Reset to First Password' %}</a>
<p style="margin: -15px 0 25px 0;">
<a class="btn btn-mini" href="{% url 'user_reset_password' edit_user.id %}"><i class="icon-exclamation-sign"></i> {% trans 'Reset to First Password' %}</a>
</p>
{% endif %}
<p>

View File

@ -7,16 +7,22 @@
{% block content %}
<h1>{{ group }}</h1>
<h1>{{ group }}
<small class="pull-right">
<a href="{% url 'user_group_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
</small>
</h1>
<p>{{ group.description }}</p>
<h2>{% trans "Members" %}</h2>
<h4>{% trans "Members" %}</h4>
<ol>
{% for member in group.user_set.all %}
<p>{{ member }}</p>
<li>{{ member }}</li>
{% empty %}
<p>{% trans "No members available." %}</p>
{% endfor %}
</ol>
{% endblock %}

View File

@ -1,7 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load tags %}
{% block title %}{{ block.super }} {% trans "Groups" %}{% endblock %}
@ -17,20 +16,30 @@
<table class="table table-striped table-bordered">
<tr>
<th>{% trans "Group" %}</th>
<th>{% trans "Actions" %}</th>
<th style="width: 1px;">{% trans "Actions" %}</th>
</tr>
{% for group in groups %}
<tr class="{% cycle '' 'odd' %}">
<td><a href="{% model_url group 'view' %}">{{ group.name }}</a></td>
<td><a href="{% url 'user_group_edit' group.id %}"><img src="{% static 'images/icons/edit.png' %}" title="{% trans 'Edit group' %}"></a>
{% if group.name|lower != 'anonymous' and group.name|lower != 'registered' %}
<a href="{% url 'user_group_delete' group.id %}"><img src="{% static 'images/icons/delete.png' %}" title="{% trans 'Delete group' %}"></a>
{% endif %}
<tr class="{% if group.active %}activeline{% endif %}">
<td>
<a href="{% model_url group 'view' %}">{{ group.name }}</a>
</td>
<td>
<span style="width: 1px; white-space: nowrap;">
{% if perms.projector.can_manage_projector %}
<a href="{% url 'projector_activate_slide' group.sid %}" class="activate_link btn {% if group.active %}btn-primary{% endif %} btn-mini" title="{% trans 'Show' %}">
<i class="icon-facetime-video {% if group.active %}icon-white{% endif %}"></i>
</a>
{% endif %}
<a href="{% url 'user_group_edit' group.id %}" title="{% trans 'Edit' %}" class="btn btn-mini">
<i class="icon-pencil"></i>
</a>
{% if group.name|lower != 'anonymous' and group.name|lower != 'registered' %}
<a href="{% url 'user_group_delete' group.id %}" title="{% trans 'Delete' %}" class="btn btn-mini">
<i class="icon-remove"></i>
</a>
{% endif %}
</span>
</td>
</tr>
{% empty %}
<tr>
<td colspan="5"><i>{% trans "No groups available." %}</i></td>
</tr>
{% endfor %}
</table>

View File

@ -8,7 +8,7 @@
{% block body %}
<div id="login-page" class="container">
<h2><img src="/static/img/logo-login.png"></h2>
<h2><img src="{% static '/static/img/logo-login.png' %}"></h2>
{% if form.errors %}
<div class="alert alert-error">

View File

@ -6,12 +6,6 @@
{% block title %}{{ block.super }} {% trans "Participants" %}{% endblock %}
{% block header %}
{% if perms.participant.can_manage_participant %}
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/participant.css' %}" />
{% endif %}
{% endblock %}
{% block javascript %}
{% if perms.participant.can_manage_participant %}
<script type="text/javascript" src="{% static 'javascript/participant.js' %}"></script>
@ -24,7 +18,7 @@
<div class="btn-toolbar">
{% if perms.participant.can_manage_participant %}
<a href="{% url 'user_new' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'New participant' %}"><i class="icon-plus"></i> {% trans "New" %}</a>
<a href="{% url 'user_group_overview' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'All user groups' %}"><i class="icon-group"></i> {% trans "User groups" %}</a>
<a href="{% url 'user_group_overview' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'All groups' %}"><i class="icon-group"></i> {% trans "Groups" %}</a>
<a href="{% url 'user_import' %}" class="btn btn-mini" rel="tooltip" data-original-title="{% trans 'Import participants' %}"><i class="icon-import"></i> {% trans 'Import' %}</a>
{% endif %}
{% if perms.participant.can_see_participant and perms.participant.can_manage_participant %}
@ -111,13 +105,13 @@
{% if perms.participant.can_manage_participant %}
<th class="optional"><a href="?sort=comment&reverse={% if 'comment' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Comment" %}</a></th>
<th class="optional"><a href="?sort=last_login&reverse={% if 'last_login' in sortfilter.sort and 'reverse' not in sortfilter %}1{% else %}---{%endif%}">{% trans "Last Login" %}</a></th>
<th style="width: 1px;">{% trans "Actions" %}</th>
<th class="mini_width">{% trans "Actions" %}</th>
{% endif %}
</tr>
{% for user in users %}
<tr class="{% if user.active %}activeline{% endif %}">
<td>{{ user.first_name }}</td>
<td>{{ user.last_name }}</td>
<td><a href="{% url 'user_view' user.id %}">{{ user.first_name }}</a></td>
<td><a href="{% url 'user_view' user.id %}">{{ user.last_name }}</a></td>
<td class="optional">{{ user.structure_level }}</td>
<td class="optional">{{ user.get_type_display }}</td>
<td class="optional">{{ user.committee }}</td>

View File

@ -7,11 +7,15 @@
{% block content %}
<h1>{{ shown_user }}</h1>
<h1>{{ shown_user }}
<small class="pull-right">
<a href="{% url 'user_overview' %}" class="btn btn-mini"><i class="icon-chevron-left"></i> {% trans "Back to overview" %}</a>
</small>
</h1>
<p>{{ shown_user.email }}</p>
<h2>{% trans "Groups" %}</h2>
<h4>{% trans "Groups" %}</h4>
<p>
{% if shown_user.groups.all %}
{{ shown_user.groups.all|join:", " }}
@ -21,32 +25,32 @@
</p>
{% if shown_user.get_gender_display %}
<h2>{% trans "Gender" %}</h2>
<h4>{% trans "Gender" %}</h4>
<p>{{ shown_user.get_gender_display }}</p>
{% endif %}
{% if shown_user.get_type_display %}
<h2>{% trans "Type" %}</h2>
<h4>{% trans "Type" %}</h4>
<p>{{ shown_user.get_type_display }}</p>
{% endif %}
{% if shown_user.committee %}
<h2>{% trans "Committee" %}</h2>
<h4>{% trans "Committee" %}</h4>
<p>{{ shown_user.committee }}</p>
{% endif %}
{% if shown_user.about_me %}
<h2>{% trans "About me" %}</h2>
<h4>{% trans "About me" %}</h4>
<p>{{ shown_user.about_me }}</p>
{% endif %}
{% if perms.participant.can_manage_participant %}
{% if shown_user.comment %}
<h2>{% trans "Comment" %}</h2>
<h4>{% trans "Comment" %}</h4>
<p>{{ shown_user.comment }}</p>
{% endif %}
<h2>{% trans "Last Login" %}</h2>
<h4>{% trans "Last Login" %}</h4>
{% if shown_user.last_login > shown_user.date_joined %}
<p>{{ shown_user.last_login }}</p>
{% else %}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -15,11 +15,12 @@ function saveOrder() {
$.cookie(cookieName, order, { path: "/", expiry: new Date(2012, 1, 1)});
});
}
// function that restores the widget list order from a cookie
function restoreOrder() {
$(".column").each(function(index, value) {
var colid = value.id;
var cookieName = "cookie-" + colid
var cookieName = "cookie-" + colid;
var cookie = $.cookie(cookieName);
if ( cookie == null ) { return; }
var IDs = cookie.split(",");
@ -38,38 +39,7 @@ $(function() {
stop: function() { saveOrder(); }
});
restoreOrder();
if ($.browser.msie) {
if ($.browser.version >= 8.0 && $.browser.version < 9.0)
{
/* scaling bug in IE8.. iframe has to be 4 times bigger */
$( "#iframe" ).css('width', 1024 * 4);
$( "#iframe" ).css('height', 768 * 4);
}
$( "#iframe" ).css('zoom', '0.25');
}
$('a.overlay').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
type: 'GET',
url: $(this).attr('href'),
dataType: 'json',
success: function(data) {
if (data['active']) {
$('#' + data['def_name'] + '_active').show();
$('#' + data['def_name'] + '_inactive').hide();
} else {
$('#' + data['def_name'] + '_active').hide();
$('#' + data['def_name'] + '_inactive').show();
}
},
});
});
// control the projector
// control the projector view
$('.projector_edit').click(function(event) {
event.preventDefault();
var link = $(this);
@ -87,7 +57,6 @@ $(function() {
event.preventDefault();
var link = $(this);
var requestData = {};
if (link.attr('id') == "countdown_set") {
requestData = { "countdown_time" : $( "#countdown_time" ).val() };
}
@ -109,7 +78,8 @@ $(function() {
});
});
$('.countdown_visible_link').click(function(event) {
// activate/deactivate overlay
$('.overlay_activate_link').click(function(event) {
event.preventDefault();
var link = $(this);
$.ajax({
@ -117,13 +87,13 @@ $(function() {
url: link.attr('href'),
dataType: 'json',
success: function(data) {
if (data.countdown_visible == "True") {
newclass = 'open';
if (data['active']) {
$('#' + data['def_name'] + '_active').show();
$('#' + data['def_name'] + '_inactive').hide();
} else {
newclass = 'closed';
$('#' + data['def_name'] + '_active').hide();
$('#' + data['def_name'] + '_inactive').show();
}
link.removeClass('closed open').addClass(newclass);
link.attr('href', data.link);
}
});
});
@ -134,4 +104,21 @@ $(function() {
$('#overlay_message_text').val(data['overlay_message']);
}
});
/* comment out this function because '$.browser' has been removed from jquery 1.9, see:
http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
TODO: use jquery migrate to have $.browser support for IE8;
if ($.browser.msie) {
if ($.browser.version >= 8.0 && $.browser.version < 9.0)
{
// scaling bug in IE8.. iframe has to be 4 times bigger
$( "#iframe" ).css('width', 1024 * 4);
$( "#iframe" ).css('height', 768 * 4);
}
$( "#iframe" ).css('zoom', '0.25');
}
*/
restoreOrder();
});

View File

@ -1,7 +1,7 @@
/*!
* jQuery Form Plugin
* version: 3.09 (16-APR-2012)
* @requires jQuery v1.3.2 or later
* version: 3.26.0-2013.01.28
* @requires jQuery v1.5 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
@ -37,7 +37,7 @@
target: '#output'
});
});
You can also use ajaxForm with delegation (requires jQuery v1.7+), so the
form does not have to exist when you invoke ajaxForm:
@ -45,7 +45,7 @@
delegation: true,
target: '#output'
});
When using ajaxForm, the ajaxSubmit function will be invoked for you
at the appropriate time.
*/
@ -69,7 +69,7 @@ $.fn.ajaxSubmit = function(options) {
log('ajaxSubmit: skipping submit process - no element selected');
return this;
}
var method, action, url, $form = this;
if (typeof options == 'function') {
@ -111,7 +111,7 @@ $.fn.ajaxSubmit = function(options) {
if ( traditional === undefined ) {
traditional = $.ajaxSettings.traditional;
}
var elements = [];
var qx, a = this.formToArray(options.semantic, elements);
if (options.data) {
@ -135,7 +135,7 @@ $.fn.ajaxSubmit = function(options) {
var q = $.param(a, traditional);
if (qx) {
q = ( q ? (q + '&' + qx) : qx );
}
}
if (options.type.toUpperCase() == 'GET') {
options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q;
options.data = null; // data is null for 'get'
@ -165,14 +165,18 @@ $.fn.ajaxSubmit = function(options) {
}
options.success = function(data, status, xhr) { // jQuery 1.4+ passes xhr as 3rd arg
var context = options.context || options; // jQuery 1.4+ supports scope context
var context = options.context || this ; // jQuery 1.4+ supports scope context
for (var i=0, max=callbacks.length; i < max; i++) {
callbacks[i].apply(context, [data, status, xhr || $form, $form]);
}
};
// are there files to upload?
var fileInputs = $('input:file:enabled[value]', this); // [value] (issue #113)
// [value] (issue #113), also see comment:
// https://github.com/malsup/form/commit/588306aedba1de01388032d5f42a60159eea9228#commitcomment-2180219
var fileInputs = $('input[type=file]:enabled[value!=""]', this);
var hasFileInputs = fileInputs.length > 0;
var mp = 'multipart/form-data';
var multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp);
@ -181,6 +185,8 @@ $.fn.ajaxSubmit = function(options) {
log("fileAPI :" + fileAPI);
var shouldUseFrame = (hasFileInputs || multipart) && !fileAPI;
var jqxhr;
// options.iframe allows user to force iframe mode
// 06-NOV-09: now defaulting to iframe mode if file input is detected
if (options.iframe !== false && (options.iframe || shouldUseFrame)) {
@ -188,20 +194,22 @@ $.fn.ajaxSubmit = function(options) {
// see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d
if (options.closeKeepAlive) {
$.get(options.closeKeepAlive, function() {
fileUploadIframe(a);
jqxhr = fileUploadIframe(a);
});
}
else {
fileUploadIframe(a);
}
else {
jqxhr = fileUploadIframe(a);
}
}
else if ((hasFileInputs || multipart) && fileAPI) {
fileUploadXhr(a);
jqxhr = fileUploadXhr(a);
}
else {
$.ajax(options);
jqxhr = $.ajax(options);
}
$form.removeData('jqxhr').data('jqxhr', jqxhr);
// clear element array
for (var k=0; k < elements.length; k++)
elements[k] = null;
@ -210,6 +218,22 @@ $.fn.ajaxSubmit = function(options) {
this.trigger('form-submit-notify', [this, options]);
return this;
// utility fn for deep serialization
function deepSerialize(extraData){
var serialized = $.param(extraData).split('&');
var len = serialized.length;
var result = [];
var i, part;
for (i=0; i < len; i++) {
// #252; undo param space replacement
serialized[i] = serialized[i].replace(/\+/g,' ');
part = serialized[i].split('=');
// #278; use array instead of object storage, favoring array serializations
result.push([decodeURIComponent(part[0]), decodeURIComponent(part[1])]);
}
return result;
}
// XMLHttpRequest Level 2 file uploads (big hat tip to francois2metz)
function fileUploadXhr(a) {
var formdata = new FormData();
@ -219,9 +243,10 @@ $.fn.ajaxSubmit = function(options) {
}
if (options.extraData) {
for (var p in options.extraData)
if (options.extraData.hasOwnProperty(p))
formdata.append(p, options.extraData[p]);
var serializedData = deepSerialize(options.extraData);
for (i=0; i < serializedData.length; i++)
if (serializedData[i])
formdata.append(serializedData[i][0], serializedData[i][1]);
}
options.data = null;
@ -230,9 +255,9 @@ $.fn.ajaxSubmit = function(options) {
contentType: false,
processData: false,
cache: false,
type: 'POST'
type: method || 'POST'
});
if (options.uploadProgress) {
// workaround because jqXHR does not expose upload property
s.xhr = function() {
@ -253,27 +278,21 @@ $.fn.ajaxSubmit = function(options) {
}
s.data = null;
var beforeSend = s.beforeSend;
s.beforeSend = function(xhr, o) {
o.data = formdata;
if(beforeSend)
beforeSend.call(o, xhr, options);
var beforeSend = s.beforeSend;
s.beforeSend = function(xhr, o) {
o.data = formdata;
if(beforeSend)
beforeSend.call(this, xhr, o);
};
$.ajax(s);
return $.ajax(s);
}
// private function for handling file uploads (hat tip to YAHOO!)
function fileUploadIframe(a) {
var form = $form[0], el, i, s, g, id, $io, io, xhr, sub, n, timedOut, timeoutHandle;
var useProp = !!$.fn.prop;
var deferred = $.Deferred();
if ($(':input[name=submit],:input[id=submit]', form).length) {
// if there is an input with a name or id of 'submit' then we won't be
// able to invoke the submit fn on the form (at least not x-browser)
alert('Error: Form elements must not have name or id of "submit".');
return;
}
if (a) {
// ensure that every serialized input is still enabled
for (i=0; i < elements.length; i++) {
@ -316,6 +335,14 @@ $.fn.ajaxSubmit = function(options) {
var e = (status === 'timeout' ? 'timeout' : 'aborted');
log('aborting upload... ' + e);
this.aborted = 1;
try { // #214, #257
if (io.contentWindow.document.execCommand) {
io.contentWindow.document.execCommand('Stop');
}
}
catch(ignore) {}
$io.attr('src', s.iframeSrc); // abort op in progress
xhr.error = e;
if (s.error)
@ -340,10 +367,12 @@ $.fn.ajaxSubmit = function(options) {
if (s.global) {
$.active--;
}
return;
deferred.reject();
return deferred;
}
if (xhr.aborted) {
return;
deferred.reject();
return deferred;
}
// add submitting element to data if we know it
@ -359,7 +388,7 @@ $.fn.ajaxSubmit = function(options) {
}
}
}
var CLIENT_TIMEOUT_ABORT = 1;
var SERVER_ABORT = 2;
@ -367,7 +396,7 @@ $.fn.ajaxSubmit = function(options) {
var doc = frame.contentWindow ? frame.contentWindow.document : frame.contentDocument ? frame.contentDocument : frame.document;
return doc;
}
// Rails CSRF hack (thanks to Yvan Barthelemy)
var csrf_token = $('meta[name=csrf-token]').attr('content');
var csrf_param = $('meta[name=csrf-param]').attr('content');
@ -402,7 +431,7 @@ $.fn.ajaxSubmit = function(options) {
if (s.timeout) {
timeoutHandle = setTimeout(function() { timedOut = true; cb(CLIENT_TIMEOUT_ABORT); }, s.timeout);
}
// look for server aborts
function checkState() {
try {
@ -426,9 +455,16 @@ $.fn.ajaxSubmit = function(options) {
if (s.extraData) {
for (var n in s.extraData) {
if (s.extraData.hasOwnProperty(n)) {
extraInputs.push(
$('<input type="hidden" name="'+n+'">').attr('value',s.extraData[n])
.appendTo(form)[0]);
// if using the $.param format that allows for multiple values with the same name
if($.isPlainObject(s.extraData[n]) && s.extraData[n].hasOwnProperty('name') && s.extraData[n].hasOwnProperty('value')) {
extraInputs.push(
$('<input type="hidden" name="'+s.extraData[n].name+'">').val(s.extraData[n].value)
.appendTo(form)[0]);
} else {
extraInputs.push(
$('<input type="hidden" name="'+n+'">').val(s.extraData[n])
.appendTo(form)[0]);
}
}
}
}
@ -442,7 +478,9 @@ $.fn.ajaxSubmit = function(options) {
io.addEventListener('load', cb, false);
}
setTimeout(checkState,15);
form.submit();
// just in case form has element with name/id of 'submit'
var submitFn = document.createElement('form').submit;
submitFn.apply(form);
}
finally {
// reset attrs and remove "extra" input elements
@ -478,10 +516,12 @@ $.fn.ajaxSubmit = function(options) {
}
if (e === CLIENT_TIMEOUT_ABORT && xhr) {
xhr.abort('timeout');
deferred.reject(xhr, 'timeout');
return;
}
else if (e == SERVER_ABORT && xhr) {
xhr.abort('server abort');
deferred.reject(xhr, 'error', 'server abort');
return;
}
@ -492,7 +532,7 @@ $.fn.ajaxSubmit = function(options) {
}
if (io.detachEvent)
io.detachEvent('onload', cb);
else
else
io.removeEventListener('load', cb, false);
var status = 'success', errMsg;
@ -586,6 +626,7 @@ $.fn.ajaxSubmit = function(options) {
if (status === 'success') {
if (s.success)
s.success.call(s.context, data, 'success', xhr);
deferred.resolve(xhr.responseText, 'success', xhr);
if (g)
$.event.trigger("ajaxSuccess", [xhr, s]);
}
@ -594,6 +635,7 @@ $.fn.ajaxSubmit = function(options) {
errMsg = xhr.statusText;
if (s.error)
s.error.call(s.context, xhr, status, errMsg);
deferred.reject(xhr, 'error', errMsg);
if (g)
$.event.trigger("ajaxError", [xhr, s, errMsg]);
}
@ -658,6 +700,8 @@ $.fn.ajaxSubmit = function(options) {
}
return data;
};
return deferred;
}
};
@ -679,7 +723,7 @@ $.fn.ajaxSubmit = function(options) {
$.fn.ajaxForm = function(options) {
options = options || {};
options.delegation = options.delegation && $.isFunction($.fn.on);
// in jQuery 1.3+ we can fix mistakes with the ready state
if (!options.delegation && this.length === 0) {
var o = { s: this.selector, c: this.context };
@ -709,7 +753,7 @@ $.fn.ajaxForm = function(options) {
.bind('click.form-plugin', options, captureSubmittingElement);
};
// private event handlers
// private event handlers
function doAjaxSubmit(e) {
/*jshint validthis:true */
var options = e.data;
@ -718,14 +762,14 @@ function doAjaxSubmit(e) {
$(this).ajaxSubmit(options);
}
}
function captureSubmittingElement(e) {
/*jshint validthis:true */
var target = e.target;
var $el = $(target);
if (!($el.is(":submit,input:image"))) {
if (!($el.is("[type=submit],[type=image]"))) {
// is this a child element of the submit el? (ex: a span within a button)
var t = $el.closest(':submit');
var t = $el.closest('[type=submit]');
if (t.length === 0) {
return;
}
@ -798,14 +842,14 @@ $.fn.formToArray = function(semantic, elements) {
v = $.fieldValue(el, true);
if (v && v.constructor == Array) {
if (elements)
if (elements)
elements.push(el);
for(j=0, jmax=v.length; j < jmax; j++) {
a.push({name: n, value: v[j]});
}
}
else if (feature.fileapi && el.type == 'file' && !el.disabled) {
if (elements)
if (elements)
elements.push(el);
var files = el.files;
if (files.length) {
@ -819,7 +863,7 @@ $.fn.formToArray = function(semantic, elements) {
}
}
else if (v !== null && typeof v != 'undefined') {
if (elements)
if (elements)
elements.push(el);
a.push({name: n, value: v, type: el.type, required: el.required});
}
@ -883,19 +927,19 @@ $.fn.fieldSerialize = function(successful) {
* <input name="C" type="radio" value="C2" />
* </fieldset></form>
*
* var v = $(':text').fieldValue();
* var v = $('input[type=text]').fieldValue();
* // if no values are entered into the text inputs
* v == ['','']
* // if values entered into the text inputs are 'foo' and 'bar'
* v == ['foo','bar']
*
* var v = $(':checkbox').fieldValue();
* var v = $('input[type=checkbox]').fieldValue();
* // if neither checkbox is checked
* v === undefined
* // if both checkboxes are checked
* v == ['B1', 'B2']
*
* var v = $(':radio').fieldValue();
* var v = $('input[type=radio]').fieldValue();
* // if neither radio is checked
* v === undefined
* // if first radio is checked
@ -996,8 +1040,15 @@ $.fn.clearFields = $.fn.clearInputs = function(includeHidden) {
else if (tag == 'select') {
this.selectedIndex = -1;
}
else if (t == "file") {
if (/MSIE/.test(navigator.userAgent)) {
$(this).replaceWith($(this).clone());
} else {
$(this).val('');
}
}
else if (includeHidden) {
// includeHidden can be the valud true, or it can be a selector string
// includeHidden can be the value true, or it can be a selector string
// indicating a special test; for example:
// $('#myForm').clearForm('.special:hidden')
// the above would clean hidden inputs that have the class of 'special'
@ -1062,7 +1113,7 @@ $.fn.ajaxSubmit.debug = false;
// helper fn for console logging
function log() {
if (!$.fn.ajaxSubmit.debug)
if (!$.fn.ajaxSubmit.debug)
return;
var msg = '[jquery.form] ' + Array.prototype.join.call(arguments,'');
if (window.console && window.console.log) {

View File

@ -54,9 +54,12 @@
-moz-border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
}
.widget-content li{
.widget-content li {
padding: 4px 0;
}
.widget-content .overlay_list li {
padding-bottom: 10px;
}
.widget-content ul {
list-style: none inside none;
margin: 0;
@ -74,15 +77,13 @@
visibility: hidden;
}
/*.projector_countdown_spinval {*/
.overlay_list .form-inline {
margin: 5px 0 0 31px;
}
#countdown_time {
width: 40px;
}
#overlay_message_text {
width: 90%;
height: 12px;
}
/* iframe */
#iframe {
@ -95,7 +96,6 @@
width: 1024px;
height: 768px;
}
#iframewrapper {
width: 256px;/*100%;*/
height: 192px;/*230px;*/
@ -103,7 +103,6 @@
overflow: hidden;
border: 1px solid #D5D5D5;
}
#iframeoverlay {
width: 256px;
height: 192px;
@ -113,35 +112,3 @@
display: block;
z-index: 1;
}
/* activate link */
a.activate_link div {
background-image: url(../images/icons/accept-grey.png);
background-repeat: no-repeat;
float: left;
width: 16px;
height: 16px;
padding-right: 12px;
position: relative;
top: 4px;
left: 4px;
}
a.activate_link.active div {
background-image: url(../images/icons/accept.png);
}
a.overlay div {
background-image: url(../images/icons/accept-grey.png);
background-repeat: no-repeat;
float: left;
width: 16px;
height: 16px;
padding-right: 16px;
position: relative;
top: 4px;
left: 4px;
}
a.overlay.active div {
background-image: url(../images/icons/accept.png);
}

View File

@ -18,7 +18,7 @@ body{
/*** HEADER ***/
#header {
position:relative;
background:url("../images/presentation-header-bg.png") repeat-x scroll center top #3D3020;
background:url("../img/presentation-header-bg.png") repeat-x scroll center top #3D3020;
height:100px;
}
#logo {
@ -58,7 +58,7 @@ body{
top:110px;
right:40px;
padding-left:30px;
background: url(../images/icons/clock.png) no-repeat scroll 0px 4px;
background: url(../img/glyphicons_054_clock.png) no-repeat scroll 0px 4px;
}
#currentTime.ajax_error {

View File

@ -10,7 +10,7 @@
<link rel="shortcut icon" href="{% static 'images/favicon.png' %}" type="image/png" />
<script type="text/javascript" src="{% static 'javascript/jquery.min.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/projector.js' %}"></script>
<title>XX{% block title %} {% get_config 'event_name' %} {% endblock %}</title>
<title>{% block title %} {% get_config 'event_name' %} {% endblock %}</title>
{% block header %}
{% endblock %}
</head>
@ -21,7 +21,7 @@
<div id="ajaxswitcher"></div>
<div id="header">
<div id="logo"><img src="{% static 'images/logo-projector.png' %}"></div>
<div id="logo"><img src="{% static 'img/logo-projector.png' %}"></div>
<div class="event_name">{% get_config 'event_name' %}</div>
<div class="event_description">{% get_config 'event_description' %}</div>
</div>

View File

@ -1,24 +1,21 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}
<span class="projector_countdown_spinbox">
<div class="form-inline" style="display:inline-block;">
<div class="input-append">
<input class="projector_countdown_spinval" id="countdown_time" name="countdown_time" type="number" min="0" value="{{ countdown_time }}">
<span class="add-on">{% trans "s" context "seconds" %}</span>
</div>
<a id="countdown_set" class="countdown_control btn btn-small" href="{% url 'countdown_set_default' %}" title="{% trans 'Save time as default' %}">
<i class="icon-refresh"></i>
</a>
<a id="countdown_reset" class="countdown_control btn btn-small" href="{% url 'countdown_reset' %}" title="{% trans 'Reset countdown' %}">
<i class="icon-fast-backward"></i>
</a>
<a id="countdown_play" class="countdown_control btn btn-small" href="{% url 'countdown_start' %}" title="{% trans 'Start countdown' %}"{% if countdown_state == 'active' %} style="display:none"{% endif %}>
<i class="icon-play"></i>
</a>
<a id="countdown_stop" class="countdown_control btn btn-small" href="{% url 'countdown_stop' %}" title="{% trans 'Stop countdown' %}"{% if countdown_state == 'inactive' or countdown_state == 'paused' or countdown_state == 'expired' %} style="display:none"{% endif %}>
<i class="icon-pause"></i>
</a>
<div class="form-inline">
<div class="input-append">
<input class="projector_countdown_spinval" id="countdown_time" name="countdown_time" type="number" min="0" value="{{ countdown_time }}">
<span class="add-on">{% trans "s" context "seconds" %}</span>
</div>
</span>
<a id="countdown_set" class="countdown_control btn btn-mini" href="{% url 'countdown_set_default' %}" title="{% trans 'Save time as default' %}">
<i class="icon-refresh"></i>
</a>
<a id="countdown_reset" class="countdown_control btn" href="{% url 'countdown_reset' %}" title="{% trans 'Reset countdown' %}">
<i class="icon-fast-backward"></i>
</a>
<a id="countdown_play" class="countdown_control btn" href="{% url 'countdown_start' %}" title="{% trans 'Start countdown' %}"{% if countdown_state == 'active' %} style="display:none"{% endif %}>
<i class="icon-play"></i>
</a>
<a id="countdown_stop" class="countdown_control btn" href="{% url 'countdown_stop' %}" title="{% trans 'Stop countdown' %}"{% if countdown_state == 'inactive' or countdown_state == 'paused' or countdown_state == 'expired' %} style="display:none"{% endif %}>
<i class="icon-pause"></i>
</a>
</div>

View File

@ -1,15 +1,14 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}
<form id="overlay_message" action="{% url 'projector_overlay_message' %}" method="post" style="display:inline-block;">{% csrf_token %}
<div class="input-append">
<input id="overlay_message_text" name='message_text' type='text' value="{% get_config 'projector_message' %}">
<button type="submit" class="btn btn-mini btn-primary" name="message" title="{% trans 'Apply' %}">
<i class="icon-ok icon-white"></i>
</button>
<button type="submit" class="btn btn-mini" name='message-clean' title="{% trans 'Clean message' %}">
<i class="icon-remove"></i>
</button>
<form class="form-inline" id="overlay_message" action="{% url 'projector_overlay_message' %}" method="post">{% csrf_token %}
<div class="input-append" style="width: 85%;">
<input class="input-block-level" id="overlay_message_text" name='message_text' type='text' value="{% get_config 'projector_message' %}">
<button type="submit" class="btn btn-primary" name="message" title="{% trans 'Apply' %}" style="width: 16px;">
<i class="icon-ok icon-white"></i>
</button>
<button type="submit" class="btn" name='message-clean' title="{% trans 'Clean message' %}" style="width: 16px;">
<i class="icon-delete"></i>
</button>
</div>
</form>

View File

@ -1,4 +1,3 @@
{% load staticfiles %}
{% load i18n %}
{% load tags %}

View File

@ -9,9 +9,9 @@
{% endblock %}
{% block javascript %}
<script type="text/javascript" src="{% static 'javascript/jquery-ui.min.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/dashboard.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.cookie.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/jquery.form.js' %}"></script>
<script type="text/javascript" src="{% static 'javascript/dashboard.js' %}"></script>
{% endblock %}
{% block content %}

View File

@ -1,6 +1,5 @@
{% load i18n %}
{% load tags %}
{% load staticfiles %}
<!-- projector control buttons -->
{% if perms.projector.can_manage_projector %}

View File

@ -1,24 +1,29 @@
{% load i18n %}
{% load tags %}
<ul>
<ul class="overlay_list">
{% for overlay in overlays %}
<li>
<a id="{{ overlay.def_name }}"
href="{% if overlay.active %}{% url 'projector_overlay_deactivate' overlay.def_name %}{% else %}{% url 'projector_overlay_activate' overlay.def_name %}{% endif %}"
class="overlay btn btn-mini">
<i class="{% if overlay.active %}icon-checked-new{% else %}icon-unchecked-new{% endif %}"></i>
<a id="{{ overlay.def_name }}_active"
href="{% url 'projector_overlay_deactivate' overlay.def_name %}"
class="overlay_activate_link btn btn-mini btn-primary"
style="{% if not overlay.active %}display:none;{% endif %}">
<i class="icon-checked-new_white"></i>
</a>
<a id="{{ overlay.def_name }}_inactive"
href="{% url 'projector_overlay_activate' overlay.def_name %}"
class="overlay_activate_link btn btn-mini"
style="{% if overlay.active %}display:none;{% endif %}">
<i class="icon-unchecked-new"></i>
</a>
{# TODO: Call the html via overlay.html #}
{% if overlay.def_name == "Countdown" %}
<p>{{ overlay }}:<br>
{% trans "Countdown for speaking time" %}:<br>
{% include 'projector/control_countdown.html' %}
</p>
{% endif %}
{% if overlay.def_name == "Message" %}
{{ overlay }}:<br>
{% trans "Message" %}:<br>
{% include 'projector/control_overlay_message.html' %}
{% endif %}
</li>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 924 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 808 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 707 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 332 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 912 B

After

Width:  |  Height:  |  Size: 912 B

Some files were not shown because too many files have changed in this diff Show More