Merge pull request #1422 from corubba/feature/dashboard-tab-cleanup

Clean up dashboard zone tabs
This commit is contained in:
Matt Scott
2023-03-04 11:03:57 -05:00
committed by GitHub
3 changed files with 51 additions and 37 deletions

View File

@ -176,17 +176,11 @@
<div class="nav-tabs-custom">
<ul class="nav nav-tabs card-header-tabs" id="custom-content-below-tab"
role="tablist">
<li class="nav-item">
<a class="nav-link active" href="#tab_{{ custom_boxes.order[0] }}"
data-toggle="pill" role="tab">
Zones <b>{{ custom_boxes.boxes[custom_boxes.order[0]][0] }}</b>
</a>
</li>
{% for boxId in custom_boxes.order[1:] %}
{% for tab_id in zone_tabs.order %}
<li class="nav-item">
<a class="nav-link" href="#tab_{{ boxId }}" data-toggle="pill"
role="tab">
Zones <b>{{ custom_boxes.boxes[boxId][0] }}</b>
<a class="nav-link {% if loop.first %}active{% endif %}"
href="#tab_{{ tab_id }}" data-toggle="pill" role="tab">
Zones <b>{{ zone_tabs.tabs[tab_id].display_name }}</b>
</a>
</li>
{% endfor %}
@ -197,10 +191,11 @@
<!-- /.card-header -->
<div class="card-body p-0">
<div class="tab-content">
{% for boxId in custom_boxes.order %}
<div class="tab-pane show" id='tab_{{ boxId }}'>
{% for tab_id in zone_tabs.order %}
<div id='tab_{{ tab_id }}'
class="tab-pane show {% if loop.first %}active{% endif %}">
<div class="card-body table-responsive records p-0 pt-2">
<table id='tbl_domain_list_{{ boxId }}'
<table id='tbl_domain_list_{{ tab_id }}'
class="table table-striped table-hover table-sm records">
<thead>
<tr>
@ -274,9 +269,8 @@
});
}
$('#tab_{{custom_boxes.order[0]}}').addClass("active");
{% for boxId in custom_boxes.order %}
setUpDomainList("#tbl_domain_list_{{boxId}}", "{{url_for('dashboard.domains_custom',boxId=boxId)}}");
{% for tab_id in zone_tabs.order %}
setUpDomainList("#tbl_domain_list_{{tab_id}}", "{{url_for('dashboard.domains_custom',tab_id=tab_id)}}");
{% endfor %}
//SYBPATCH END//