select multiple
This commit is contained in:
parent
8a0cc16bf4
commit
f1aeb59b4a
@ -6,6 +6,8 @@
|
||||
{% block header_link %}
|
||||
<link type="text/css" rel="stylesheet"
|
||||
href="{% static '/css/speedometer.css' %}?ver={% settings_value 'APP_VER' %}">
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap-duallistbox@3.0.9/dist/bootstrap-duallistbox.min.css"
|
||||
rel="stylesheet">
|
||||
{% endblock header_link %}
|
||||
|
||||
{% block content %}
|
||||
@ -31,48 +33,41 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-header text-sm">
|
||||
{% block pagination %}
|
||||
{% if is_paginated %}
|
||||
<ul class="pagination pagination no-margin text-sm">
|
||||
{% if 1 < start_page_list %}
|
||||
<li class="paginate_button page-item" id="mypaginator_next">
|
||||
<a class="page-link" href="?page={{ start_page_list|add:-1}}"
|
||||
aria-controls="mypaginator" data-dt-idx="{{ start_page_list|add:-1}}"
|
||||
style="padding: .3rem .5rem;"><span>..</span></a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
{% for n in page_list %}
|
||||
{% if n == page_object.number %}
|
||||
<li class="paginate_button page-item active" id="mypaginator_next">
|
||||
<a class="page-link" href="?page={{ n }}"
|
||||
aria-controls="mypaginator" data-dt-idx="{{ n }}"
|
||||
style="padding: .3rem .5rem;"><span>{{ n }}</span></a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="paginate_button page-item" id="mypaginator_next">
|
||||
<a class="page-link" href="?page={{ n }}"
|
||||
aria-controls="mypaginator" data-dt-idx="{{ n }}"
|
||||
style="padding: .3rem .5rem;"><span>{{ n }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if end_page_list < num_pages %}
|
||||
<li class="paginate_button page-item" id="mypaginator_next">
|
||||
<a class="page-link" href="?page={{ end_page_list|add:1}}"
|
||||
aria-controls="mypaginator" data-dt-idx="{{ end_page_list|add:1}}"
|
||||
style="padding: .3rem .5rem;"><span>..</span></a>
|
||||
</li>
|
||||
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
</div> <!-- /.card-header -->
|
||||
<div class="card-body table-responsive p-0">
|
||||
|
||||
|
||||
<div class="card card-default">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title">Выбор канала</h3>
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse">
|
||||
<i class="fas fa-minus"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-header -->
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<select multiple="multiple" id="duallist" name="duallist[]">
|
||||
<option value="1">Элемент 1</option>
|
||||
<option value="2">Элемент 2</option>
|
||||
<option value="3">Элемент 3</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- /.form-group -->
|
||||
</div>
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
<!-- /.row -->
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
{% if not user.profile.isredonly %}
|
||||
@ -194,10 +189,36 @@
|
||||
</div> <!-- /.row -->
|
||||
</div><!-- /.container-fluid -->
|
||||
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
{% block script_footer %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap-duallistbox@3.0.9/dist/jquery.bootstrap-duallistbox.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// Проверяем, загружен ли плагин
|
||||
if (typeof $.fn.bootstrapDualListbox !== 'undefined') {
|
||||
$('#duallist').bootstrapDualListbox({
|
||||
nonSelectedListLabel: 'Доступные каналы',
|
||||
selectedListLabel: 'Выбранные каналы',
|
||||
preserveSelectionOnMove: 'moved',
|
||||
moveOnSelect: false,
|
||||
infoText: 'Показано {0} элементов',
|
||||
infoTextFiltered: '<span class="badge bg-warning text-dark">Отфильтровано</span> {0} из {1}',
|
||||
filterPlaceHolder: 'Фильтр',
|
||||
filterTextClear: 'показать все',
|
||||
moveSelectedLabel: 'Выбрать',
|
||||
moveAllLabel: 'Выбрать все',
|
||||
removeSelectedLabel: 'Удалить',
|
||||
removeAllLabel: 'Удалить все',
|
||||
});
|
||||
console.log('Dual Listbox инициализирован');
|
||||
} else {
|
||||
console.error('Плагин Dual Listbox не загружен!');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
||||
function play(nom) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user