Skip to content

Commit 373b5db

Browse files
committed
More fixes.
- Legacy-Id: 19827
1 parent 6fa5fa0 commit 373b5db

67 files changed

Lines changed: 274 additions & 243 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ietf/dbtemplate/templates/dbtemplate/template_edit.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ <h2>Edit template content</h2>
4343

4444

4545
</form>
46-
{% endblock content %}
46+
{% endblock %}

ietf/dbtemplate/templates/dbtemplate/template_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ <h1>Defined templates for group {{ group }}</h1>
1212
{% else %}
1313
<p>There are no templates defined for this group.</p>
1414
{% endif %}
15-
{% endblock content %}
15+
{% endblock %}

ietf/dbtemplate/templates/dbtemplate/template_show.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ <h2>Template content</h2>
3737
<p class='pasted'>{{ template.content }}</p>
3838
</div>
3939

40-
{% endblock content %}
40+
{% endblock %}

ietf/doc/templatetags/ballot_icon.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ def sort_key(t):
137137
i = i + 1
138138

139139
res.append("</tr></table></a>")
140-
# XXX FACELIFT: Loading via href will go away in bootstrap 4.
141-
# See http://getbootstrap.com/javascript/#modals-usage
142-
res.append('<div id="modal-%d" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-lg"><div class="modal-content"></div></div></div>' % ballot.pk)
140+
res.append('<div id="modal-%d" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-scrollable modal-xl"><div class="modal-content"></div></div></div>' % ballot.pk)
143141

144142
return mark_safe("".join(res))
145143

ietf/static/css/ietf.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ body {
6666
padding-top: 60px;
6767
}
6868

69+
// Make textareas use monospace font
70+
textarea {
71+
font-family: var(--bs-font-monospace);
72+
}
73+
74+
6975
// Make the font size choice cascade down into group menu dropdowns.
7076
.leftmenu li>ul {
7177
font-size: inherit;
@@ -146,8 +152,8 @@ $timeline-even-hover-color: shift-color($timeline-even-color, $link-shade-percen
146152

147153
.ballot-icon table td {
148154
border: $table-border-width solid $table-border-color;
149-
height: 10px;
150-
width: 8px;
155+
height: 1em;
156+
width: .8em;
151157
}
152158

153159
.ballot-icon table .my {

ietf/static/js/ietf.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ jQuery.ajaxSetup({
4343
$(document)
4444
.ready(function () {
4545
$('[title][title!=""]')
46-
.attr("data-bs-toggle", "tooltip")
4746
.tooltip();
4847
});
4948

@@ -227,4 +226,18 @@ $(document)
227226
}
228227
});
229228
});
229+
});
230+
231+
// Bootstrap doesn't load modals via href anymore, so let's do it ourselves.
232+
// See https://stackoverflow.com/a/48934494/2240756
233+
$(document)
234+
.ready(function () {
235+
$('.modal')
236+
.on('show.bs.modal', function (e) {
237+
var button = $(e.relatedTarget);
238+
// load content from value of button href
239+
$(this)
240+
.find('.modal-content')
241+
.load(button.attr("href"));
242+
});
230243
});

ietf/static/js/upload_bofreq.js

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
$(document).ready(function () {
2-
var form = $("form.upload-content");
3-
// review submission selection
4-
form.find("[name=bofreq_submission]").on("click change", function () {
5-
var val = form.find("[name=bofreq_submission]:checked").val();
1+
$(document)
2+
.ready(function () {
3+
var form = $("form.upload-content");
4+
// review submission selection
5+
form.find("[name=bofreq_submission]")
6+
.on("click change", function () {
7+
var val = form.find("[name=bofreq_submission]:checked")
8+
.val();
69

7-
var shouldBeVisible = {
8-
"enter": ['[name="bofreq_content"]'],
9-
"upload": ['[name="bofreq_file"]'],
10-
};
10+
var shouldBeVisible = {
11+
enter: ['[name="bofreq_content"]'],
12+
upload: ['[name="bofreq_file"]'],
13+
};
1114

12-
for (var v in shouldBeVisible) {
13-
for (var i in shouldBeVisible[v]) {
14-
var selector = shouldBeVisible[v][i];
15-
var row = form.find(selector);
16-
if (!row.is(".form-group"))
17-
row = row.closest(".form-group");
18-
19-
if ($.inArray(selector, shouldBeVisible[val]) != -1)
20-
row.show();
21-
else
22-
row.hide();
23-
}
24-
}
25-
}).trigger("change");
26-
});
15+
for (var v in shouldBeVisible) {
16+
for (var i in shouldBeVisible[v]) {
17+
var selector = shouldBeVisible[v][i];
18+
var row = form.find(selector);
19+
if (!row.is(".row"))
20+
row = row.closest(".row");
21+
console.log("!");
22+
if ($.inArray(selector, shouldBeVisible[val]) != -1)
23+
row.show();
24+
else
25+
row.hide();
26+
}
27+
}
28+
})
29+
.trigger("change");
30+
});

