X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8132fc186eb0c5fd02c86828c3a4735754296d02..5913c54d19b8f6775633176032161d49f9b2f1aa:/src/redakcja/static/js/catalogue/catalogue.js diff --git a/src/redakcja/static/js/catalogue/catalogue.js b/src/redakcja/static/js/catalogue/catalogue.js new file mode 100755 index 00000000..9d2bd958 --- /dev/null +++ b/src/redakcja/static/js/catalogue/catalogue.js @@ -0,0 +1,32 @@ +(function($) { + $(function() { + + + $('.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(); + }); + + $('.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); +