diff --git a/archivebox/themes/admin/base.html b/archivebox/themes/admin/base.html index 36f25402..c5cb51c8 100644 --- a/archivebox/themes/admin/base.html +++ b/archivebox/themes/admin/base.html @@ -108,8 +108,8 @@ {% endif %} {% trans 'Log out' %} | - - ⣿⣿   + + ⣿⣿ {% endblock %} {% endif %} @@ -182,8 +182,27 @@ }); } }; + + function redirectWithQuery(uri){ + uri_query = uri + document.location.search; + window.location = uri_query; + + }; + + function bindSnapshotViewsClick() { + $( document ).ready(function() { + $("#snapshotListView").click(function() { + redirectWithQuery("{% url 'admin:core_snapshot_changelist' %}"); + }); + $("#snapshotGridView").click(function() { + redirectWithQuery("{% url 'admin:grid' %}"); + }); + + }); + }; $(function () { fix_actions(); + bindSnapshotViewsClick(); }); })(django.jQuery);