From f8c06fa5cfa95d9cd3782e9465875dcb82239b59 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 19 Apr 2022 18:16:32 +0300 Subject: [PATCH] fix: Use unique `data-sort` attributes (#3836) * fix: Use unique `data-sort` attributes So list.js properly sorts columns. * Address @rjsparks' comments --- docker/scripts/app-create-dirs.sh | 0 ietf/static/js/list.js | 7 ++++-- ietf/templates/debug.html | 10 ++++---- ietf/templates/group/review_requests.html | 24 +++++++++---------- ietf/templates/liaisons/liaison_table.html | 4 ++-- ietf/templates/meeting/requests.html | 2 +- ietf/templates/nomcom/private_index.html | 20 ++++++++-------- ietf/templates/nomcom/view_feedback.html | 8 +++---- ietf/templates/person/profile.html | 4 ++-- .../document_stats_author_affiliation.html | 6 ++--- .../document_stats_author_citations.html | 4 ++-- .../document_stats_author_continent.html | 6 ++--- .../stats/document_stats_author_country.html | 4 ++-- .../document_stats_author_documents.html | 6 ++--- .../stats/document_stats_author_hindex.html | 4 ++-- .../stats/document_stats_authors.html | 6 ++--- .../stats/document_stats_format.html | 4 ++-- .../stats/document_stats_formlang.html | 6 ++--- .../templates/stats/document_stats_pages.html | 6 ++--- .../templates/stats/document_stats_words.html | 6 ++--- .../stats/meeting_stats_continent.html | 6 ++--- .../stats/meeting_stats_overview.html | 4 ++-- ietf/templates/stats/review_stats.html | 14 +++++------ package-lock.json | 2 +- 24 files changed, 83 insertions(+), 80 deletions(-) mode change 100644 => 100755 docker/scripts/app-create-dirs.sh diff --git a/docker/scripts/app-create-dirs.sh b/docker/scripts/app-create-dirs.sh old mode 100644 new mode 100755 diff --git a/ietf/static/js/list.js b/ietf/static/js/list.js index 63e243979..ffc52d2aa 100644 --- a/ietf/static/js/list.js +++ b/ietf/static/js/list.js @@ -25,7 +25,10 @@ function replace_with_internal(table, internal_table, i) { function field_magic(i, e, fields) { if ($(e) - .attr("colspan") === undefined && (fields[i] == "num" || fields[i] == "count" || fields[i] == "id")) { + .attr("colspan") === undefined && + (fields[i] == "num" || fields[i] == "count" || + fields[i] == "percent" || fields[i] == "id" || + fields[i].endsWith("-num") || fields[i].endsWith("-date"))) { $(e) .addClass("text-end"); } @@ -276,4 +279,4 @@ $(document) $(table)[0] .dispatchEvent(new Event("tablesorter:done")); }); - }); \ No newline at end of file + }); diff --git a/ietf/templates/debug.html b/ietf/templates/debug.html index 446a2f586..3eea27c19 100644 --- a/ietf/templates/debug.html +++ b/ietf/templates/debug.html @@ -17,11 +17,11 @@ # SQL - Count + Count WHERE - View/Templ. - Time - Acc. + View/Templ. + Time + Acc. @@ -107,4 +107,4 @@ Add ietf.context_processors.sql_debug to settings.DEV_TEMPLATE_CONTEXT_PROCESSORS to turn on the SQL statement table. {% endif %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/ietf/templates/group/review_requests.html b/ietf/templates/group/review_requests.html index 7d75cf719..83a96378b 100644 --- a/ietf/templates/group/review_requests.html +++ b/ietf/templates/group/review_requests.html @@ -22,10 +22,10 @@ Request Type - Requested - Deadline + Requested + Deadline Document state - IESG Telechat + IESG Telechat @@ -71,11 +71,11 @@ Request Type - Requested - Deadline + Requested + Deadline Reviewer Document state - IESG Telechat + IESG Telechat @@ -133,13 +133,13 @@ Type - + Requested - + Deadline - + Closed @@ -188,13 +188,13 @@ Type - + Assigned - + Deadline - + Closed diff --git a/ietf/templates/liaisons/liaison_table.html b/ietf/templates/liaisons/liaison_table.html index 3fe439ef0..59b78eaa9 100644 --- a/ietf/templates/liaisons/liaison_table.html +++ b/ietf/templates/liaisons/liaison_table.html @@ -6,7 +6,7 @@ Date From To - Deadline + Deadline Title @@ -36,4 +36,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/meeting/requests.html b/ietf/templates/meeting/requests.html index 86b8c26f9..c2cbcc256 100644 --- a/ietf/templates/meeting/requests.html +++ b/ietf/templates/meeting/requests.html @@ -30,7 +30,7 @@ Group - Length + Length Size Requester AD diff --git a/ietf/templates/nomcom/private_index.html b/ietf/templates/nomcom/private_index.html index f509872b8..831ea5e91 100644 --- a/ietf/templates/nomcom/private_index.html +++ b/ietf/templates/nomcom/private_index.html @@ -13,15 +13,15 @@ Position Open - Accepting nominations - Accepting feedback - Nominations - Unique nominees - Accepted - Declined - Pending - Questionnaire responses - Comments + Accepting nominations + Accepting feedback + Nominations + Unique nominees + Accepted + Declined + Pending + Questionnaire responses + Comments {% if stats %} @@ -246,4 +246,4 @@ {% endblock %} {% block js %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/ietf/templates/nomcom/view_feedback.html b/ietf/templates/nomcom/view_feedback.html index 3957b7c12..925d281f7 100644 --- a/ietf/templates/nomcom/view_feedback.html +++ b/ietf/templates/nomcom/view_feedback.html @@ -24,7 +24,7 @@ First name Last name Email - {% for ft in nominee_feedback_types %}{{ ft.name }}{% endfor %} + {% for ft in nominee_feedback_types %}{{ ft.name }}{% endfor %} @@ -61,7 +61,7 @@ Topic - {% for ft in topic_feedback_types %}{{ ft.name }}{% endfor %} + {% for ft in topic_feedback_types %}{{ ft.name }}{% endfor %} @@ -88,7 +88,7 @@ - {% for ft in independent_feedback_types %}{{ ft.name }}{% endfor %} + {% for ft in independent_feedback_types %}{{ ft.name }}{% endfor %} @@ -104,4 +104,4 @@ {% endblock %} {% block js %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/ietf/templates/person/profile.html b/ietf/templates/person/profile.html index e17a2a5e7..e13f66ce2 100644 --- a/ietf/templates/person/profile.html +++ b/ietf/templates/person/profile.html @@ -85,7 +85,7 @@ RFC Date Title - Cited by + Cited by {% for doc in person.rfcs %} @@ -172,4 +172,4 @@ }); }); -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/ietf/templates/stats/document_stats_author_affiliation.html b/ietf/templates/stats/document_stats_author_affiliation.html index e94fda89f..aecdb0ba3 100644 --- a/ietf/templates/stats/document_stats_author_affiliation.html +++ b/ietf/templates/stats/document_stats_author_affiliation.html @@ -45,8 +45,8 @@ Affiliation - Percentage of authors - Authors + Percentage of authors + Authors {% if table_data %} @@ -110,4 +110,4 @@

Show generated aliases

-{% endif %} \ No newline at end of file +{% endif %} diff --git a/ietf/templates/stats/document_stats_author_citations.html b/ietf/templates/stats/document_stats_author_citations.html index 4bf1fdf2f..ae89335fa 100644 --- a/ietf/templates/stats/document_stats_author_citations.html +++ b/ietf/templates/stats/document_stats_author_citations.html @@ -52,7 +52,7 @@ Citations - Percentage of authors + Percentage of authors Authors @@ -69,4 +69,4 @@ {% endif %} -

Note that the citation counts do not exclude self-references.

\ No newline at end of file +

Note that the citation counts do not exclude self-references.

diff --git a/ietf/templates/stats/document_stats_author_continent.html b/ietf/templates/stats/document_stats_author_continent.html index 852b9afa8..805d61dab 100644 --- a/ietf/templates/stats/document_stats_author_continent.html +++ b/ietf/templates/stats/document_stats_author_continent.html @@ -45,8 +45,8 @@ Continent - Percentage of authors - Authors + Percentage of authors + Authors {% if table_data %} @@ -66,4 +66,4 @@ with each draft. Since this varies across documents, a traveling author may be counted in more than country, making the total sum more than 100%. -

\ No newline at end of file +

diff --git a/ietf/templates/stats/document_stats_author_country.html b/ietf/templates/stats/document_stats_author_country.html index 726e70a74..724ed74bd 100644 --- a/ietf/templates/stats/document_stats_author_country.html +++ b/ietf/templates/stats/document_stats_author_country.html @@ -45,7 +45,7 @@ Country - Percentage of authors + Percentage of authors Authors @@ -133,4 +133,4 @@

Show generated aliases

-{% endif %} \ No newline at end of file +{% endif %} diff --git a/ietf/templates/stats/document_stats_author_documents.html b/ietf/templates/stats/document_stats_author_documents.html index 0540f09f3..28e33e673 100644 --- a/ietf/templates/stats/document_stats_author_documents.html +++ b/ietf/templates/stats/document_stats_author_documents.html @@ -51,8 +51,8 @@ Documents - Percentage of authors - Authors + Percentage of authors + Authors {% if table_data %} @@ -66,4 +66,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/document_stats_author_hindex.html b/ietf/templates/stats/document_stats_author_hindex.html index b2e03682c..ab3215d35 100644 --- a/ietf/templates/stats/document_stats_author_hindex.html +++ b/ietf/templates/stats/document_stats_author_hindex.html @@ -50,7 +50,7 @@ h-index - Percentage of authors + Percentage of authors Authors @@ -80,4 +80,4 @@

Note that the h-index calculations do not exclude self-references. -

\ No newline at end of file +

diff --git a/ietf/templates/stats/document_stats_authors.html b/ietf/templates/stats/document_stats_authors.html index 19bb49507..5c1bbbdf4 100644 --- a/ietf/templates/stats/document_stats_authors.html +++ b/ietf/templates/stats/document_stats_authors.html @@ -50,8 +50,8 @@ Authors - Percentage of {{ doc_label }}s - {{ doc_label|capfirst }}s + Percentage of {{ doc_label }}s + {{ doc_label|capfirst }}s {% if table_data %} @@ -65,4 +65,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/document_stats_format.html b/ietf/templates/stats/document_stats_format.html index b6578ffd8..ba73f1e41 100644 --- a/ietf/templates/stats/document_stats_format.html +++ b/ietf/templates/stats/document_stats_format.html @@ -46,7 +46,7 @@ Format - Percentage of {{ doc_label }}s + Percentage of {{ doc_label }}s {{ doc_label|capfirst }}s @@ -61,4 +61,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/document_stats_formlang.html b/ietf/templates/stats/document_stats_formlang.html index 33b9a3174..07da7ce17 100644 --- a/ietf/templates/stats/document_stats_formlang.html +++ b/ietf/templates/stats/document_stats_formlang.html @@ -46,8 +46,8 @@ Formal language - Percentage of {{ doc_label }}s - {{ doc_label|capfirst }}s + Percentage of {{ doc_label }}s + {{ doc_label|capfirst }}s {% if table_data %} @@ -61,4 +61,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/document_stats_pages.html b/ietf/templates/stats/document_stats_pages.html index e74fab937..73231b0e9 100644 --- a/ietf/templates/stats/document_stats_pages.html +++ b/ietf/templates/stats/document_stats_pages.html @@ -44,8 +44,8 @@ Pages - Percentage of {{ doc_label }}s - {{ doc_label|capfirst }}s + Percentage of {{ doc_label }}s + {{ doc_label|capfirst }}s {% if table_data %} @@ -59,4 +59,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/document_stats_words.html b/ietf/templates/stats/document_stats_words.html index ec992f1e9..4e8c15e93 100644 --- a/ietf/templates/stats/document_stats_words.html +++ b/ietf/templates/stats/document_stats_words.html @@ -44,8 +44,8 @@ Words - Percentage of {{ doc_label }}s - {{ doc_label|capfirst }}s + Percentage of {{ doc_label }}s + {{ doc_label|capfirst }}s {% if table_data %} @@ -59,4 +59,4 @@ {% endfor %} {% endif %} - \ No newline at end of file + diff --git a/ietf/templates/stats/meeting_stats_continent.html b/ietf/templates/stats/meeting_stats_continent.html index 43f20c15f..42ca03a40 100644 --- a/ietf/templates/stats/meeting_stats_continent.html +++ b/ietf/templates/stats/meeting_stats_continent.html @@ -45,8 +45,8 @@ Continent - Percentage of attendees - Attendees + Percentage of attendees + Attendees @@ -58,4 +58,4 @@ {% endfor %} - \ No newline at end of file + diff --git a/ietf/templates/stats/meeting_stats_overview.html b/ietf/templates/stats/meeting_stats_overview.html index 9a3b5dc6a..1136e458b 100644 --- a/ietf/templates/stats/meeting_stats_overview.html +++ b/ietf/templates/stats/meeting_stats_overview.html @@ -128,7 +128,7 @@ City Country Continent - Attendees + Attendees @@ -157,4 +157,4 @@ {% endfor %} -{% endif %} \ No newline at end of file +{% endif %} diff --git a/ietf/templates/stats/review_stats.html b/ietf/templates/stats/review_stats.html index 41564ead7..dce6544d5 100644 --- a/ietf/templates/stats/review_stats.html +++ b/ietf/templates/stats/review_stats.html @@ -150,19 +150,19 @@ Reviewer {% endif %} - Open in time - Open late - Completed in time - Completed late - Not completed @@ -211,7 +211,7 @@ {% endif %} {% for r in results %} - + {{ r.name }} {% endfor %} @@ -248,7 +248,7 @@ {% endif %} {% for s in states %} - + {{ s.name }} {% endfor %} diff --git a/package-lock.json b/package-lock.json index 30894d5ce..153fc15ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "datatracker", + "name": "workspace", "lockfileVersion": 2, "requires": true, "packages": {