framework7

Open full view…

view within a view back navigation issue

gregkeys
Mon, 23 Jun 2014 07:44:00 GMT

I have a page which has a view inside of it (its a user profile page with a horizontal split view, this allows the bottom half of the page to navigate independent of the whole page) When the internal view initializes, the back button in the parent page changes to control the the child view which breaks the page layout when clicked since it animates the entire page but only removes the bottom portion. Is there a way to keep the child views' history independent of the page. currently I've had to remove the .back class from the link and defer to using the href to a designated page, this isnt the most ideal as the designated page may not always be the previous page. the page looks something like this --- <div class="navbar"> <div class="navbar-inner"> <div class="left sliding"> <a href="index.html" class="link"> <i class="icon icon-back-blue"></i> <span>Back</span> </a> </div> <div class="center sliding">My Profile</div> <div class="right"> <a href="#" class="open-panel link icon-only"><i class="icon icon-bars-blue"></i></a> </div> </div> </div> <div class="pages"> <div class="page navbar-through" data-page="user-profile"> <div class="page-content"> <div class="top-of-profile"> <img> <p>misc text</p> </div> <div class="view view-timeline"> <div class="pages"> </div> </div> </div> </div> ---

Vladimir Kharlampidi
Mon, 23 Jun 2014 10:22:53 GMT

Not sure, will the nested Views work because i didn't think about such use case. If these both Views are initialized they should keep navigation history separately. About back button, you can try to specify specific view for it by adding, for example *data-view=“.view-timeline”* attribute. This attribute will tell link to call goBack for “.view-timeline”

gregkeys
Mon, 23 Jun 2014 18:46:29 GMT

Yeah the view inside another view helps to keep page specific content from showing up where it is not needed, by being in a page it automatically disappears when navigating away, placing the view outside and next to the view in the index causes extra work to show and hide the view as needed. no luck on the data-view it had the same effect.

Vladimir Kharlampidi
Tue, 24 Jun 2014 11:29:57 GMT

Hey Greg, can you post your video link again? For some reason it disappear

gregkeys
Tue, 24 Jun 2014 21:40:12 GMT

weird, seems a couple other posts disappeared as well, server roll back maybe?? https://www.youtube.com/watch?v=NOWDLFBWmDw

Vladimir Kharlampidi
Wed, 25 Jun 2014 17:39:39 GMT

Ok, it take some time from me, so this is currently impossible to have view in view. To make it work it will require a lot of code refactoring, need to look deeper. By the way, Tabs are not fit for you here?

gregkeys
Thu, 26 Jun 2014 01:49:06 GMT

its alright the only side effect seems to be the back button, its a small enough issue I will likely just write a custom history event for now. Regarding the tabs we are converting a jquery mobile app with custom css designs, that horizontal menu is a custom carry over from the previous app, once the app is working 100% we will likely update the styles.

Vladimir Kharlampidi
Sat, 28 Jun 2014 15:05:15 GMT

It is should be a bit improved in just released 0.9.0

gregkeys
Mon, 30 Jun 2014 01:21:36 GMT

Yes very nice, thank you.