PDA

View Full Version : Hamburger Menu Floating Memu Panel



Chris Spencer
23-Feb-2017, 03:03 AM
A2 Mobile Web Drilldown style

There seems to be an issue with getting the floating menu the correct size.
It is too small and the items scroll,
However setting piHeight to a larger number than the default 500 seems to have no effect.

Harm Wibier
24-Feb-2017, 10:03 AM
Could you post an example of what you are trying to do?

Chris Spencer
24-Feb-2017, 03:57 PM
The code is below
The first menu is ok it is the 'Master Files' slide out it is too small and has to scroll.



Object oMenuPanel is a cWebPanel
Set peRegion to prLeft
Set piWidth to 50
// Set piHeight to 500

Object oMenuButton is a cWebMenuButton
Set piMenuHeight to 500


Object oDashboard_itm is a cWebMenuItem
Set psCaption to C_$Dashboard


Procedure OnClick
Send NavigateBegin to oDashboard Self False
End_Procedure
End_Object


Object oViewMenu is a cWebMenuItem //this menu is too small, seems to be the size of original menu
Set psCaption to 'Master Files'


Object oPostCodeItem1 is a cWebMenuItem
Set psCaption to "Post Code"


Procedure OnClick
Forward Send OnClick
Send NavigateBegin to oPostCodeselect Self False
End_Procedure

Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView
Get NamedValueAdd NavigateData.NamedValues "task" "maint" to NavigateData.NamedValues
End_Procedure

End_Object


Object oClientSelectItem1 is a cWebMenuItem
Set psCaption to "Client"


Procedure OnClick
Forward Send OnClick
Send NavigateBegin to oClientSelect Self False
End_Procedure

Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView
Get NamedValueAdd NavigateData.NamedValues "task" "maint" to NavigateData.NamedValues
End_Procedure
End_Object


Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView
Get NamedValueAdd NavigateData.NamedValues "task" "maint" to NavigateData.NamedValues
End_Procedure


Object oBankSelectItem1 is a cWebMenuItem
Set psCaption to "Bank"


Procedure OnClick
Forward Send OnClick
Send NavigateBegin to oBankSelect Self False
End_Procedure

Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView
Get NamedValueAdd NavigateData.NamedValues "task" "maint" to NavigateData.NamedValues
End_Procedure
End_Object


Object oTransactionTypeSelectItem1 is a cWebMenuItem
Set psCaption to "Transaction Types"


Procedure OnClick
Forward Send OnClick
Send NavigateBegin to oTransactionTypeSelect Self False
End_Procedure

Procedure OnGetNavigateForwardData tWebNavigateData ByRef NavigateData Handle hoToView
Get NamedValueAdd NavigateData.NamedValues "task" "maint" to NavigateData.NamedValues
End_Procedure

End_Object



Object oCSVHeadSelectItem1 is a cWebMenuItem
Set psCaption to "CSV Formats"


Procedure OnClick
Forward Send OnClick
Send NavigateBegin to oCSVFormat Self False
End_Procedure
End_Object





End_Object


Object oSignOut_itm is a cWebMenuItem
Set psCaption to C_$LogOut


Procedure OnClick
Send RequestLogOut of ghoWebSessionManager
End_Procedure
End_Object
End_Object


Object oBackButton is a cWebButton
Set psCSSClass to "WebBack_Icon"
Set pbRender to False

Procedure OnClick
Handle hoTop

Get TopViewHandle of oViewStack to hoTop
If (hoTop > 0) Begin
Send NavigateCancel of hoTop
End
End_Procedure
End_Object

Send AddClient of oViewStack Self

Procedure OnUpdateViewStack
Handle hoTop hoDflt
Integer eMode
Boolean bTop

WebGet peMode of ghoWebApp to eMode

Get TopViewHandle of oViewStack to hoTop
Get GetDefaultView to hoDflt
Move (hoTop=0 or hoTop=hoDflt) to bTop

WebSet pbRender of oBackButton to (not(bTop) and eMode >= rmMobile)
WebSet pbRender of oMenuButton to (bTop or eMode < rmMobile)
End_Procedure


End_Object

Chris Spencer
24-Feb-2017, 04:00 PM
More info, if you open it then resize browser window it corrects itself. Even if you make it smaller it the renders correctly
There seems to be some rendering issue

It seems the first menu size dictates the next menus size

Marco
24-Feb-2017, 04:17 PM
Hi Harm
If it's the same as in A1 (sorry did not report yet), if a sub menu is smaller, this smaller menu size is applied on the previous menu when go go back.
E.g.
Main menu has 10 items
All are shown
Sub Menu from item 2 has only 4 options.
The four are shown and the menu size is set to just the four.
You go back to the main menu and only the first 4 of the 10 are shown.
This is from memory, but it was something like that.
Cheers
Marco

Stephen W. Meeley
24-Feb-2017, 04:23 PM
Marco,

Is this different behavior than it was in 18.2?

Marco
24-Feb-2017, 04:49 PM
Yes, it's one the first things I noticed moving a WIP app to 19A1

Harm Wibier
28-Feb-2017, 09:06 AM
This behavior is not new (was already like this in 18.2). That is why the WebOrderMobile has a default menu height. I'll see if this is something we can improve.

Chris Spencer
28-Feb-2017, 04:09 PM
Hope this is fixed.
It is not nice behaviour on a tablet device

BTW
Changing the piMenuHeight has no effect. still stays the same height.
However changing piMenuWidth does work.

However as I said before if you have the incorrect sized menu open then use the browser icon to resize it it corrects itself

Harm Wibier
1-Mar-2017, 02:53 AM
It appears the piMenuHeight is indeed broken. I was looking at the behavior without a piMenuHeight set. That is something we will definetely fix.

Chris Spencer
1-Mar-2017, 04:49 AM
Thanks