add static files
This commit is contained in:
parent
2de5a8030e
commit
70c09da9f8
336 changed files with 82322 additions and 0 deletions
20
static/admin/js/change_form.js
Normal file
20
static/admin/js/change_form.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*global showAddAnotherPopup, showRelatedObjectLookupPopup showRelatedObjectPopup updateRelatedObjectLinks*/
|
||||
|
||||
(function($) {
|
||||
'use strict';
|
||||
$(document).ready(function() {
|
||||
var modelName = $('#django-admin-form-add-constants').data('modelName');
|
||||
$('body').on('click', '.add-another', function(e) {
|
||||
e.preventDefault();
|
||||
var event = $.Event('django:add-another-related');
|
||||
$(this).trigger(event);
|
||||
if (!event.isDefaultPrevented()) {
|
||||
showAddAnotherPopup(this);
|
||||
}
|
||||
});
|
||||
|
||||
if (modelName) {
|
||||
$('form#' + modelName + '_form :input:visible:enabled:first').focus();
|
||||
}
|
||||
});
|
||||
})(django.jQuery);
|
||||
Loading…
Add table
Add a link
Reference in a new issue