kuvalda
Posts: 0
Joined: Thu Oct 24, 2013 2:15 pm

Sliding Panel on two app different pages is broken

Hello,

I followed your sliding panel tutorial and everything works fine on one page. Now I created another page and added the same sliding panel to the second page.

However, after I navigate from page 1 to page 2 and try clicking on the panel button it's broken. I don't get any js errors in Chrome developer tools.

I used the same panel name on both pages (#mypanel) which should work fine considering that panelEvents.js is included from both app pages and uses that name to control panel behavior on each page separately? Thanks for your help.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Sliding Panel on two app different pages is broken

Hello!

Please give us public link (http://docs.appery.io/documentation/s...), we'll take a look.

kuvalda
Posts: 0
Joined: Thu Oct 24, 2013 2:15 pm

Sliding Panel on two app different pages is broken

Here you go:
http://appery.io/app/mobile-frame?src...

Try opening up the panel on the first page, then choose 'Offers' in the panel. This will take you to the Offers page. Try clicking on the panel button again - this is broken now.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Sliding Panel on two app different pages is broken

Thanks for sharing. Sorry, but it will need more time for research. We'll keep you informed.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Sliding Panel on two app different pages is broken

Hi,

To call sliding panel it should be on screen (in html panel component). What is the name of your Panel? I cannot find it on your page.

kuvalda
Posts: 0
Joined: Thu Oct 24, 2013 2:15 pm

Sliding Panel on two app different pages is broken

Hi Katya,

Here is the code that I use. Sliding panel id="mypanel" it's placed inside html panel component name="panelMenu"

I have the same Sliding panel on both pages (id="mypanel" for both)

code
<!-- panelMenu -->
<span name="panelMenu" dsid="panelMenu" id="Offers_panelMenu" class=" Offers_panelMenu">
<div data-role="panel" id="mypanel" data-position="left" data-display="reveal" data-theme="a">
<ul data-role="listview" data-divider-theme="h" data-inset="false">
<li data-role="list-divider" role="heading">
<&#47;li>
<li data-theme="a">
<a href="#" id="home" data-transition="slide">
Home
<&#47;a>
<&#47;li>
<li data-theme="a">
<a href="#" id="offers" data-transition="slide">
Offers
<span class="ui-li-count">
2
<&#47;span>
<&#47;a>
<&#47;li>
<li data-theme="a">
<a href="#" id="email" data-transition="slide">
Email a friend
<&#47;a>
<&#47;li>
<&#47;ul>
<&#47;div>
<&#47;span>
/code

kuvalda
Posts: 0
Joined: Thu Oct 24, 2013 2:15 pm

Sliding Panel on two app different pages is broken

Hi Katya, do you need more information to research this? Thanks.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Sliding Panel on two app different pages is broken

Hello! Sorry for delay, we're looking into this issue. I'll let you know when have more information.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Sliding Panel on two app different pages is broken

Hello! You have incorrect app logic. Please try this way.
1) In file panelMenuEvents this code prevar Panel = function() {
if (!$&#46;mobile&#46;activePage&#46;children('#mypanel')&#46;length) {
panel = $('#mypanel', $&#46;mobile&#46;activePage);
$&#46;mobile&#46;activePage&#46;append(panel);
_panel&#46;on("panelbeforeopen", function( event, ui ) {
_panel&#46;off()&#46;on("click", "#home", function() {
navigateTo("Home", true);
})&#46;on("click", "#offers", function() {
navigateTo("Offers", true);
})&#46;on("click", "#email", function() {
alert("Sorry can't send email just yet!");
});
});
}
};/pre2) On Home page show event Offers instead your code should be looking like this prePanel();/pre3) On menu button click run this code: pre$("#mypanel", $&#46;mobile&#46;activePage)&#46;panel("open");/pre

Return to “Issues”