JSPWiki
  1. JSPWiki
  2. JSPWIKI-674

nested tabbed sections fail to display correctly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 2.8.5, 3.0, 2.9
    • Component/s: None
    • Labels:
      None
    • Environment:

      identified in JSPWiki version 2.8.3 (likely exists in prior and later versions) on Windows XP with tomcat 5.5

      Description

      ;tabbedSections that are nested in a tab... do not work: Here is an example copy and pasted from http://www.jspwiki.org/wiki/TabbedSections.

      An extra tab was added to the example, and the full tabbedSection was pasted into the new tab.

      When a user clicks on one of the tabs the display breaks and the content of the tabs disappear.

      {{

      { %%tabbedSection %%tab-LoremIpsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc. /% %%tab-NullamSodales Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. /% %%tab-Cras Cras aliquet nibh sit amet tortor. Nam nunc. /% %%tab-NestedTabbedSections %%tabbedSection %%tab-LoremIpsum Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec dictum velit eget risus. Fusce ligula. Maecenas vitae velit eget odio pulvinar aliquet. Quisque ultricies mollis lorem. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent dapibus odio. Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. Cras aliquet nibh sit amet tortor. Nam nunc. /% %%tab-NullamSodales Nullam sodales erat vel pede. Morbi ut turpis. Sed sed metus. Donec ut dui. Duis gravida risus non nibh. Aliquam erat volutpat. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Aliquam dolor urna, tincidunt eget, posuere nec, suscipit quis, arcu. Proin pede risus, placerat id, tincidunt eu, consequat in, sem. Sed eu sapien. Vestibulum turpis. Sed fringilla odio vel eros. Mauris in libero sed sapien mattis pellentesque. /% %%tab-Cras Cras aliquet nibh sit amet tortor. Nam nunc. /% /% /% /% }

      }}

        Activity

        Hide
        Florian Holeczek added a comment -

        Closing this, since 2.9 has been released

        Show
        Florian Holeczek added a comment - Closing this, since 2.9 has been released
        Hide
        brushed added a comment -

        Solved in v2.8.5 and 3.0.0

        Show
        brushed added a comment - Solved in v2.8.5 and 3.0.0
        Hide
        brushed added a comment -

        The is a bug in jspwiki-common.js, in the click-handler of the TabbedSection class.
        Nested tab-elements with the same ID are apparently not found with the current getElementById method.

        Replace:

        tabs.getElementById(this.id.substr(5)).removeClass('hidetab');
        

        by

        tabs.getElement( '#'+ this.id.substr(5)).removeClass('hidetab');
        

        dirk

        Show
        brushed added a comment - The is a bug in jspwiki-common.js, in the click-handler of the TabbedSection class. Nested tab-elements with the same ID are apparently not found with the current getElementById method. Replace: tabs.getElementById(this.id.substr(5)).removeClass('hidetab'); by tabs.getElement( '#'+ this.id.substr(5)).removeClass('hidetab'); dirk

          People

          • Assignee:
            brushed
            Reporter:
            Carey Matthew Black
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development