Добавил отметки с источниками
This commit is contained in:
@@ -1620,6 +1620,19 @@ function showPlaybackAnimation() {
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
// Function to show source marks for selected sources
|
||||
function showSourceMarks() {
|
||||
if (!window.selectedSources || window.selectedSources.length === 0) {
|
||||
alert('Список источников пуст');
|
||||
return;
|
||||
}
|
||||
|
||||
const selectedIds = window.selectedSources.map(source => source.id);
|
||||
const url = '{% url "mainapp:source_marks" %}' + '?ids=' + selectedIds.join(',');
|
||||
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
// Function to merge selected sources
|
||||
function mergeSelectedSources() {
|
||||
if (!window.selectedSources || window.selectedSources.length < 2) {
|
||||
@@ -2226,6 +2239,9 @@ function showTransponderModal(transponderId) {
|
||||
<button type="button" class="btn btn-outline-info btn-sm" onclick="showPlaybackAnimation()" title="Анимация движения объектов">
|
||||
<i class="bi bi-play-circle"></i> Анимация
|
||||
</button>
|
||||
<button type="button" class="btn btn-outline-warning btn-sm" onclick="showSourceMarks()" title="Отметки сигналов по источникам">
|
||||
<i class="bi bi-check2-square"></i> Отметки
|
||||
</button>
|
||||
{% if user|has_perm:'source_merge' %}
|
||||
<button type="button" class="btn btn-outline-success btn-sm" onclick="mergeSelectedSources()">
|
||||
<i class="bi bi-union"></i> Объединить
|
||||
|
||||
Reference in New Issue
Block a user