Modify some select2 box
This commit is contained in:
parent
847e8b6660
commit
695fa85b19
13 changed files with 50 additions and 31 deletions
|
@ -522,7 +522,9 @@
|
|||
$('#search-handle').select2({
|
||||
placeholder: '<i class="fa fa-search"></i> {{ _('Search by handle...') }}',
|
||||
ajax: {
|
||||
url: '{{ url('chat_user_search_select2_ajax') }}'
|
||||
url: '{{ url('chat_user_search_select2_ajax') }}',
|
||||
delay: 250,
|
||||
cache: true,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
escapeMarkup: function (markup) {
|
||||
|
|
|
@ -161,7 +161,9 @@
|
|||
$('#search-contest').select2({
|
||||
placeholder: placeholder,
|
||||
ajax: {
|
||||
url: '{{ url('contest_user_search_select2_ajax', contest.key) }}'
|
||||
url: '{{ url('contest_user_search_select2_ajax', contest.key) }}',
|
||||
cache: true,
|
||||
delay: 250,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
escapeMarkup: function (markup) {
|
||||
|
|
|
@ -128,12 +128,14 @@
|
|||
|
||||
{% block before_table %}
|
||||
{% include "contest/contest-datetime.html" %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
{% if page_type == 'participation' %}
|
||||
{% if contest.can_see_full_scoreboard(request.user) %}
|
||||
{% if page_type == 'participation' %}
|
||||
{% if contest.can_see_full_scoreboard(request.user) %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<input id="search-contest" type="text" placeholder="{{ _('View user participation') }}">
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div style="margin-bottom: 0.5em">
|
||||
<input id="show-schools-checkbox" type="checkbox" style="vertical-align: bottom">
|
||||
<label for="show-schools-checkbox" style="vertical-align: bottom; margin-right: 1em;">{{ _('Show schools') }}</label>
|
||||
|
||||
|
|
|
@ -90,7 +90,15 @@
|
|||
.css({'visibility': 'visible'});
|
||||
$('#search-org').select2({multiple: 1, placeholder: '{{ _('Groups') }}...'})
|
||||
.css({'visibility': 'visible'});
|
||||
$('#search-author').select2({multiple: 1, placeholder: '{{ _('Authors') }}...'})
|
||||
$('#search-author').select2({
|
||||
multiple: 1,
|
||||
placeholder: '{{ _('Authors') }}...',
|
||||
ajax: {
|
||||
url: '{{ url('problem_authors_select2_ajax') }}',
|
||||
delay: 250,
|
||||
cache: true,
|
||||
}
|
||||
})
|
||||
.css({'visibility': 'visible'});
|
||||
|
||||
// This is incredibly nasty to do but it's needed because otherwise the select2 steals the focus
|
||||
|
|
|
@ -49,9 +49,9 @@
|
|||
<div class="filter-form-group">
|
||||
<label class="bold-text margin-label" for="type"><i class="non-italics">{{ _('Author') }}</i></label>
|
||||
<select id="search-author" name="authors" multiple>
|
||||
{% for author in all_authors %}
|
||||
<option value="{{ author.id }}"{% if author.id in author_query %} selected{% endif %}>
|
||||
{{ author.user__username }}
|
||||
{% for author in author_query %}
|
||||
<option value="{{ author.id }}" selected>
|
||||
{{ author.username }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
|
|
@ -275,10 +275,6 @@
|
|||
col.sub-info, td.sub-info {
|
||||
width: 78%
|
||||
}
|
||||
|
||||
#status, #language {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -193,6 +193,8 @@
|
|||
}
|
||||
};
|
||||
},
|
||||
delay: 250,
|
||||
cache: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
$('#search-handle').select2({
|
||||
placeholder: '{{ _('Search by handle...') }}',
|
||||
ajax: {
|
||||
url: '{{ url('user_search_select2_ajax') }}'
|
||||
url: '{{ url('user_search_select2_ajax') }}',
|
||||
delay: 250,
|
||||
cache: true,
|
||||
},
|
||||
minimumInputLength: 1,
|
||||
escapeMarkup: function (markup) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue