Skip to content

Commit 4e2b62d

Browse files
committed
Added a bit of javascript and styling to make it possible to use URL fragment identifiers to link to position-specific tabs on the nomocom requirements and questionnaire pages.
- Legacy-Id: 15451
1 parent 9e87dc4 commit 4e2b62d

4 files changed

Lines changed: 49 additions & 1 deletion

File tree

ietf/static/ietf/css/ietf.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ div.anchor-target:before {
117117
}
118118
div.anchor-target { z-index: 0; }
119119

120+
/* Same as above (avoid hiding content under navbar) for tab-panes */
121+
div.tab-pane:before {
122+
content: '';
123+
display: block;
124+
position: relative;
125+
width: 0;
126+
height: 7.5em;
127+
margin-top: -7.5em;
128+
}
129+
120130
/* Make the panel title font normally large */
121131
.panel-title { font-size: 14px }
122132

@@ -591,7 +601,6 @@ table.simple-table td:last-child {
591601
background-color: #F0F0F0;
592602
}
593603

594-
595604
.reviewer-doc-past {
596605
background-color: #800000;
597606
}

ietf/templates/meeting/room-view.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,4 +595,15 @@
595595
{% endfor %}
596596
</div>
597597
<div>
598+
<script>
599+
// Javascript to enable link to tabs
600+
var url = document.location.toString();
601+
if (url.match('#')) {
602+
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
603+
}
604+
// Change hash for page-reload
605+
$('.nav-tabs a').on('shown.bs.tab', function (e) {
606+
window.location.hash = e.target.hash;
607+
})
608+
</script>
598609
</body></html>

ietf/templates/nomcom/nomcom_private_base.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,17 @@ <h1>NomCom {{ year }} {% if nomcom.group.state_id == 'conclude' %}(Concluded){%
6060
{% endblock %}
6161

6262
{% endblock %}
63+
64+
{% block js %}
65+
<script>
66+
// Javascript to enable link to tab
67+
var url = document.location.toString();
68+
if (url.match('#')) {
69+
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
70+
}
71+
// Change hash for page-reload
72+
$('.nav-tabs a').on('shown.bs.tab', function (e) {
73+
window.location.hash = e.target.hash;
74+
})
75+
</script>
76+
{% endblock %}

ietf/templates/nomcom/nomcom_public_base.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,17 @@ <h1>NomCom {{ year }} {% if nomcom.group.state_id == 'conclude' %}(Concluded){%
2525
{% endblock %}
2626

2727
{% endblock %}
28+
29+
{% block js %}
30+
<script>
31+
// Javascript to enable link to tab
32+
var url = document.location.toString();
33+
if (url.match('#')) {
34+
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
35+
}
36+
// Change hash for page-reload
37+
$('.nav-tabs a').on('shown.bs.tab', function (e) {
38+
window.location.hash = e.target.hash;
39+
})
40+
</script>
41+
{% endblock %}

0 commit comments

Comments
 (0)