From: mathieu Date: Thu, 19 May 2016 08:58:13 +0000 (+0200) Subject: Fix autocomplete location + move scripts from mediaitem_list.html to mediaitem_list.js X-Git-Tag: 1.6.2^2~15^2~1^2~2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=223dc1698f559cc43112aef4547c02b5b5f6cfb0;p=telemeta.git Fix autocomplete location + move scripts from mediaitem_list.html to mediaitem_list.js --- diff --git a/telemeta/static/telemeta/js/mediaitem_list.js b/telemeta/static/telemeta/js/mediaitem_list.js new file mode 100644 index 00000000..62e1357e --- /dev/null +++ b/telemeta/static/telemeta/js/mediaitem_list.js @@ -0,0 +1,25 @@ +/** + * Created by crem on 19/05/16. + */ +$(function () { + $("#results-per-page").selectmenu({ + icons: {button: "ui-icon-carat-2-n-s"}, + change: function () { + location.search = '?page=1&results_page=' + $(this).val(); + } + }).selectmenu("menuWidget").addClass("overflow"); + + $("#selectAll").click(function () { + if (this.checked) { + $(".check1").each(function () { + this.checked = true; + }); + } + else { + $(".check1").each(function () { + this.checked = false; + }); + } + }); + +}); \ No newline at end of file diff --git a/telemeta/templates/search/indexes/telemeta/location_text.txt b/telemeta/templates/search/indexes/telemeta/location_text.txt index 28701c17..038e4c54 100644 --- a/telemeta/templates/search/indexes/telemeta/location_text.txt +++ b/telemeta/templates/search/indexes/telemeta/location_text.txt @@ -1 +1 @@ -{{ object.name }} \ No newline at end of file +{{ object.name|safe }} \ No newline at end of file diff --git a/telemeta/templates/search/indexes/telemeta/locationalias_text.txt b/telemeta/templates/search/indexes/telemeta/locationalias_text.txt index fb2c54be..d6270a96 100644 --- a/telemeta/templates/search/indexes/telemeta/locationalias_text.txt +++ b/telemeta/templates/search/indexes/telemeta/locationalias_text.txt @@ -1 +1 @@ -{{ object.alias }} \ No newline at end of file +{{ object.alias|safe }} \ No newline at end of file diff --git a/telemeta/templates/telemeta/mediaitem_list.html b/telemeta/templates/telemeta/mediaitem_list.html index 4afb0806..8490662a 100644 --- a/telemeta/templates/telemeta/mediaitem_list.html +++ b/telemeta/templates/telemeta/mediaitem_list.html @@ -71,32 +71,6 @@ {% block extra_javascript %} - - + {% endblock %} \ No newline at end of file