Skip to content

Commit cc723ce

Browse files
committed
More fixes.
- Legacy-Id: 19899
1 parent 335a39d commit cc723ce

58 files changed

Lines changed: 1760 additions & 1410 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/ietf_filters.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ def urlize_ietf_docs(string, autoescape=None):
226226
"""
227227
if autoescape and not isinstance(string, SafeData):
228228
string = escape(string)
229-
string = re.sub(r"(?<!>)(RFC\s*?)0{0,3}(\d+)", "<a href=\"/doc/rfc\\2/\">\\1\\2</a>", string)
230-
string = re.sub(r"(?<!>)(BCP\s*?)0{0,3}(\d+)", "<a href=\"/doc/bcp\\2/\">\\1\\2</a>", string)
231-
string = re.sub(r"(?<!>)(STD\s*?)0{0,3}(\d+)", "<a href=\"/doc/std\\2/\">\\1\\2</a>", string)
232-
string = re.sub(r"(?<!>)(FYI\s*?)0{0,3}(\d+)", "<a href=\"/doc/fyi\\2/\">\\1\\2</a>", string)
233-
string = re.sub(r"(?<!>)(draft-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
234-
string = re.sub(r"(?<!>)(conflict-review-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
235-
string = re.sub(r"(?<!>)(status-change-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string)
229+
string = re.sub(r"(?<!>)(RFC\s*?)0{0,3}(\d+)", "<a href=\"/doc/rfc\\2/\">\\1\\2</a>", string, flags=re.IGNORECASE)
230+
string = re.sub(r"(?<!>)(BCP\s*?)0{0,3}(\d+)", "<a href=\"/doc/bcp\\2/\">\\1\\2</a>", string, flags=re.IGNORECASE)
231+
string = re.sub(r"(?<!>)(STD\s*?)0{0,3}(\d+)", "<a href=\"/doc/std\\2/\">\\1\\2</a>", string, flags=re.IGNORECASE)
232+
string = re.sub(r"(?<!>)(FYI\s*?)0{0,3}(\d+)", "<a href=\"/doc/fyi\\2/\">\\1\\2</a>", string, flags=re.IGNORECASE)
233+
string = re.sub(r"(?<!>)(draft-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string, flags=re.IGNORECASE)
234+
string = re.sub(r"(?<!>)(conflict-review-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string, flags=re.IGNORECASE)
235+
string = re.sub(r"(?<!>)(status-change-[-0-9a-zA-Z._+]+)", "<a href=\"/doc/\\1/\">\\1</a>", string, flags=re.IGNORECASE)
236236
return mark_safe(string)
237237
urlize_ietf_docs = stringfilter(urlize_ietf_docs)
238238

ietf/ietfauth/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -789,4 +789,4 @@ def clean_key(self):
789789
messages.error(request, "Key validation failed; key not disabled")
790790
else:
791791
form = KeyDeleteForm(request.GET)
792-
return render(request, 'form.html', {'form':form, 'title':"Disable a personal API key", 'description':'', 'button':'Disable key'})
792+
return render(request, 'form.html', {'form':form, 'title':"Disable a personal API key", 'description':'', 'button':'Disable key'})

ietf/person/tests.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def test_person_profile(self):
9292
#debug.show('person.photo_name()')
9393
self.assertContains(r, person.photo_name(), status_code=200)
9494
q = PyQuery(r.content)
95-
self.assertIn("Photo of %s"%person, q("div.bio-text img.bio-photo").attr("alt"))
95+
self.assertIn("Photo of %s"%person, q("div.bio-text img").attr("alt"))
9696

9797
bio_text = q("div.bio-text").text()
9898
self.assertIsNotNone(bio_text)
9999

100-
photo_url = q("div.bio-text img.bio-photo").attr("src")
100+
photo_url = q("div.bio-text img").attr("src")
101101
r = self.client.get(photo_url)
102102
self.assertEqual(r.status_code, 200)
103103

@@ -398,5 +398,4 @@ def test_dots(self):
398398

399399

400400

401-
402-
401+

ietf/static/css/ietf.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $popover-max-width: 100%;
3838
@import "~/node_modules/bootstrap/scss/pagination";
3939
@import "~/node_modules/bootstrap/scss/badge";
4040
@import "~/node_modules/bootstrap/scss/alert";
41-
// @import "~/node_modules/bootstrap/scss/progress";
41+
@import "~/node_modules/bootstrap/scss/progress";
4242
@import "~/node_modules/bootstrap/scss/list-group";
4343
@import "~/node_modules/bootstrap/scss/close";
4444
// @import "~/node_modules/bootstrap/scss/toasts";

ietf/static/css/list.scss

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// @import "~/node_modules/bootstrap/scss/utilities";
66

77
table .sort {
8-
// white-space: nowrap;
98
cursor: pointer;
109
}
1110

@@ -14,16 +13,18 @@ table .sort:hover {
1413
color: var(--#{$variable-prefix}table-hover-color);
1514
}
1615

17-
table .sort:before {
16+
table .sort:after {
17+
white-space: nowrap;
1818
font-family: 'bootstrap-icons';
19-
content: '\f127';
19+
content: '\f283'; // chevron-expand
20+
float: right;
2021
padding-right: .25em;
2122
}
2223

23-
table .sort.asc:before {
24-
content: '\f128';
24+
table .sort.asc:after {
25+
content: '\f282'; // chevron-down
2526
}
2627

27-
table .sort.desc:before {
28-
content: '\f148';
28+
table .sort.desc:after {
29+
content: '\f286'; // chevron-up
2930
}

ietf/static/js/draft-submit.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
$(document)
2+
.ready(function () {
3+
// fill in submitter info when an author button is clicked
4+
$("form.idsubmit input[type=button].author")
5+
.on("click", function () {
6+
var name = $(this)
7+
.data("name");
8+
var email = $(this)
9+
.data("email");
10+
11+
$(this)
12+
.parents("form")
13+
.find("input[name=submitter-name]")
14+
.val(name || "");
15+
$(this)
16+
.parents("form")
17+
.find("input[name=submitter-email]")
18+
.val(email || "");
19+
});
20+
21+
$("form.idsubmit")
22+
.on("submit", function () {
23+
if (this.submittedAlready)
24+
return false;
25+
else {
26+
this.submittedAlready = true;
27+
return true;
28+
}
29+
});
30+
31+
$("form.idsubmit #add-author")
32+
.on("click", function () {
33+
// clone the last author block and make it empty
34+
var cloner = $("#cloner");
35+
var next = cloner.clone();
36+
next.find('input:not([type=hidden])')
37+
.val('');
38+
39+
// find the author number
40+
var t = next.children('h3')
41+
.text();
42+
var n = parseInt(t.replace(/\D/g, ''));
43+
44+
// change the number in attributes and text
45+
next.find('*')
46+
.each(function () {
47+
var e = this;
48+
$.each(['id', 'for', 'name', 'value'], function (i, v) {
49+
if ($(e)
50+
.attr(v)) {
51+
$(e)
52+
.attr(v, $(e)
53+
.attr(v)
54+
.replace(n - 1, n));
55+
}
56+
});
57+
});
58+
59+
t = t.replace(n, n + 1);
60+
next.children('h3')
61+
.text(t);
62+
63+
// move the cloner id to next and insert next into the DOM
64+
cloner.removeAttr('id');
65+
next.attr('id', 'cloner');
66+
next.insertAfter(cloner);
67+
68+
});
69+
});

ietf/static/js/list.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ $(document)
6868
$(header_row)
6969
.children("[data-sort]")
7070
.addClass("sort");
71-
$(header_row)
72-
.children("th, td")
73-
.each((i, e) => field_magic(i, e, fields));
71+
// $(header_row)
72+
// .children("th, td")
73+
// .wrapInner("<span class='tablesorter-th'></span>");
74+
// // .each((i, e) => field_magic(i, e, fields));
7475

7576
if ($(header_row)
7677
.text()

0 commit comments

Comments
 (0)