From a25fba2c65881f8695d9ebf30ef1f3b6c89dffa4 Mon Sep 17 00:00:00 2001 From: Renee LeBeau Date: Fri, 15 May 2026 17:33:32 -0400 Subject: [PATCH] IULRDC-210 DataCORE: more/less vs autolink issue --- app/assets/javascripts/more.js | 17 +++++++++------- .../stylesheets/custom_layout/tweaks.css | 20 +++++++++---------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/app/assets/javascripts/more.js b/app/assets/javascripts/more.js index d810b358..6adee08f 100644 --- a/app/assets/javascripts/more.js +++ b/app/assets/javascripts/more.js @@ -29,20 +29,23 @@ $(document).on('turbolinks:load', function() { }); function start_substr(string, length) { - var endtag = 0,i=0; - for(i; i=0; i--) { - if(string[i] == ">") - endtag = i; + if((string[i] == "<") && (string[i+1] == "a")) + { + atag = i-1; + i = 0; + } } i = length; - if (endtag > length) + if (atag > 0) { - i = endtag; + i = atag; } var newString = string.substring(0,(i+1)); return newString; } -}); \ No newline at end of file +}); diff --git a/app/assets/stylesheets/custom_layout/tweaks.css b/app/assets/stylesheets/custom_layout/tweaks.css index 613f7134..30be3e14 100644 --- a/app/assets/stylesheets/custom_layout/tweaks.css +++ b/app/assets/stylesheets/custom_layout/tweaks.css @@ -120,9 +120,19 @@ a.morelink { text-decoration: none; outline: none; } + +a.morelink:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px +} + .morecontent span { display: none; } + +.glyphicon-new-window { + display: inline-block !important; +} /* End [more...] and [less...] */ .multi_value .field-controls .btn.add.btn-add-another::before { @@ -182,16 +192,6 @@ ol.catalog li:after { max-width: 8em; } -/* To support [more...] and [less...] */ -a.morelink { - text-decoration: none; - outline: none; -} -.morecontent span { - display: none; -} -/* End [more...] and [less...] */ - #page-positioner { background-color: #f2f2f2; }