X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/69d9738d6855e38869678a54991d30e5cddb8e67..e977f7187b10b1bc0a30794cd585c6b840568996:/src/redakcja/static/js/documents/documents.js diff --git a/src/redakcja/static/js/documents/documents.js b/src/redakcja/static/js/documents/documents.js new file mode 100644 index 00000000..9d2bd958 --- /dev/null +++ b/src/redakcja/static/js/documents/documents.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); +