diff options
author | prashantsinalkar | 2017-09-21 15:59:32 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-09-21 15:59:32 +0530 |
commit | e168d3e17d351a298fcf57f3b8eb37a81a1c5cbc (patch) | |
tree | fa468f44c4921675ac8ec999487adb3a4e3dc0aa /website/static/admin/js/prepopulate_init.js | |
parent | ba323eb4bc51e64840692061829c8ff1fc494c6a (diff) | |
download | SciPy2017-e168d3e17d351a298fcf57f3b8eb37a81a1c5cbc.tar.gz SciPy2017-e168d3e17d351a298fcf57f3b8eb37a81a1c5cbc.tar.bz2 SciPy2017-e168d3e17d351a298fcf57f3b8eb37a81a1c5cbc.zip |
added admin templates
Diffstat (limited to 'website/static/admin/js/prepopulate_init.js')
-rw-r--r-- | website/static/admin/js/prepopulate_init.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/website/static/admin/js/prepopulate_init.js b/website/static/admin/js/prepopulate_init.js new file mode 100644 index 0000000..184df92 --- /dev/null +++ b/website/static/admin/js/prepopulate_init.js @@ -0,0 +1,10 @@ +(function($) { + 'use strict'; + var fields = $('#django-admin-prepopulated-fields-constants').data('prepopulatedFields'); + $.each(fields, function(index, field) { + $('.empty-form .form-row .field-' + field.name + ', .empty-form.form-row .field-' + field.name).addClass('prepopulated_field'); + $(field.id).data('dependency_list', field.dependency_list).prepopulate( + field.dependency_ids, field.maxLength, field.allowUnicode + ); + }); +})(django.jQuery); |