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:
Jon Dufresne 2020-04-19 13:45:24 -07:00 committed by Carlton Gibson
parent d15d824deb
commit a8bb53dbd2
4 changed files with 1 additions and 20 deletions

View File

@ -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;

View File

@ -226,7 +226,6 @@ input[type="submit"], button {
padding-top: 6px;
}
.aligned .add-another,
.aligned .related-lookup,
.aligned .datetimeshortcuts,
.aligned .related-lookup + strong {

View File

@ -71,7 +71,6 @@
margin-left: 0;
}
[dir="rtl"] .aligned .add-another,
[dir="rtl"] .aligned .related-lookup,
[dir="rtl"] .aligned .datetimeshortcuts {
margin-left: 0;

View File

@ -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();
}