fix: Enable js functionality on sortable tables (#6301)
Fixes #6263 Also fix the non-js "untrack_document" page while I'm here.
This commit is contained in:
parent
5d00e7226b
commit
d3d2f0d35f
|
@ -20,7 +20,7 @@ function replace_with_internal(table, internal_table, i) {
|
||||||
.replaceWith(internal_table[i]
|
.replaceWith(internal_table[i]
|
||||||
.children("table")
|
.children("table")
|
||||||
.children("tbody")
|
.children("tbody")
|
||||||
.clone());
|
.clone(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
function field_magic(i, e, fields) {
|
function field_magic(i, e, fields) {
|
||||||
|
@ -160,10 +160,10 @@ $(document)
|
||||||
// create the internal table and add list.js to them
|
// create the internal table and add list.js to them
|
||||||
var thead = $(this)
|
var thead = $(this)
|
||||||
.siblings("thead:first")
|
.siblings("thead:first")
|
||||||
.clone();
|
.clone(true);
|
||||||
|
|
||||||
var tbody = $(this)
|
var tbody = $(this)
|
||||||
.clone();
|
.clone(true);
|
||||||
|
|
||||||
var tbody_rows = $(tbody)
|
var tbody_rows = $(tbody)
|
||||||
.find("tr")
|
.find("tr")
|
||||||
|
@ -178,7 +178,7 @@ $(document)
|
||||||
|
|
||||||
var parent = $(table)
|
var parent = $(table)
|
||||||
.parent()
|
.parent()
|
||||||
.clone();
|
.clone(true);
|
||||||
|
|
||||||
$(parent)
|
$(parent)
|
||||||
.children("table")
|
.children("table")
|
||||||
|
@ -251,6 +251,7 @@ $(document)
|
||||||
$.each(list_instance, (i, e) => {
|
$.each(list_instance, (i, e) => {
|
||||||
e.on("sortComplete", function () {
|
e.on("sortComplete", function () {
|
||||||
replace_with_internal(table, internal_table, i);
|
replace_with_internal(table, internal_table, i);
|
||||||
|
$(table).find("[data-bs-original-title]").tooltip();
|
||||||
if (i == list_instance.length - 1) {
|
if (i == list_instance.length - 1) {
|
||||||
$(table)
|
$(table)
|
||||||
.find("thead:first tr")
|
.find("thead:first tr")
|
||||||
|
|
|
@ -1,17 +1,14 @@
|
||||||
{# Copyright The IETF Trust 2015, All Rights Reserved #}
|
{# Copyright The IETF Trust 2015, All Rights Reserved #}
|
||||||
|
{% extends "base.html" %}
|
||||||
{% load origin %}
|
{% load origin %}
|
||||||
{% origin %}
|
{% origin %}
|
||||||
{% load django_bootstrap5 %}
|
|
||||||
{% block title %}Remove tracking of document {{ name }}{% endblock %}
|
{% block title %}Remove tracking of document {{ name }}{% endblock %}
|
||||||
{% bootstrap_messages %}
|
{% block content %}
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<p>
|
<p>
|
||||||
Remove {{ name }} from the list?
|
Remove {{ name }} from the list?
|
||||||
</p>
|
</p>
|
||||||
<button type="submit"
|
<button type="submit" class="btn btn-primary" value="Remove tracking of document">Remove tracking of document</button>
|
||||||
class="btn btn-primary"
|
</form>
|
||||||
value="Remove tracking of document">
|
{% endblock %}
|
||||||
Remove tracking of document
|
|
||||||
</button>
|
|
||||||
</form>
|
|
Loading…
Reference in a new issue