<button id="fragmentsButton" type="button" class="btn btn-primary btn-md" data-toggle="modal" data-target="#flipFlop" style="display: none;">
    Фрагменты
</button>

<!-- The modal -->
<div class="modal fade" id="flipFlop" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">×</span>
                </button>
                <h4 class="modal-title" id="modalLabel">Фрагменты</h4>
            </div>
            <div class="modal-body">
                {% if fragments %}
                    <div style="width:100%;
                                height: 70vh;
                                overflow:auto;
                                -moz-user-select: none;
                                -webkit-user-select: none;
                                -ms-user-select:none;
                                user-select:none;
                                -o-user-select:none;"
                         unselectable="on"
                         onselectstart="return false;"
                         onmousedown="return false;"
                         id="fragmentsScrollBox">
                        <table class="table table-striped table-hover table-sm table-responsive" id="fragmentsTable">
                            <tbody>
                                {% for f in fragments %}
                                    <tr style="font-size: 10pt; cursor:pointer;" class="fragmentsTableRow"><td class="fragmentsCell" data-start="{{ f.1 }}" data-end="{{ f.2 }}">{{ f.0 }}</td></tr>
                                {% endfor %}
                            </tbody>
                        </table>
                    </div>
                {% else %}
                    <div>Тут фрагментов нет</div>
                {% endif %}
            </div>
        </div>
    </div>
</div>