web/static/admin/js/prepopulate.min.js
author ymh <ymh.work@gmail.com>
Fri, 06 May 2011 02:01:24 +0200
changeset 100 6015c3c7eee9
parent 0 bdf22b140727
permissions -rw-r--r--
Added tag V00.11 for changeset 483a30ff6e15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
(function(b){b.fn.prepopulate=function(d,f){return this.each(function(){var a=b(this);a.data("_changed",false);a.change(function(){a.data("_changed",true)});var c=function(){if(a.data("_changed")!=true){var e=[];d.each(function(){b(this).val().length>0&&e.push(b(this).val())});a.val(URLify(e.join(" "),f))}};d.keyup(c).change(c).focus(c)})}})(django.jQuery);