From 9de1af74e22dabfd3e035e4ee517cf56d424d901 Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Mon, 22 Jul 2024 13:34:43 +0100 Subject: [PATCH] Improve display of inline form elements on narrow screen widths These got jumbled due to some unexpected CSS interactions which prevented the add element button from working. Fixes #1510 --- .../admin/app/assets/css/admin/_admin.scss | 5 ++++ .../admin/concept/descriptionForm.scala.html | 24 +++++++++-------- .../admin/repository/addressForm.scala.html | 27 ++++++++++--------- .../portal/app/assets/css/portal/_layout.scss | 1 - 4 files changed, 33 insertions(+), 24 deletions(-) diff --git a/modules/admin/app/assets/css/admin/_admin.scss b/modules/admin/app/assets/css/admin/_admin.scss index ed9a03f7ee..c4f6d2b470 100644 --- a/modules/admin/app/assets/css/admin/_admin.scss +++ b/modules/admin/app/assets/css/admin/_admin.scss @@ -87,6 +87,11 @@ body > .admin-content > .flash { } } +.inline-remove > a:hover { + text-decoration: none; + cursor: pointer; +} + .address-form, .concept-description-form { background-color: $gray-100; diff --git a/modules/admin/app/views/admin/concept/descriptionForm.scala.html b/modules/admin/app/views/admin/concept/descriptionForm.scala.html index 0ae930f0ff..98172213d5 100644 --- a/modules/admin/app/views/admin/concept/descriptionForm.scala.html +++ b/modules/admin/app/views/admin/concept/descriptionForm.scala.html @@ -9,15 +9,17 @@ @views.html.admin.common.descriptionForm(desc, cls = "concept-description-form inline-element") { × - @choiceInput(desc, LANG_CODE, views.Helpers.languagePairList, '_blank -> true) - @choiceInput(desc, IDENTIFIER, views.Helpers.scriptPairList, '_blank -> true) - @formHelpers.lineInput(desc, PREFLABEL) - @formHelpers.inlineNameSet(desc, ALTLABEL) - @formHelpers.inlineNameSet(desc, HIDDENLABEL) - @formHelpers.inlineTextSet(desc, NOTE) - @formHelpers.inlineTextSet(desc, CHANGENOTE) - @formHelpers.inlineTextSet(desc, EDITORIALNOTE) - @formHelpers.inlineTextSet(desc, HISTORYNOTE) - @formHelpers.inlineTextSet(desc, SCOPENOTE) - @formHelpers.inlineTextSet(desc, DEFINITION, rows = 4) +
+ @choiceInput(desc, LANG_CODE, views.Helpers.languagePairList, '_blank -> true) + @choiceInput(desc, IDENTIFIER, views.Helpers.scriptPairList, '_blank -> true) + @formHelpers.lineInput(desc, PREFLABEL) + @formHelpers.inlineNameSet(desc, ALTLABEL) + @formHelpers.inlineNameSet(desc, HIDDENLABEL) + @formHelpers.inlineTextSet(desc, NOTE) + @formHelpers.inlineTextSet(desc, CHANGENOTE) + @formHelpers.inlineTextSet(desc, EDITORIALNOTE) + @formHelpers.inlineTextSet(desc, HISTORYNOTE) + @formHelpers.inlineTextSet(desc, SCOPENOTE) + @formHelpers.inlineTextSet(desc, DEFINITION, rows = 4) +
} diff --git a/modules/admin/app/views/admin/repository/addressForm.scala.html b/modules/admin/app/views/admin/repository/addressForm.scala.html index d20f5e1abb..64ce7e3de3 100644 --- a/modules/admin/app/views/admin/repository/addressForm.scala.html +++ b/modules/admin/app/views/admin/repository/addressForm.scala.html @@ -2,19 +2,22 @@ @import Isdiah._ @import views.html.formHelpers._ +@import views.html.admin.repository.inlineGeoname
- @formHelpers.hiddenInput(field(Entity.ID)) × - @formHelpers.lineInput(field, ADDRESS_NAME) - @formHelpers.lineInput(field, CONTACT_PERSON) - @inlineGeoname(field, CITY, "city") - @formHelpers.choiceInput(field, COUNTRY_CODE, views.Helpers.countryPairList, '_blank -> true) - @inlineGeoname(field, REGION, "region") - @inlineGeoname(field, POSTAL_CODE, "postal") - @inlineGeoname(field, STREET_ADDRESS, "address") - @inlineNameSet(field, EMAIL) - @inlineNameSet(field, TELEPHONE) - @inlineNameSet(field, FAX) - @inlineNameSet(field, URL) +
+ @formHelpers.hiddenInput(field(Entity.ID)) + @formHelpers.lineInput(field, ADDRESS_NAME) + @formHelpers.lineInput(field, CONTACT_PERSON) + @inlineGeoname(field, CITY, "city") + @formHelpers.choiceInput(field, COUNTRY_CODE, views.Helpers.countryPairList, '_blank -> true) + @inlineGeoname(field, REGION, "region") + @inlineGeoname(field, POSTAL_CODE, "postal") + @inlineGeoname(field, STREET_ADDRESS, "address") + @inlineNameSet(field, EMAIL) + @inlineNameSet(field, TELEPHONE) + @inlineNameSet(field, FAX) + @inlineNameSet(field, URL) +
diff --git a/modules/portal/app/assets/css/portal/_layout.scss b/modules/portal/app/assets/css/portal/_layout.scss index 0b9526ddf5..1884c92416 100644 --- a/modules/portal/app/assets/css/portal/_layout.scss +++ b/modules/portal/app/assets/css/portal/_layout.scss @@ -283,7 +283,6 @@ ul.pagination { } > .inline-remove { - @include make-col-ready(); @include make-col(1); } }