This is a migrated thread and some comments may be shown as answers.

Listview in Popover (target:parent)

2 Answers 139 Views
PopOver (Mobile)
This is a migrated thread and some comments may be shown as answers.
d2uX
Top achievements
Rank 1
d2uX asked on 21 Aug 2012, 12:38 PM
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>
            </ul>
        </div>
    </div>
</div>

//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 Answers, 1 is accepted

Sort by
0
d2uX
Top achievements
Rank 1
answered on 24 Aug 2012, 12:08 PM
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 
data-target="_top"
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 :/

Regards,
Erik
0
Dennis
Top achievements
Rank 1
answered on 16 Oct 2012, 02:47 PM
Agreeing with Erik, would be nice to have the popover size to contents.
Tags
PopOver (Mobile)
Asked by
d2uX
Top achievements
Rank 1
Answers by
d2uX
Top achievements
Rank 1
Dennis
Top achievements
Rank 1
Share this question
or