Listview in Popover (target:parent)

3 posts, 0 answers
  1. d2uX
    d2uX avatar
    16 posts
    Member since:
    Jul 2012

    Posted 21 Aug 2012 Link to this post

    Hi there,

    I am abusing the popover for a menu-like view. So I have my popover which has a listview with some menu entries. Now I'd like to navigate to a different view when clicking an entry. It works, but the new view is loaded INSIDE the popover. Instead I want it to load in the "PARENT" view. How can I achieve that?
    This is how the hierarchy looks like:
    <div data-role="view"> <!-- this would be the view to load the new view -->
        <div data-role="popover">
            <div data-role="view"> <!-- this is where it's loaded into -->
                <ul data-role="listview">
                    <li><a href="view/TabView.html">Tab</a></li>

    //edit: I noticed the following behavior when playing around with the listview's links:

    <li><a data-transition="fade" href="view/TabView.html">inside</a></li> //opens inside the popover

    <li><a data-rel="external" data-transition="fade" href="view/TabView.html">ext</a></li> //doesnt open at all on the phone

    <li><a data-rel="external" data-transition="fade" href="#view/TabView.html">ext</a></li> //(notice the #) doesnt open at all on the phone but has exactly the desired behavior on the desktop

    any suggestions?

  2. d2uX
    d2uX avatar
    16 posts
    Member since:
    Jul 2012

    Posted 24 Aug 2012 Link to this post

    For anyone interested in the solution:
    In the 'Getting Started' section I read, that the Popover initializes a simple pane-widget. Then (again in getting started) you find the 
    attribute which let's you define where to open links.
    It is really confusing to have so many places to look for information. You might consider moving such things in ONE place (especially since the Dojo started which provides a very nice 'getting started' thing.
    Also some things provided in the 'old' documentation are missing in the new one... and it's way more unstructured.

    Another thing that bothers me when loading a listview (or any other content) into a popover/pane:
    You cannot set the height to auto. Is there any possibility to adjust the pane/popover's height to match the height of its content? Setting the data-popup attribute to {"height":"auto"} doesn't work :/

  3. Dennis
    Dennis avatar
    6 posts
    Member since:
    Sep 2012

    Posted 16 Oct 2012 Link to this post

    Agreeing with Erik, would be nice to have the popover size to contents.
Back to Top