Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2191

Toggle buttons in the community list don't work in Mirage 2 for Handles with prefix

    Details

    • Attachments:
      0
    • Comments:
      2
    • Documentation Status:
      Not Required

      Description

      The communities in the community list can't be expanded by clicking in the toggle buttons if the community has a Handle with a prefix (1234.5/678).

      The template standardAttributes in utils.xsl [1] substitutes '.' with '_' in id attributes, but when the preprocess communitylist.xsl prepares the value for the data-target attribute of the toggle buttons, the dots of the handle are not substituted [2].

      Example:

      Given a community with Handle 1234.5/678, its collapsed <div> becomes:

      <div id="collapse-1234_5_678" class="ds-static-div sub-tree-wrapper hidden">

      However, the data-target attribute value of the toggle button still has the prefix dot:

      <a class... data-target="#collapse-1234.5_678">

      As a consequence, the id does not match and the 'hidden' class is not removed [3].

      [1] https://github.com/DSpace/DSpace/blob/master/dspace-xmlui-mirage2/src/main/webapp/xsl/core/utils.xsl#L125
      [2] https://github.com/DSpace/DSpace/blob/master/dspace-xmlui-mirage2/src/main/webapp/xsl/preprocess/communitylist.xsl#L45
      [3] https://github.com/DSpace/DSpace/blob/master/dspace-xmlui-mirage2/src/main/webapp/scripts/community-list.js#L53

        Attachments

          Activity

            People

            • Assignee:
              bram Bram Luyten (Atmire)
              Reporter:
              alexm Àlex Magaz Graça
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: