diff --git a/app/assets/stylesheets/scss/_admin-layout.scss b/app/assets/stylesheets/scss/_admin-layout.scss index 13315de6df..619afc86b2 100644 --- a/app/assets/stylesheets/scss/_admin-layout.scss +++ b/app/assets/stylesheets/scss/_admin-layout.scss @@ -74,6 +74,7 @@ gap: $spacing-base/2; align-items: center; flex-wrap: wrap; + max-width: 100%; } #search-pair { diff --git a/app/assets/stylesheets/scss/_columns.scss b/app/assets/stylesheets/scss/_columns.scss index b659fa07b6..2859277e81 100644 --- a/app/assets/stylesheets/scss/_columns.scss +++ b/app/assets/stylesheets/scss/_columns.scss @@ -25,10 +25,12 @@ .c-columns__content, #page-content { padding-left: 2px; + overflow: auto; + overflow-wrap: anywhere; + @include bp(screen3) { flex: 0 1 90ch; padding-right: 5ch; - overflow: visible; } } diff --git a/app/assets/stylesheets/scss/_login.scss b/app/assets/stylesheets/scss/_login.scss index 21a3059714..dcc06a4581 100644 --- a/app/assets/stylesheets/scss/_login.scss +++ b/app/assets/stylesheets/scss/_login.scss @@ -31,22 +31,26 @@ margin-left: 0; display: flex; flex-direction: row; + flex-wrap: wrap; + justify-content: center; form { display: flex; flex-direction: row; width: 100%; + flex-wrap: wrap; & > div { display: flex; flex-direction: row; + flex-wrap: wrap; + justify-content: center; + gap: 1ch; } } .c-auto_complete { width: 20rem; - margin-right: 10px; - .c-input__text.c-ac__input_with_button, .c-ac__input-button { height: 45px; } diff --git a/app/assets/stylesheets/scss/_select.scss b/app/assets/stylesheets/scss/_select.scss index c113a40016..b4824cb4f7 100644 --- a/app/assets/stylesheets/scss/_select.scss +++ b/app/assets/stylesheets/scss/_select.scss @@ -1,5 +1,9 @@ // ##### Select Content Object ##### // +select { + max-width: 100%; +} + .o-select { margin: 0 0 20px; } diff --git a/app/javascript/react/components/MetadataEntry/Description.jsx b/app/javascript/react/components/MetadataEntry/Description.jsx index 88c9e731ae..272bd4f437 100644 --- a/app/javascript/react/components/MetadataEntry/Description.jsx +++ b/app/javascript/react/components/MetadataEntry/Description.jsx @@ -113,6 +113,12 @@ export default function Description({ table_toolbar: 'tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | ' + 'tableinsertcolbefore tableinsertcolafter tabledeletecol', content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }', + invalid_styles: { + table: 'width height', + tr: 'width height', + th: 'width height', + td: 'width height', + }, branding: false, paste_block_drop: true, paste_preprocess, diff --git a/app/models/stash_datacite/description.rb b/app/models/stash_datacite/description.rb index 5da79b91d0..c0a772adc5 100644 --- a/app/models/stash_datacite/description.rb +++ b/app/models/stash_datacite/description.rb @@ -76,6 +76,13 @@ def update_search_words resource&.identifier&.update_search_words! if description_type == 'abstract' && saved_change_to_description? end + def display_desc + fragment = Nokogiri::HTML5.fragment(description) + tables = fragment.css('table') + tables.wrap('
') + fragment.to_html + end + after_save :update_search_words end end diff --git a/app/views/stash_datacite/descriptions/_show.html.erb b/app/views/stash_datacite/descriptions/_show.html.erb index 084a88685f..91c42a2b16 100644 --- a/app/views/stash_datacite/descriptions/_show.html.erb +++ b/app/views/stash_datacite/descriptions/_show.html.erb @@ -5,7 +5,7 @@

Abstract

<% end %>
- <%= raw(abstract.description) %> + <%= raw(abstract.display_desc) %>
<% end %> @@ -16,7 +16,7 @@

Methods

<% end %>
- <%= raw(methods.description) %> + <%= raw(methods.display_desc) %>
<% end %> @@ -27,6 +27,6 @@

Usage notes

<% end %>
- <%= raw(other.description) %> + <%= raw(other.display_desc) %>
<% end %> diff --git a/app/views/stash_engine/shared/_change_tenant.html.erb b/app/views/stash_engine/shared/_change_tenant.html.erb index 9966b57cdc..41220b7dfc 100644 --- a/app/views/stash_engine/shared/_change_tenant.html.erb +++ b/app/views/stash_engine/shared/_change_tenant.html.erb @@ -13,7 +13,7 @@