mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Refs #31483 -- Removed CSS and JavaScript for unused HTML class add-another.
The HTML class was removed in 07988744b3
.
As such, the CSS and JavaScript is unused.
This commit is contained in:
parent
d15d824deb
commit
a8bb53dbd2
@ -501,7 +501,7 @@ body.popup .submit-row {
|
||||
|
||||
/* RELATED FIELD ADD ONE / LOOKUP */
|
||||
|
||||
.add-another, .related-lookup {
|
||||
.related-lookup {
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
@ -509,12 +509,6 @@ body.popup .submit-row {
|
||||
background-size: 14px;
|
||||
}
|
||||
|
||||
.add-another {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-image: url(../img/icon-addlink.svg);
|
||||
}
|
||||
|
||||
.related-lookup {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
@ -226,7 +226,6 @@ input[type="submit"], button {
|
||||
padding-top: 6px;
|
||||
}
|
||||
|
||||
.aligned .add-another,
|
||||
.aligned .related-lookup,
|
||||
.aligned .datetimeshortcuts,
|
||||
.aligned .related-lookup + strong {
|
||||
|
@ -71,7 +71,6 @@
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[dir="rtl"] .aligned .add-another,
|
||||
[dir="rtl"] .aligned .related-lookup,
|
||||
[dir="rtl"] .aligned .datetimeshortcuts {
|
||||
margin-left: 0;
|
||||
|
@ -1,18 +1,7 @@
|
||||
/*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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user