framework7

Open full view…

Some help with navigation needed here..

Oskari Rauta
Sun, 25 May 2014 15:49:10 GMT

Hi. I am trying to build a web app similar to provided todo add. First I started to builld it so it based on that, but have now had to start again few times since I have ran into multiple issues. First, I needed to add some more popup, so I had to do some changes to provided todo application. Everything was working quite nicely, until I added a entry to my localstorage.. Popup is supposed to close and it does, but without transition and then there's the real problem.. Overlay on main view doesn't go away automaticly, it goes away when I click it. But after this, if I try to add another entry, popup pops into screen and vanishes immediately. If I don't use javascript directly for closing the popup, everything works perfectly, transitions and so on.. Function that closes the popup programmatically checks that required fields in my form have been filled and if everything is as supposed, then uses myApp.closeModal('.popup-add'); to close the popup. Maybe I am doing something wrong here? Well, I tryied another approach as well, started to build similar app that bases on vi ews, pages and a tabbar. I tryied to build this so this has only single html file (multiple views and pages) - but I don't know how to use javascript to programmatically change pages and views properly. This seems a really good framework for these requirements.. And documentation is also very good, but I think documentation needs some updates as it's mostly all about doing the interface with html and staying out of JS.. Unfortunately I cannot go on with this right now, as I drive a truck and go to work for the next week- but hopefully someone could post some guidance for me here that I can use to keep going on the next week.

Vladimir Kharlampidi
Sun, 25 May 2014 21:02:31 GMT

Hi there, Each section of docs contains related JS part with examples. About popup, not sure what happens, it is good to see live example of problem. Anyway when you click on overlay it just do the same .closeModal method. You could also try to call it without arguments. You can learn how to programmatically change pages in docs Views section, there are .loadPage, .loadContent methods for that. If you need to change Tabs (which probably are views in tab bar app), there is no special API yet, but it simple, you just need to add "active" class on required tab and remove "active" class from any other tabs/views.

Oskari Rauta
Thu, 29 May 2014 12:51:47 GMT

Got it working, my button used to open popup had same class as my popup which caused this..