Bring deep-embedding (tab anchors) javascript up-to-date

[?]
Apr 8, 2021, 3:04 PM
KNLY6DMLJEPPKFAAXTPTV6LDPO6UOQ6OJE24F2TA2DA7PKM3UG4AC

Dependencies

  • [2] SWXX2O4A Update boostrap to latest 4.3.1
  • [3] TFK74CQR Put job status on a separate tab
  • [4] C3AG65SW Add one-shot jobsets
  • [5] JY7BXXOP Split viewing and editing a project
  • [6] 4NTIBJ74 Implement DELETE for jobsets and use it in the web interface
  • [7] 4QCXGR4W Tabify the eval page
  • [8] D7PL2VWU Move more actions from the top bar
  • [9] 6HWHYPSW Add an action menu to evaluations
  • [10] 6WRGCITD Enable declarative projects.
  • [11] WGUKOIQZ Fix indentation
  • [12] 2P7VNAAC Move common Javascript code into a separate file
  • [13] SS4TZXNU Distinguish between permanent evaluation errors and transient input errors
  • [14] CQQSJLON On aggregate job pages, show a matrix showing all the constituent builds
  • [15] JPTXSWBO Show whether a job still exists
  • [*] ODNCGFQ5 * Improved the navigation bar: don't include all projects (since that
  • [*] 7YBYT2LQ

Change contents

  • replacement in src/root/job.tt at line 18
    [3.27][2.727884:727988]()
    <li class="nav-item active"><a class="nav-link" href="#tabs-status" data-toggle="tab">Status</a></li>
    [3.27]
    [3.970]
    <li class="nav-item"><a class="nav-link active" href="#tabs-status" data-toggle="tab">Status</a></li>
  • replacement in src/root/jobset.tt at line 61
    [3.655][2.731475:731589]()
    <li class="nav-item active"><a class="nav-link" href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li>
    [3.655]
    [3.357]
    <li class="nav-item"><a class="nav-link active" href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li>
  • replacement in src/root/project.tt at line 18
    [3.1931][2.733572:733678]()
    <li class="nav-item active"><a class="nav-link" href="#tabs-project" data-toggle="tab">Jobsets</a></li>
    [3.1931]
    [2.733678]
    <li class="nav-item"><a class="nav-link active" href="#tabs-project" data-toggle="tab">Jobsets</a></li>
  • replacement in src/root/static/js/common.js at line 53
    [3.2005][3.2005:2060](),[3.2060][3.3265:3344](),[3.3344][3.2134:2144](),[3.2134][3.2134:2144]()
    $(function() {
    if (window.location.hash) {
    $(".nav-tabs a[href='" + window.location.hash + "']").tab('show');
    }
    [3.1682]
    [3.3345]
    /* Activates tab according to URL anchor. */
    if (window.location.hash) {
    $('.nav-tabs > .nav-item:not(.dropdown) a[href="' + window.location.hash + '"]').tab('show');
    }
  • replacement in src/root/static/js/common.js at line 58
    [3.3346][3.3346:3499](),[3.3499][3.389:468](),[3.468][3.3554:3566](),[3.3554][3.3554:3566]()
    /* If no tab is active, show the first one. */
    $(".nav-tabs").each(function() {
    if ($("li.active", this).length > 0) return;
    $("a", $(this).children("li:not(.dropdown)").first()).tab('show');
    });
    [3.3346]
    [3.3566]
    $('.nav-tabs').each(function() {
    if ($('.nav-item:not(.dropdown) a.active',this).length == 0)
    $('.nav-item:not(.dropdown) a',this).first().tab('show');
    });
  • replacement in src/root/static/js/common.js at line 63
    [3.3567][3.3567:3921]()
    /* Ensure that pressing the back button on another page
    navigates back to the previously selected tab on this
    page. */
    $('.nav-tabs').bind('show', function(e) {
    var pattern = /#.+/gi;
    var id = e.target.toString().match(pattern)[0];
    history.replaceState(null, "", id);
    });
    [3.3567]
    [3.1005]
    $('.nav-tabs > .nav-item:not(.dropdown) a[href^="#"]').on('click', function() {
    history.replaceState(null, null, window.location.href.split("#")[0] + $(this).attr("href"));