Closed servilla closed 2 years ago
This w3schools solution appears to be a bit more approachable than dealing only in the javascript. In this solution, the <span>
elements can be built into the HTML fragment that the servlet generates prior to building the landing page.
The w3schools solution (above) works well.
This fix should be applied to all other sections that use the more_less javascript.
The current implementation is constrained to a single instance due to reliance on "id" selectors. I believe a solution can be generalized but it is not worth the effort at this point since the alternate (earlier) javascript solution does work well enough.
On Fri, Jun 25, 2021, 11:21 AM An T. Nguyen enthusiast@utexas.edu wrote:
The
DataPortal\WebRoot/js/more_less.js
indiscriminately breaks embedded HTML text in the Data Portal display. This is especially problematic in the list of creators when the HTML content includes line break elements (i.e.,<br/>
). The following example shows where the<br/>
element is broken as<
and the resulting output is misaligned: https://portal.edirepository.org/nis/mapbrowse?packageid=knb-lter-ble.17.1 (you must use the Chrome of Firefox developer's tools to see this affect).Simply changing the amount of content before the break does not fix this issue in general, as it will only result in another list being affected.
Options include:
<br/>
elements or