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