Skip to content

Commit edf3242

Browse files
committed
More fixes.
- Legacy-Id: 19836
1 parent a5cbf53 commit edf3242

31 files changed

Lines changed: 447 additions & 355 deletions

ietf/doc/tests.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def test_docs_for_ad(self):
250250
r = self.client.get(urlreverse('ietf.doc.views_search.docs_for_ad', kwargs=dict(name=ad.full_name_as_key())))
251251
self.assertEqual(r.status_code, 200)
252252
self.assertContains(r, draft.name)
253-
self.assertContains(r, escape(draft.action_holders.first().plain_name()))
253+
self.assertContains(r, escape(draft.action_holders.first().name))
254254
self.assertContains(r, rfc.canonical_name())
255255
self.assertContains(r, conflrev.name)
256256
self.assertContains(r, statchg.name)
@@ -1237,19 +1237,19 @@ def test_edit_authors_edit_fields(self):
12371237
def _pyquery_select_action_holder_string(q, s):
12381238
"""Helper to use PyQuery to find an action holder in the draft HTML"""
12391239
# selector grabs the action holders heading and finds siblings with a div containing the search string
1240-
return q('th:contains("Action Holders") ~ td>div:contains("%s")' % s)
1240+
return q('th:contains("Action Holder") ~ td>div:contains("%s")' % s)
12411241

12421242
@mock.patch.object(Document, 'action_holders_enabled', return_value=False, new_callable=mock.PropertyMock)
12431243
def test_document_draft_hides_action_holders(self, mock_method):
12441244
"""Draft should not show action holders when appropriate"""
12451245
draft = WgDraftFactory()
12461246
url = urlreverse("ietf.doc.views_doc.document_main", kwargs=dict(name=draft.name))
12471247
r = self.client.get(url)
1248-
self.assertNotContains(r, 'Action Holders') # should not show action holders...
1248+
self.assertNotContains(r, 'Action Holder') # should not show action holders...
12491249

12501250
draft.action_holders.set([PersonFactory()])
12511251
r = self.client.get(url)
1252-
self.assertNotContains(r, 'Action Holders') # ...even if they are assigned
1252+
self.assertNotContains(r, 'Action Holder') # ...even if they are assigned
12531253

12541254
@mock.patch.object(Document, 'action_holders_enabled', return_value=True, new_callable=mock.PropertyMock)
12551255
def test_document_draft_shows_action_holders(self, mock_method):
@@ -1259,7 +1259,7 @@ def test_document_draft_shows_action_holders(self, mock_method):
12591259

12601260
# No action holders case should be shown properly
12611261
r = self.client.get(url)
1262-
self.assertContains(r, 'Action Holders') # should show action holders
1262+
self.assertContains(r, 'Action Holder') # should show action holders
12631263
q = PyQuery(r.content)
12641264
self.assertEqual(len(self._pyquery_select_action_holder_string(q, '(None)')), 1)
12651265

@@ -1274,7 +1274,7 @@ def test_document_draft_shows_action_holders(self, mock_method):
12741274
with self.settings(DOC_ACTION_HOLDER_AGE_LIMIT_DAYS=20):
12751275
r = self.client.get(url)
12761276

1277-
self.assertContains(r, 'Action Holders') # should still be shown
1277+
self.assertContains(r, 'Action Holder') # should still be shown
12781278
q = PyQuery(r.content)
12791279
self.assertEqual(len(self._pyquery_select_action_holder_string(q, '(None)')), 0)
12801280
for person in draft.action_holders.all():
@@ -1299,7 +1299,7 @@ def _run_test(username=None, expect_buttons=False):
12991299
q = PyQuery(r.content)
13001300

