From a8bb53dbd24c90c280e90332d9a1f9f64efde3c7 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 19 Apr 2020 13:45:24 -0700 Subject: [PATCH] Refs #31483 -- Removed CSS and JavaScript for unused HTML class add-another. The HTML class was removed in 07988744b347302925bc6cc66511e34224db55ab. As such, the CSS and JavaScript is unused. --- django/contrib/admin/static/admin/css/forms.css | 8 +------- django/contrib/admin/static/admin/css/responsive.css | 1 - .../contrib/admin/static/admin/css/responsive_rtl.css | 1 - django/contrib/admin/static/admin/js/change_form.js | 11 ----------- 4 files changed, 1 insertion(+), 20 deletions(-) diff --git a/django/contrib/admin/static/admin/css/forms.css b/django/contrib/admin/static/admin/css/forms.css index 62a093f952..06acd4290d 100644 --- a/django/contrib/admin/static/admin/css/forms.css +++ b/django/contrib/admin/static/admin/css/forms.css @@ -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; diff --git a/django/contrib/admin/static/admin/css/responsive.css b/django/contrib/admin/static/admin/css/responsive.css index d7866c174e..238d68be84 100644 --- a/django/contrib/admin/static/admin/css/responsive.css +++ b/django/contrib/admin/static/admin/css/responsive.css @@ -226,7 +226,6 @@ input[type="submit"], button { padding-top: 6px; } - .aligned .add-another, .aligned .related-lookup, .aligned .datetimeshortcuts, .aligned .related-lookup + strong { diff --git a/django/contrib/admin/static/admin/css/responsive_rtl.css b/django/contrib/admin/static/admin/css/responsive_rtl.css index f999cb128b..66fcc3ca61 100644 --- a/django/contrib/admin/static/admin/css/responsive_rtl.css +++ b/django/contrib/admin/static/admin/css/responsive_rtl.css @@ -71,7 +71,6 @@ margin-left: 0; } - [dir="rtl"] .aligned .add-another, [dir="rtl"] .aligned .related-lookup, [dir="rtl"] .aligned .datetimeshortcuts { margin-left: 0; diff --git a/django/contrib/admin/static/admin/js/change_form.js b/django/contrib/admin/static/admin/js/change_form.js index 4797383b30..eafc6e5f14 100644 --- a/django/contrib/admin/static/admin/js/change_form.js +++ b/django/contrib/admin/static/admin/js/change_form.js @@ -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(); }