diff --git a/ietf/static/js/ietf.js b/ietf/static/js/ietf.js index a78cca2a2..7e3f3df27 100644 --- a/ietf/static/js/ietf.js +++ b/ietf/static/js/ietf.js @@ -108,7 +108,6 @@ $(document) // Automatically add a navigation pane to long pages $(document) .ready(function () { - var headings = $("#content") .find("h1, h2, h3, h4, h5, h6"); @@ -123,11 +122,6 @@ $(document) var last_level; var nav; - $("body") - .attr("data-bs-spy", "scroll") - .attr("data-bs-target", "#righthand-nav") - .scrollspy("refresh"); - $("#content") .attr("data-bs-offset", 0) .attr("tabindex", 0) @@ -185,5 +179,52 @@ $(document) item[0].scrollIntoView({ block: "center" }); } }); + + $("body") + .attr("data-bs-spy", "scroll") + .attr("data-bs-target", "#righthand-nav") + .scrollspy("refresh"); + + $(window) + .on("activate.bs.scrollspy", function () { + console.log("X"); + }); } + }); + +// Replace track/untrack functionality with js. +$(document) + .ready(function () { + $('.review-wish-add-remove-doc.ajax, .track-untrack-doc') + .click(function (e) { + e.preventDefault(); + var trigger = $(this); + $.ajax({ + url: trigger.attr('href'), + type: 'POST', + cache: false, + dataType: 'json', + success: function (response) { + if (response.success) { + trigger.parent() + .find(".track-untrack-doc") + .tooltip("hide"); + trigger.addClass("visually-hidden"); + + var target_unhide = null; + if (trigger.hasClass('review-wish-add-remove-doc')) { + target_unhide = '.review-wish-add-remove-doc'; + } else if (trigger.hasClass('track-untrack-doc')) { + target_unhide = '.track-untrack-doc'; + } + if (target_unhide) { + trigger.parent() + .find(target_unhide) + .not(trigger) + .removeClass("visually-hidden"); + } + } + } + }); + }); }); \ No newline at end of file diff --git a/ietf/static/js/manage-community-list.js b/ietf/static/js/manage-community-list.js new file mode 100644 index 000000000..34cca4861 --- /dev/null +++ b/ietf/static/js/manage-community-list.js @@ -0,0 +1,36 @@ +$(document) + .ready(function () { + $("[name=rule_type]") + .on("click change keypress", function () { + var form = $(this) + .closest("form"); + var ruleType = $(this) + .val(); + var emptyForms = $(".empty-forms"); + + var currentFormContent = form.find(".form-content-placeholder .rule-type"); + if (!ruleType || !currentFormContent.hasClass(ruleType)) { + // move previous back into the collection + if (currentFormContent.length > 0) + emptyForms.append(currentFormContent); + else + currentFormContent.html(""); // make sure it's empty + + // insert new + if (ruleType) + form.find(".form-content-placeholder") + .append(emptyForms.find("." + ruleType)); + } + }); + + $("[name=rule_type]") + .each(function () { + // don't trigger the handler if we have a form with errors + var placeholderContent = $(this) + .closest("form") + .find(".form-content-placeholder >"); + if (placeholderContent.length == 0 || placeholderContent.hasClass("rule-type")) + $(this) + .trigger("change"); + }); + }); \ No newline at end of file diff --git a/ietf/templates/api/openid-issuer.html b/ietf/templates/api/openid-issuer.html index 3f844ee1a..2c1b09937 100644 --- a/ietf/templates/api/openid-issuer.html +++ b/ietf/templates/api/openid-issuer.html @@ -1,17 +1,14 @@ +{# bs5ok #} {# Copyright The IETF Trust 2007, All Rights Reserved #} {% extends "base.html" %} {% block title %}OpenID Connect Issuer{% endblock %} - {% block content %} - -
This is the IETF Datatracker's OpenID Connect Issuer endpoint.
The OpenID Connect provider info is at
- {% url 'oidc_provider:provider-info' %}"
+ {% url 'oidc_provider:provider-info' %}
The list currently tracks {{ total_count }} document{{ total_count|pluralize }}.
- - - ++ The list currently tracks + {{ total_count }} document{{ total_count|pluralize }} + . +
++ Back to list +
The list tracks {{ individually_added|length }} individually added document{{ individually_added|length|pluralize }}:
-Document | +Manage | + {% for d in individually_added %}
---|---|
{{ d.name }} | - |
The list does not track any individually added documents yet.
++ The list does not track any individually added documents yet. +
{% endif %} - {% if clist.group %} -Add individual documents here:
++ Add individual documents here: +
{% else %} -Conveniently track individual documents in your personal list with the track icon in search results.
- -You can also add documents here:
++ Conveniently track individual documents in your personal list with the track icon + + in + search results + . +
++ You can also add documents here: +
{% endif %} - - -You can track documents with a search rule. When a document fulfills the search criteria, it will automatically show up in the list.
- ++ You can track documents with a search rule. When a document fulfills the search criteria, it will automatically show up in the list. +
{% if rules %} -Rule | Value | Documents | |
---|---|---|---|
Rule | +Value | +Matching Documents | +Manage | +{{ rule.matching_documents_count }} match{{ rule.matching_documents_count|pluralize:"es" }} | +{{ rule.matching_documents_count }} |
No rules defined.
- ++ No rules defined. +
{% endif %} - - - -Draft name | -IESG state | -RFC Editor state | -IANA Action state | +Draft name | +IESG state | +RFC Editor state | +IANA Action state |
---|---|---|---|---|---|---|---|
{{ d.name }} | ++ {{ d.name }} + | {{ d.iesg_state|default:"" }} | {{ d.rfc_state|default:"" }} | {{ d.iana_action_state|default:"" }} | @@ -37,12 +35,12 @@
(None)
++ (None) +
{% endif %} - {% endfor %} {% endblock %} - {% block js %} -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ietf/templates/sync/notify.html b/ietf/templates/sync/notify.html index d7e388f60..788a8ef75 100644 --- a/ietf/templates/sync/notify.html +++ b/ietf/templates/sync/notify.html @@ -1,17 +1,18 @@ +{# bs5ok #} {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - {% block title %}Trigger {{ notification }} sync for {{ org }}{% endblock %} - {% block content %} {% origin %}Update the Datatracker with {{ help_text|safe }} at {{ org }}.
- ++ Update the Datatracker with {{ help_text|safe }} at {{ org }}. +
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ietf/templates/sync/rfceditor_undo.html b/ietf/templates/sync/rfceditor_undo.html index 25eef5f62..c83e70c8c 100644 --- a/ietf/templates/sync/rfceditor_undo.html +++ b/ietf/templates/sync/rfceditor_undo.html @@ -1,28 +1,32 @@ +{# bs5ok #} {% extends "base.html" %} {# Copyright The IETF Trust 2015-2019, All Rights Reserved #} -{% load origin %} - +{% load origin static %} {% block title %}Undo RFC Editor state events{% endblock %} +{% block pagehead %} + +{% endblock %} + {% block content %} {% origin %}Time | -Document | -Text | -Undo | +Time | +Document | +Text | +Undo |
---|---|---|---|---|---|---|---|
{{ e.time|date:"Y-m-d H:i:s"}} | -{{ e.doc.name }} | +{{ e.time|date:"Y-m-d H:i:s" }} | ++ {{ e.doc.name }} + | {{ e.desc|safe }} |