diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2018-11-18 22:36:19 +0100 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2018-11-18 22:49:25 +0100 |
commit | afff4eea77a64f53a9bd1138b2724a431a0ea457 (patch) | |
tree | d94841782ddd7ef65324617eadd08a8eda22887f | |
parent | b3d91263c75521ff3359179bda414418b6b88bdb (diff) | |
download | archweb-afff4eea77a64f53a9bd1138b2724a431a0ea457.tar.gz archweb-afff4eea77a64f53a9bd1138b2724a431a0ea457.zip |
differences: remove leftover JavaScript from 373a426cb
In 373a426cb we removed the i686/x64_64 differences report and forgot to
remove the used JavaScript functions.
-rw-r--r-- | sitestatic/archweb.js | 55 | ||||
-rw-r--r-- | templates/packages/differences.html | 8 |
2 files changed, 0 insertions, 63 deletions
diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 4798b71b..ffdd30e6 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -264,61 +264,6 @@ function collapseRelatedTo(elements) { }); } -/* packages/differences.html */ -function filter_packages() { - /* start with all rows, and then remove ones we shouldn't show */ - var rows = $('#tbody_differences').children(), - all_rows = rows; - if (!$('#id_multilib').is(':checked')) { - rows = rows.not('.multilib').not('.multilib-testing'); - } - var arch = $('#id_archonly').val(); - if (arch !== 'all') { - rows = rows.filter('.' + arch); - } - if (!$('#id_minor').is(':checked')) { - /* this check is done last because it is the most expensive */ - var pat = /(.*)-(.+)/; - rows = rows.filter(function(index) { - var cells = $(this).children('td'); - - /* all this just to get the split version out of the table cell */ - var ver_a = cells.eq(2).text().match(pat); - if (!ver_a) { - return true; - } - - var ver_b = cells.eq(3).text().match(pat); - if (!ver_b) { - return true; - } - - /* first check pkgver */ - if (ver_a[1] !== ver_b[1]) { - return true; - } - /* pkgver matched, so see if rounded pkgrel matches */ - if (Math.floor(parseFloat(ver_a[2])) === - Math.floor(parseFloat(ver_b[2]))) { - return false; - } - /* pkgrel didn't match, so keep the row */ - return true; - }); - } - /* hide all rows, then show the set we care about */ - all_rows.hide(); - rows.show(); - /* make sure we update the odd/even styling from sorting */ - $('.results').trigger('applyWidgets', [false]); -} -function filter_packages_reset() { - $('#id_archonly').val('both'); - $('#id_multilib').prop('checked', false); - $('#id_minor').prop('checked', false); - filter_packages(); -} - /* todolists/view.html */ function todolist_flag() { // TODO: fix usage of this diff --git a/templates/packages/differences.html b/templates/packages/differences.html index ac046897..30750798 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -44,15 +44,7 @@ <script type="text/javascript" src="{% static "archweb.js" %}"></script> <script type="text/javascript"> $(document).ready(function() { - $('#table_differences').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]}); $('#table_multilib_differences').tablesorter({widgets: ['zebra'], sortList: [[5, 0]]}); }); -$(document).ready(function() { - $('#diff_filter select').change(filter_packages); - $('#diff_filter input').change(filter_packages); - $('#criteria_reset').click(filter_packages_reset); - // fire function on page load to ensure the current form selections take effect - filter_packages(); -}); </script> {% endblock %} |