From 8f7ebb83f7f979c34a5d2a380a883376d871c0b3 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 12 Jan 2016 15:42:07 +0000 Subject: [PATCH] Merged in [10615] from lars@netapp.com: Disable the URL-based sorting stuff that uses the django backend if we use js-based sorting. - Legacy-Id: 10645 Note: SVN reference [10615] has been migrated to Git commit b90208ec6d3862a64e965c1a5a5b97ce871f3e9f --- ietf/static/ietf/js/ietf.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ietf/static/ietf/js/ietf.js b/ietf/static/ietf/js/ietf.js index 60e089904..9bd4da61a 100644 --- a/ietf/static/ietf/js/ietf.js +++ b/ietf/static/ietf/js/ietf.js @@ -243,9 +243,10 @@ $(document).ready(function () { }); }); -$(function() { - // customize the styling a bit; more is done in ietf.css +$(document).ready(function () { + // if there is a sortable table on the page if ($(".tablesorter").length) { + // customize the styling a bit; more is done in ietf.css $.tablesorter.themes.bootstrap = { table: "", iconSortNone: "bootstrap-icon-unsorted", @@ -253,12 +254,15 @@ $(function() { iconSortDesc: "glyphicon glyphicon-chevron-down", hover: "active" }; + // disable the URL-based sorting stuff that uses the django backend + $(".tablesorter thead a").contents().unwrap(); + // make the table sortable $(".tablesorter").tablesorter({ emptyTo: "zero", theme: "bootstrap", table: "", headerTemplate: "{content} {icon}", - widgets: ["uitheme", "sort2Hash"] + widgets: ["uitheme"] }); } });