RicardoP
Posts: 0
Joined: Mon Jul 22, 2013 9:52 pm

Facebook Style Navigation

Would be possible to have the person that wrote the above work around function (posted by Katya) look at their code and fix the event handling piece so we don't have to hard code all events in JavaScript?
That would give us (customers) a lot Sarisfaction.

All the best,

Ricardo

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

Facebook Style Navigation

Sorry, I don't think it's possible. At least in the nearest future.

mollyfud
Posts: 0
Joined: Mon Feb 11, 2013 5:16 am

Facebook Style Navigation

Hi Guys,
I have the same issue with adding events. I see that at the moment you probably have to add it in the Javascript code and that would be fine. Can someone complete this post by showing how/where to add that code?

For bonus points, is there a way to do this once, and have it called over and over again from every page (hard coded javascript maybe)?

I do love this though, great work!

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

Facebook Style Navigation

Hello,

Here is the link to the new version of this function which supports many pages.

We propose you to place the Grid component on the page and leave there an only cell. Grid is a container for the menu. Next you need to place in the single cell all the right buttons and menus, you can simply add actions to them. Besides, the mapping continues working with such menu!

Then, on Page Show event for FIRST page add Run JavaScript action with the following code:

precode// we need init panel only ONCE for first screen
if ( window.awesomeMenu == undefined) {
window.awesomeMenu = SlideMenu( Appery("mobilegrid_80"), Appery("mobilecontainer1") );
}/code/pre

Where mobilegrid_80 is the grid with one cell. Also it's important to pass page container (mobilecontainer1).

That is, the first parameter describes the menu container, the second is needed to determine page container.

The function takes three additional parameters:

  • side of the menu is displayed (by default, on the left) - the string "left" or "right";

  • type of appearance;

  • Theme Swatch.

    Read more here.

    Your menu is ready to call. You can add button to a header and add the following JavaScript on Click event:

    precodewindow.awesomeMenu.panel("open");/code/pre

    For the second and following pages where you need to use menu.

    It's better to hide menu container with "Visible" flag. Otherwise it blinks when page appears.

    For the second page add Page Show event with the following code:

    precodewindow.awesomeMenu2 = SlideMenu( Appery("mobilegrid_2"), Appery( "mobilecontainer2" ), "right" );
    Appery("mobilegrid_2").css({display: "table"});/code/pre

    You needs to control naming for mobilecontainer and grids.

    Please note that there is no code to check if menu exists and variable name is different.

    And next -- there is no normal way to hardcode menu for all screens. Theoretically this can be done with flag "Render all pages in one HTML file". But we don't test this.

mollyfud
Posts: 0
Joined: Mon Feb 11, 2013 5:16 am

Facebook Style Navigation

Thanks for this. I am not sure if I am doing something wrong but the events of the items in the slidepanel work on the second page but not on the first one.

Any ideas? No errors in the JS console or anything, just buttons from the grid (which do show up fine) don't do anything.

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

Facebook Style Navigation

Please check your code for Page Show events on both pages.

mollyfud
Posts: 0
Joined: Mon Feb 11, 2013 5:16 am

Facebook Style Navigation

Thanks! My bad. Think I had a capitalization issue with the container name that was stopping the events (Hope this helps others).

Also, I think I am right (worked in my testing anyway) that the grid can be any grid, with any number of cells you want if it gives you the look your after!

This is great! I would imagine many would love this! Any thought of:
a) Making it part of the product as a widget/template?
b) Making this a tutorial or something?

Thanks again!

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

Facebook Style Navigation

Hello!

Thank you. We will promote your proposal to our dev team.

dudi peretz
Posts: 0
Joined: Wed Jun 26, 2013 8:15 am

Facebook Style Navigation

Hi Katya,
Can u send me the backup file of thr example project ?

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

Facebook Style Navigation

Done, please check your mail box.

Return to “Issues”