mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Fixed #36079 -- Fixed text size of TabularInline object titles.
This commit is contained in:
		
				
					committed by
					
						 Sarah Boyce
						Sarah Boyce
					
				
			
			
				
	
			
			
			
						parent
						
							0a262c8407
						
					
				
				
					commit
					6537732585
				
			| @@ -429,7 +429,6 @@ body.popup .submit-row { | ||||
| .inline-group .tabular tr td.original { | ||||
|     padding: 2px 0 0 0; | ||||
|     width: 0; | ||||
|     _position: relative; | ||||
| } | ||||
|  | ||||
| .inline-group .tabular th.original { | ||||
| @@ -437,16 +436,19 @@ body.popup .submit-row { | ||||
|     padding: 0; | ||||
| } | ||||
|  | ||||
| .inline-group .tabular td { | ||||
|     font-size: 1rem; | ||||
| } | ||||
|  | ||||
| .inline-group .tabular td.original p { | ||||
|     position: absolute; | ||||
|     left: 0; | ||||
|     height: 1.1em; | ||||
|     height: 1.2em; | ||||
|     padding: 2px 9px; | ||||
|     overflow: hidden; | ||||
|     font-size: 0.5625rem; | ||||
|     font-size: 0.875rem; | ||||
|     font-weight: bold; | ||||
|     color: var(--body-quiet-color); | ||||
|     _width: 700px; | ||||
| } | ||||
|  | ||||
| .inline-group div.add-row, | ||||
|   | ||||
| @@ -358,6 +358,7 @@ class BinaryTreeAdmin(admin.TabularInline): | ||||
| # admin for #19524 | ||||
| class SightingInline(admin.TabularInline): | ||||
|     model = Sighting | ||||
|     show_change_link = True | ||||
|  | ||||
|  | ||||
| # admin and form for #18263 | ||||
| @@ -517,7 +518,7 @@ site.register(ParentModelWithCustomPk, inlines=[ChildModel1Inline, ChildModel2In | ||||
| site.register(BinaryTree, inlines=[BinaryTreeAdmin]) | ||||
| site.register(ExtraTerrestrial, inlines=[SightingInline]) | ||||
| site.register(SomeParentModel, inlines=[SomeChildModelInline]) | ||||
| site.register([Question, Inner4Stacked, Inner4Tabular]) | ||||
| site.register([Question, Inner4Stacked, Inner4Tabular, Sighting]) | ||||
| site.register(Teacher, TeacherAdmin) | ||||
| site.register(Chapter, inlines=[FootNoteNonEditableInlineCustomForm]) | ||||
| site.register(OutfitItem, inlines=[WeaknessInlineCustomForm]) | ||||
|   | ||||
| @@ -324,6 +324,9 @@ class Sighting(models.Model): | ||||
|     et = models.ForeignKey(ExtraTerrestrial, models.CASCADE) | ||||
|     place = models.CharField(max_length=100) | ||||
|  | ||||
|     def __str__(self): | ||||
|         return self.place | ||||
|  | ||||
|  | ||||
| # Models for #18263 | ||||
| class SomeParentModel(models.Model): | ||||
|   | ||||
| @@ -2532,3 +2532,19 @@ class SeleniumTests(AdminSeleniumTestCase): | ||||
|             delete.get_attribute("innerHTML"), | ||||
|         ) | ||||
|         self.take_screenshot("loaded") | ||||
|  | ||||
|     @screenshot_cases(["desktop_size", "mobile_size", "rtl", "dark", "high_contrast"]) | ||||
|     def test_tabular_inline_object_with_show_change_link(self): | ||||
|         from selenium.webdriver.common.by import By | ||||
|  | ||||
|         et = ExtraTerrestrial.objects.create(name="test") | ||||
|         Sighting.objects.create(et=et, place="Desert") | ||||
|         self.admin_login(username="super", password="secret") | ||||
|         url = reverse("admin:admin_inlines_extraterrestrial_change", args=(et.pk,)) | ||||
|         self.selenium.get(self.live_server_url + url) | ||||
|         object_str = self.selenium.find_element( | ||||
|             By.CSS_SELECTOR, "fieldset.module tbody tr td.original p" | ||||
|         ) | ||||
|         self.assertTrue(object_str.is_displayed()) | ||||
|         self.assertIn("Desert", object_str.text) | ||||
|         self.take_screenshot("tabular") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user