Skip to content

Commit a8764f2

Browse files
committed
Track CSS class name changes in bs5.
- Legacy-Id: 19663
1 parent 2a8c231 commit a8764f2

56 files changed

Lines changed: 165 additions & 163 deletions

Some content is hidden

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

ietf/doc/templatetags/ballot_icon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def sort_key(t):
109109
else:
110110
typename = "IESG"
111111

112-
res = ['<a %s href="%s" data-toggle="modal" data-target="#modal-%d" title="%s positions (click to show more)" class="ballot-icon"><table' % (
112+
res = ['<a %s href="%s" data-bs-toggle="modal" data-bs-target="#modal-%d" title="%s positions (click to show more)" class="ballot-icon"><table' % (
113113
right_click_string,
114114
urlreverse("ietf.doc.views_doc.ballot_popup", kwargs=dict(name=doc.name, ballot_id=ballot.pk)),
115115
ballot.pk,

ietf/meeting/tests_js.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def test_edit_meeting_schedule(self):
267267
self.driver.find_element(By.CSS_SELECTOR, "#timeslot-toggle-modal-open").click()
268268
self.assertTrue(self.driver.find_element(By.CSS_SELECTOR, "#timeslot-group-toggles-modal").is_displayed())
269269
self.driver.find_element(By.CSS_SELECTOR, "#timeslot-group-toggles-modal [value=\"{}\"]".format("ts-group-{}-{}".format(slot2.time.strftime("%Y%m%d-%H%M"), int(slot2.duration.total_seconds() / 60)))).click()
270-
self.driver.find_element(By.CSS_SELECTOR, "#timeslot-group-toggles-modal [data-dismiss=\"modal\"]").click()
270+
self.driver.find_element(By.CSS_SELECTOR, "#timeslot-group-toggles-modal [data-bs-dismiss=\"modal\"]").click()
271271
self.assertTrue(not self.driver.find_element(By.CSS_SELECTOR, "#timeslot-group-toggles-modal").is_displayed())
272272

273273
# swap days
@@ -1215,7 +1215,7 @@ def open_agenda_filter_ui(wait):
12151215
"""Click the 'customize' anchor to reveal the group buttons"""
12161216
customize_anchor = wait.until(
12171217
expected_conditions.element_to_be_clickable(
1218-
(By.CSS_SELECTOR, '#accordion a[data-toggle="collapse"]')
1218+
(By.CSS_SELECTOR, '#accordion a[data-bs-toggle="collapse"]')
12191219
)
12201220
)
12211221
customize_anchor.click()
@@ -1390,7 +1390,7 @@ def test_agenda_view_group_filter_toggle_without_replace_state(self):
13901390
# Click the 'customize' anchor to reveal the group buttons
13911391
customize_anchor = WebDriverWait(self.driver, 2).until(
13921392
expected_conditions.element_to_be_clickable(
1393-
(By.CSS_SELECTOR, '#accordion a[data-toggle="collapse"]')
1393+
(By.CSS_SELECTOR, '#accordion a[data-bs-toggle="collapse"]')
13941394
)
13951395
)
13961396
customize_anchor.click()
@@ -1511,7 +1511,7 @@ def test_session_materials_modal(self):
15111511
# Click the 'materials' button
15121512
open_modal_button = WebDriverWait(self.driver, 2).until(
15131513
expected_conditions.element_to_be_clickable(
1514-
(By.CSS_SELECTOR, '[data-target="#modal-%s"]' % slug)
1514+
(By.CSS_SELECTOR, '[data-bs-target="#modal-%s"]' % slug)
15151515
),
15161516
'Modal open button not found or not clickable',
15171517
)
@@ -1544,7 +1544,7 @@ def test_session_materials_modal(self):
15441544
# Now close the modal
15451545
close_modal_button = WebDriverWait(self.driver, 2).until(
15461546
expected_conditions.element_to_be_clickable(
1547-
(By.CSS_SELECTOR, '.modal-footer button[data-dismiss="modal"]')
1547+
(By.CSS_SELECTOR, '.modal-footer button[data-bs-dismiss="modal"]')
15481548
),
15491549
'Modal close button not found or not clickable',
15501550
)
@@ -1564,7 +1564,7 @@ def test_session_materials_modal(self):
15641564
# Click the 'materials' button
15651565
open_modal_button = WebDriverWait(self.driver, 2).until(
15661566
expected_conditions.element_to_be_clickable(
1567-
(By.CSS_SELECTOR, '[data-target="#modal-%s"]' % slug)
1567+
(By.CSS_SELECTOR, '[data-bs-target="#modal-%s"]' % slug)
15681568
),
15691569
'Modal open button not found or not clickable for refresh test',
15701570
)
@@ -2468,7 +2468,7 @@ def test_upcoming_materials_modal(self):
24682468
# Click the 'materials' button
24692469
open_modal_button = self.wait.until(
24702470
expected_conditions.element_to_be_clickable(
2471-
(By.CSS_SELECTOR, '[data-target="#modal-%s"]' % slug)
2471+
(By.CSS_SELECTOR, '[data-bs-target="#modal-%s"]' % slug)
24722472
),
24732473
'Modal open button not found or not clickable',
24742474
)
@@ -2482,7 +2482,7 @@ def test_upcoming_materials_modal(self):
24822482
close_modal_button = self.wait.until(
24832483
presence_of_element_child_by_css_selector(
24842484
modal_div,
2485-
'.modal-footer button[data-dismiss="modal"]',
2485+
'.modal-footer button[data-bs-dismiss="modal"]',
24862486
),
24872487
'Modal close button not found or not clickable',
24882488
)
@@ -2621,7 +2621,7 @@ def do_delete_test(self, selector, keep, delete, cancel=False):
26212621
if cancel:
26222622
cancel_button = self.wait.until(
26232623
expected_conditions.element_to_be_clickable(
2624-
(By.CSS_SELECTOR, '#delete-modal button[data-dismiss="modal"]')
2624+
(By.CSS_SELECTOR, '#delete-modal button[data-bs-dismiss="modal"]')
26252625
))
26262626
cancel_button.click()
26272627
else:

ietf/static/css/ietf.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ $enable-negative-margins: true;
3737
@import "~/node_modules/bootstrap/scss/badge";
3838
@import "~/node_modules/bootstrap/scss/alert";
3939
// @import "~/node_modules/bootstrap/scss/progress";
40-
// @import "~/node_modules/bootstrap/scss/list-group";
40+
@import "~/node_modules/bootstrap/scss/list-group";
4141
@import "~/node_modules/bootstrap/scss/close";
4242
// @import "~/node_modules/bootstrap/scss/toasts";
4343
@import "~/node_modules/bootstrap/scss/modal";

ietf/static/js/agenda_timezone.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ window.format_time = function (t, tz, fmt) {
4848

4949
switch (fmt) {
5050
case 0:
51-
out = t.tz(tz).format('dddd, ') + '<span class="hidden-xs">' +
51+
out = t.tz(tz).format('dddd, ') + '<span class="d-none d-sm-block">' +
5252
t.tz(tz).format('MMMM Do YYYY, ') + '</span>' +
53-
t.tz(tz).format('HH:mm') + '<span class="hidden-xs">' +
53+
t.tz(tz).format('HH:mm') + '<span class="d-none d-sm-block">' +
5454
t.tz(tz).format(' Z z') + '</span>';
5555
break;
5656
case 1:

ietf/static/js/ietf.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "bootstrap/js/dist/dropdown";
99
import "bootstrap/js/dist/modal";
1010
// import "bootstrap/js/dist/offcanvas";
1111
// import "bootstrap/js/dist/popover";
12-
// import "bootstrap/js/dist/scrollspy";
12+
import "bootstrap/js/dist/scrollspy";
1313
import "bootstrap/js/dist/tab";
1414
// import "bootstrap/js/dist/toast";
1515
import "bootstrap/js/dist/tooltip";
@@ -39,6 +39,15 @@ jQuery.ajaxSetup({
3939
}
4040
});
4141

42+
// Use the Bootstrap tooltip plugin for all elements with a title attribute
43+
$(document)
44+
.ready(function () {
45+
$('[title][title!=""]')
46+
.not("th")
47+
.attr("data-bs-toggle", "tooltip")
48+
.tooltip();
49+
});
50+
4251
$(document)
4352
.ready(function () {
4453

ietf/templates/api/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{% extends "base.html" %}
33
{% load static %}
44
{% block title %}API Notes{% endblock %}
5-
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
5+
{% block bodyAttrs %}data-bs-spy="scroll" data-bs-target="#affix"{% endblock %}
66
{% block content %}
77

88
<h2>Datatracker API Notes</h2>
@@ -362,8 +362,8 @@ <h3 id="signing-keys" class="anchor-target">Signing Keys</h3>
362362

363363
</div>
364364

365-
<div class="col-md-1 hidden-print bs-docs-sidebar" id="affix">
366-
<ul class="nav nav-pills nav-stacked small fixed" data-spy="affix">
365+
<div class="col-md-1 d-print-none bs-docs-sidebar" id="affix">
366+
<ul class="nav nav-pills nav-stacked small fixed" data-bs-spy="affix">
367367

368368
<li><a href="#framework">Framework API</a></li>
369369
<li><a href="#framework-documents">&nbsp; Framework API: Documents</a></li>

ietf/templates/base/menu_wg.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% origin %}
55

66
{% for p in parents %}
7-
<li class="hidden-nojs dropend group-menu group-parent-{{ p.id }}">
7+
<li class="dropend group-menu group-parent-{{ p.id }}">
88
<a class="dropdown-item dropdown-toggle {% if flavor != 'top' %}text-wrap link-primary{% endif %}" href="{{ p.menu_url }}">
99
{{ p.short_name }}
1010
</a>

ietf/templates/community/manage_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ <h2>Search rules</h2>
105105

106106
{% endif %}
107107

108-
<div><a class="btn btn-primary" data-toggle="collapse" data-target="#add-new-rule">Add a new rule</a></div>
108+
<div><a class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#add-new-rule">Add a new rule</a></div>
109109

110110
<div id="add-new-rule" {% if not rule_type_form.errors and not rule_form %}class="collapse"{% endif %}>
111111
<h3>Add a new rule</h3>

ietf/templates/debug.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@
3636
<td>
3737
{{ query.loc }}
3838
{% if query.origin %}
39-
<button type="button" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#modal-{{forloop.counter}}" >Origin</button>
39+
<button type="button" class="btn btn-primary btn-xs" data-bs-toggle="modal" data-bs-target="#modal-{{forloop.counter}}" >Origin</button>
4040
{% endif %}
4141
<div class="modal fade" id="modal-{{forloop.counter}}" tabindex="-1" role="dialog" aria-labelledby="modal-title-{{forloop.counter}}">
4242
<div class="modal-dialog modal-max" role="document">
4343
<div class="modal-content">
4444
<div class="modal-header">
45-
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
45+
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
4646
<h4 class="modal-title" id="modal-title-{{forloop.counter}}">QuerySet Origin for Query #{{forloop.counter}}</h4>
4747
</div>
4848
<div class="modal-body">
@@ -74,7 +74,7 @@ <h4 class="modal-title" id="modal-title-{{forloop.counter}}">QuerySet Origin for
7474
</table>
7575
</div>
7676
<div class="modal-footer">
77-
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
77+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button>
7878
</div>
7979
</div>
8080
</div>

ietf/templates/doc/ballot_popup.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<body>
1212
<div class="modal-header">
13-
<button type="button" class="close" data-dismiss="modal">
13+
<button type="button" class="close" data-bs-dismiss="modal">
1414
<span aria-hidden="true">&times;</span>
1515
<span class="sr-only">Close</span>
1616
</button>
@@ -42,7 +42,7 @@ <h4 class="modal-title" id="modal-title-{{ ballot_id }}">Ballot for {{ doc.name
4242
{% endif %}
4343
{% endif %}
4444
{% endif %}
45-
<button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
45+
<button type="button" class="btn btn-primary" data-bs-dismiss="modal">Close</button>
4646
</div>
4747
</body>
4848
</html>

0 commit comments

Comments
 (0)