ietf/templates/base.html

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,18 @@
1010
<meta charset="utf-8"/>
1111
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
1212
<title>
13-
{% block title %}
14-
No title
15-
{% endblock title %}
13+
{% block title %}No title{% endblock %}
1614
</title>
1715
<meta name="viewport" content="width=device-width, initial-scale=1"/>
1816
{% comment Halloween %}
1917
<link href='https://fonts.googleapis.com/css?family=IM+Fell+English+SC|IM+Fell+DW+Pica:400,400italic|Nova+Mono|IM+Fell+English:400,400italic&subset=latin-ext,latin' rel='stylesheet' type='text/css'/>
2018
{% endcomment %}
2119
<link rel="stylesheet" href="{% static 'ietf/css/ietf.css' %}"/>
2220
<style>
23-
{% block morecss %}{% endblock morecss %}
21+
{% block morecss %}{% endblock %}
2422
.leftmenu { width: 13em; }
2523
</style>
26-
{% block pagehead %}
27-
{% endblock pagehead %}
24+
{% block pagehead %}{% endblock %}
2825
{% if server_mode and server_mode == "production" %}
2926
<link rel="shortcut icon"
3027
href="{% static 'ietf/images/ietf-icon-blue3.png' %}"/>
@@ -98,11 +95,8 @@
9895
{{ message.message }}
9996
</div>
10097
{% endfor %}
101-
{% block content %}
102-
{{ content|safe }}
103-
{% endblock content %}
104-
{% block content_end %}
105-
{% endblock content_end %}
98+
{% block content %}{{ content|safe }}{% endblock %}
99+
{% block content_end %}{% endblock %}
106100
</div>
107101
</div>
108102
<hr />
@@ -142,12 +136,8 @@
142136
{% include "debug.html" %}
143137
</p>
144138
</footer>
145-
{% endblock footer %}
139+
{% endblock %}
146140
</div>
147-
{% block js %}
148-
{% endblock js %}
149-
{% if debug %}
150-
<script src="{% static 'ietf/js/list.js' %}"></script>
151-
{% endif %}
141+
{% block js %}{% endblock %}
152142
</body>
153-
</html>
143+
</html>

ietf/templates/cookies/settings.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% load origin %}
55
{% block title %}
66
User settings
7-
{% endblock title %}
7+
{% endblock %}
88
{% block content %}
99
{% origin %}
1010
<h1>User settings</h1>
@@ -149,4 +149,4 @@ <h2>Show the left-hand menu?</h2>
149149
On
150150
</a>
151151
</p>
152-
{% endblock content %}
152+
{% endblock %}

ietf/templates/debug.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
{# bs5ok #}
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
33
{% load origin %}
4+
{% load static %}
5+
{% block pagehead %}
6+
{% if debug %}
7+
<link rel="stylesheet" href="{% static 'ietf/css/list.css' %}"/>
8+
{% endif %}
9+
{% endblock %}
410
{% origin %}
511
{% if debug %}
612
{% if sql_debug %}
@@ -107,4 +113,9 @@ <h4 class="modal-title" id="modal-title-{{ forloop.counter }}">QuerySet Origin f
107113
Add 'ietf.context_processors.sql_debug' to settings.TEMPLATE_CONTECT_PROCESSORS to turn on the SQL statement table
108114
</div>
109115
{% endif %}
110-
{% endif %}
116+
{% endif %}
117+
{% block js %}
118+
{% if debug %}
119+
<script src="{% static 'ietf/js/list.js' %}"></script>
120+
{% endif %}
121+
{% endblock %}

0 commit comments

Comments
 (0)