Skip to content

Commit b90208e

Browse files
committed
Disable the URL-based sorting stuff that uses the django backend if we use
js-based sorting. - Legacy-Id: 10615
1 parent e920d0b commit b90208e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

ietf/static/ietf/js/ietf.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,22 +243,26 @@ $(document).ready(function () {
243243
});
244244
});
245245

246-
$(function() {
247-
// customize the styling a bit; more is done in ietf.css
246+
$(document).ready(function () {
247+
// if there is a sortable table on the page
248248
if ($(".tablesorter").length) {
249+
// customize the styling a bit; more is done in ietf.css
249250
$.tablesorter.themes.bootstrap = {
250251
table: "",
251252
iconSortNone: "bootstrap-icon-unsorted",
252253
iconSortAsc: "glyphicon glyphicon-chevron-up",
253254
iconSortDesc: "glyphicon glyphicon-chevron-down",
254255
hover: "active"
255256
};
257+
// disable the URL-based sorting stuff that uses the django backend
258+
$(".tablesorter thead a").contents().unwrap();
259+
// make the table sortable
256260
$(".tablesorter").tablesorter({
257261
emptyTo: "zero",
258262
theme: "bootstrap",
259263
table: "",
260264
headerTemplate: "{content} {icon}",
261-
widgets: ["uitheme", "sort2Hash"]
265+
widgets: ["uitheme"]
262266
});
263267
}
264268
});

0 commit comments

Comments
 (0)