X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/ce8d791a5298e0cb2569034aec4c8b57afac97b2..c4599df2f08c95fd317967746a3325c3b168acdd:/redakcja/static/js/catalogue/catalogue.js diff --git a/redakcja/static/js/catalogue/catalogue.js b/redakcja/static/js/catalogue/catalogue.js index e8ef5e95..9d2bd958 100755 --- a/redakcja/static/js/catalogue/catalogue.js +++ b/redakcja/static/js/catalogue/catalogue.js @@ -2,28 +2,31 @@ $(function() { - $(function() { - $('.filter').change(function() { - document.filter[this.name].value = this.value; - document.filter.submit(); - }); + $('.filter').change(function() { + document.filter[this.name].value = this.value; + document.filter.submit(); + }); + + $('.check-filter').change(function() { + document.filter[this.name].value = this.checked ? '1' : ''; + document.filter.submit(); + }); - $('.check-filter').change(function() { - document.filter[this.name].value = this.checked ? '1' : ''; + $('.text-filter').each(function() { + var inp = this; + $(inp).parent().submit(function() { + document.filter[inp.name].value = inp.value; document.filter.submit(); + return false; }); + }); - $('.text-filter').each(function() { - var inp = this; - $(inp).parent().submit(function() { - document.filter[inp.name].value = inp.value; - document.filter.submit(); - return false; - }); - }); + + $('.autoslug-source').change(function() { + $('.autoslug').attr('value', slugify(this.value)); }); }); -})(jQuery) +})(jQuery);