13011301
self.assertEqual(
1302-
len(q('th:contains("Action Holders") ~ td a[href="%s"]' % edit_ah_url)),
1302+
len(q('th:contains("Action Holder") ~ td a[href="%s"]' % edit_ah_url)),
13031303
1 if expect_buttons else 0,
13041304
'%s should%s see the edit action holders button but %s' % (
13051305
username if username else 'unauthenticated user',
@@ -1308,7 +1308,7 @@ def _run_test(username=None, expect_buttons=False):
13081308
)
13091309
)
13101310
self.assertEqual(
1311-
len(q('th:contains("Action Holders") ~ td a[href="%s"]' % remind_ah_url)),
1311+
len(q('th:contains("Action Holder") ~ td a[href="%s"]' % remind_ah_url)),
13121312
1 if expect_buttons else 0,
13131313
'%s should%s see the remind action holders button but %s' % (
13141314
username if username else 'unauthenticated user',

ietf/secr/templates/areas/people.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h2>Area Directors ({{ area.acronym }})</h2>
2323
<form action="modify/" method="post">{% csrf_token %}
2424
<input type="hidden" name="tag" value="{{ director.person.id }}" />
2525
<tr>
26-
<td id="id-ad-name"><a href="">{{ director.person.name }}</a></td>
26+
<td id="id-ad-name"><a href="#">{{ director.person.name }}</a></td>
2727
<td>{% if director.name.slug == "ad" %}
2828
Voting Enabled
2929
{% else %}
@@ -56,4 +56,4 @@ <h3><b>Add new Director</b></h3>
5656
</div> <!-- button-group -->
5757
</div> <!-- module -->
5858

59-
{% endblock %}
59+
{% endblock %}

ietf/secr/templates/roles/main.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
&raquo; Roles
3535
{% endblock %}
3636
{% block instructions %}
37-
<a href="" target="_blank">Instructions</a>
37+
<a href="#" target="_blank">Instructions</a>
3838
{% endblock %}
3939

4040
{% block content %}
@@ -84,5 +84,4 @@ <h3>Add Role</h3>
8484

8585
</div> <!-- module -->
8686

87-
{% endblock %}
88-
87+
{% endblock %}

ietf/static/css/ietf.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ $timeline-even-hover-color: shift-color($timeline-even-color, $link-shade-percen
161161
// Styles needed for the ballot table
162162

163163
.ballot-icon table td {
164-
border: $table-border-width solid $table-border-color;
164+
border: $table-border-width solid $gray-500;
165165
height: 1em;
166166
width: .8em;
167167
}

ietf/static/js/ietf.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ $(document)
116116
.shift()
117117
.trim();
118118

119-
if ($(contents)
119+
if (contents
120120
.length > 0 && $(headings)
121121
.last()
122122
.offset()
@@ -245,9 +245,18 @@ $(document)
245245
$('.modal')
246246
.on('show.bs.modal', function (e) {
247247
var button = $(e.relatedTarget);
248+
if (!$(button)
249+
.attr("href")) {
250+
return;
251+
}
252+
var loc = $(button)
253+
.attr("href")
254+
.trim();
248255
// load content from value of button href
249-
$(this)
250-
.find('.modal-content')
251-
.load(button.attr("href"));
256+
if (loc !== undefined && loc !== "#") {
257+
$(this)
258+
.find('.modal-content')
259+
.load(loc);
260+
}
252261
});
253262
});

ietf/static/js/liaisons.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ var attachmentWidget = {
6969
html += '</span>';
7070
container.hide();
7171
});
72-
//html += ' <a href="" class="removeAttach glyphicon glyphicon-remove text-danger"></a>';
73-
html += ' <a href="" class="removeAttach btn btn-default btn-xs">Delete</a>';
72+
//html += ' <a href="#" class="removeAttach glyphicon glyphicon-remove text-danger"></a>';
73+
html += ' <a href="#" class="removeAttach btn btn-default btn-xs">Delete</a>';
7474
html += '</div>';
7575
attachmentWidget.config.showOnDisplay.html(html);
7676
attachmentWidget.count += 1;

ietf/static/js/list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $(document)
4949

5050
// get field classes from first thead row
5151
var fields = $(header_row)
52-
.find("*")
52+
.find("th, td")
5353
.map(function () {
5454
return $(this)
5555
.attr("data-sort") ? $(this)

ietf/submit/checkers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def check_file_txt(self, path):
120120
class DraftYangChecker(object):
121121

122122
name = "yang validation"
123-
symbol = '<span class="large">\u262f</span>'
123+
symbol = '<i class="bi bi-yin-yang"></i>'
124124

125125
def check_file_txt(self, path):
126126
name = os.path.basename(path)
@@ -293,5 +293,4 @@ def check_file_txt(self, path):
293293
items = [ e for res in results for e in res["items"] ]
294294
info['items'] = items
295295
info['code']['yang'] = model_list
296-
return passed, message, errors, warnings, info
297-
296+
return passed, message, errors, warnings, info

ietf/templates/base.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
<a href="https://www.rfc-editor.org/" class="p-3">RFC&nbsp;Editor</a>
112112
<a href="https://www.iana.org/" class="p-3">IANA</a>
113113
<a href="https://www.ietf.org/privacy-statement/" class="p-3">Privacy&nbsp;Statement</a>
114-
<p class="small text-muted p-3">
114+
<div class="small text-muted p-3">
115115
{% if version_num %}
116116
<a href="/release/about">About</a>
117117
IETF Datatracker
@@ -134,10 +134,10 @@
134134
{% if django_version %}Django {{ django_version }}{% endif %}
135135
<br>
136136
{% include "debug.html" %}
137-
</p>
137+
</div>
138138
</footer>
139139
{% endblock %}
140140
</div>
141141
{% block js %}{% endblock %}
142142
</body>
143-
</html>
143+
</html>

ietf/templates/debug.html

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
{# Copyright The IETF Trust 2015, All Rights Reserved #}
33
{% load origin %}
44
{% load static %}
5-
{% block pagehead %}
6-
{% if debug %}
7-
<link rel="stylesheet" href="{% static 'ietf/css/list.css' %}"/>
8-
{% endif %}
9-
{% endblock %}
105
{% origin %}
116
{% if debug %}
127
{% if sql_debug %}
@@ -17,7 +12,7 @@
1712
onclick="$('#debug-query-table').toggleClass('visually-hidden');">Show</a>
1813
{% endif %}
1914
<div id="debug-query-table" class="visually-hidden">
20-
<small class="text-start">
15+
<div class="text-start">
2116
<table class="table table-sm tablesorter">
2217
<thead>
2318
<tr>
@@ -106,16 +101,11 @@ <h4 class="modal-title" id="modal-title-{{ forloop.counter }}">QuerySet Origin f
106101
{% endwith %}
107102
</tbody>
108103
</table>
109-
</small>
104+
</div>
110105
</div>
111106
{% else %}
112107
<small class='text-center text-muted'>
113108
Add <code>ietf.context_processors.sql_debug</code> to <code>settings.DEV_TEMPLATE_CONTEXT_PROCESSORS</code> to turn on the SQL statement table.
114109
</small>
115110
{% endif %}
116-
{% endif %}
117-
{% block js %}
118-
{% if debug %}
119-
<script src="{% static 'ietf/js/list.js' %}"></script>
120-
{% endif %}
121-
{% endblock %}
111+
{% endif %}

0 commit comments

Comments
 (0)