FoxInCloud
New graphical menu...
Gravatar is a globally recognized avatar based on your email address. New graphical menu...
  Michele
  thn@foxincloud.com
  Oct 28, 2014 @ 09:57am
I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...


Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  FoxInCloud Support - Thierry N.
  Michele
  Oct 28, 2014 @ 10:23am
OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin <<iif(someTable.someField > 0, '<span>' + cast(sometable.somefield as M) + '</span>', '')>> ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...




-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Michele
  Thierry Nivelet (FoxInCloud)
  Oct 29, 2014 @ 01:16am
Ok. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...




Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  FoxInCloud Support - Thierry N.
  Michele
  Oct 29, 2014 @ 02:46am
Ciao Michele,

It depends on how much delay you have for your client ...

If you have enough time, I would rather implement this feature through a discussion here where all FiC users can learn what css and js extensions are possible over a standard FoxInCloud rendering.
This would require a public URL where we can test your app's menu and every contributor could suggest css or js improvement.

Besides, I can hardly see how this could become a standard FoxInCloud menu ... I don't even think it's a standard Wordpress menu ... or it might be a good idea to make it the first FoxInCloud plugin that any developer can choose when building an app.

Just an idea for now, sounds interesting.
Any thought from others?

Attached is a simple example of you can do, with a few CSS instructions (written in 1 minute in firebug), to make an horizontal menu become vertical.

Let the discussion start!



OK. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...





Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Michele
  Thierry Nivelet (FoxInCloud)
  Oct 29, 2014 @ 02:56am
As you know time is always a problem, but if it can help i can try to delay the project ....not simple....but i can try....

A question: i have not still used menu in a foxincloud app. Where do i call the menu ? In which file of the project ?


Ciao Michele,

It depends on how much delay you have for your client ...

If you have enough time, I would rather implement this feature through a discussion here where all FiC users can learn what css and js extensions are possible over a standard FoxInCloud rendering.
This would require a public URL where we can test your app's menu and every contributor could suggest css or js improvement.

Besides, I can hardly see how this could become a standard FoxInCloud menu ... I don't even think it's a standard Wordpress menu ... or it might be a good idea to make it the first FoxInCloud plugin that any developer can choose when building an app.

Just an idea for now, sounds interesting.
Any thought from others?

Attached is a simple example of you can do, with a few CSS instructions (written in 1 minute in firebug), to make an horizontal menu become vertical.

Let the discussion start!



OK. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...






Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Michele
  Thierry Nivelet (FoxInCloud)
  Oct 29, 2014 @ 03:41am
I don't understand which is the option to make vertical the menu .


Ciao Michele,

It depends on how much delay you have for your client ...

If you have enough time, I would rather implement this feature through a discussion here where all FiC users can learn what css and js extensions are possible over a standard FoxInCloud rendering.
This would require a public URL where we can test your app's menu and every contributor could suggest css or js improvement.

Besides, I can hardly see how this could become a standard FoxInCloud menu ... I don't even think it's a standard Wordpress menu ... or it might be a good idea to make it the first FoxInCloud plugin that any developer can choose when building an app.

Just an idea for now, sounds interesting.
Any thought from others?

Attached is a simple example of you can do, with a few CSS instructions (written in 1 minute in firebug), to make an horizontal menu become vertical.

Let the discussion start!



OK. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...






Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  FoxInCloud Support - Thierry N.
  Michele
  Oct 29, 2014 @ 06:32am
you can either:
(1)- define a menu with the VFP menu designer and awMenuGen will compile it adapted automatically
(2)- write your own menu code in an adapted way

about (2),

? wMenu_doc()


As you know time is always a problem, but if it can help i can try to delay the project ....not simple....but i can try....

A question: i have not still used menu in a foxincloud app. Where do i call the menu ? In which file of the project ?


Ciao Michele,

It depends on how much delay you have for your client ...

If you have enough time, I would rather implement this feature through a discussion here where all FiC users can learn what css and js extensions are possible over a standard FoxInCloud rendering.
This would require a public URL where we can test your app's menu and every contributor could suggest css or js improvement.

Besides, I can hardly see how this could become a standard FoxInCloud menu ... I don't even think it's a standard Wordpress menu ... or it might be a good idea to make it the first FoxInCloud plugin that any developer can choose when building an app.

Just an idea for now, sounds interesting.
Any thought from others?

Attached is a simple example of you can do, with a few CSS instructions (written in 1 minute in firebug), to make an horizontal menu become vertical.

Let the discussion start!



OK. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...








-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  FoxInCloud Support - Thierry N.
  Michele
  Oct 29, 2014 @ 06:35am
.menubar.pad {
display: block; /* instead of inline-block*//
}

(not visible on the ss)


I don't understand which is the option to make vertical the menu .


Ciao Michele,

It depends on how much delay you have for your client ...

If you have enough time, I would rather implement this feature through a discussion here where all FiC users can learn what css and js extensions are possible over a standard FoxInCloud rendering.
This would require a public URL where we can test your app's menu and every contributor could suggest css or js improvement.

Besides, I can hardly see how this could become a standard FoxInCloud menu ... I don't even think it's a standard Wordpress menu ... or it might be a good idea to make it the first FoxInCloud plugin that any developer can choose when building an app.

Just an idea for now, sounds interesting.
Any thought from others?

Attached is a simple example of you can do, with a few CSS instructions (written in 1 minute in firebug), to make an horizontal menu become vertical.

Let the discussion start!



OK. I am not expert in CSS and JS manipulation.....so i need your help. I can evaluate even to pay for this project. Let me know an evaluation for this....even if i think to have an app with this kind of menu can help Foxincloud....


OK that's an interesting challenge ...

I think you can do that using the regular VFP menu system and additional js and css in xxx.js and xxx.css:
- css to control the layout (fixed, some items in an horizontal bar, some in a vertical bar)
- js to differentiate whether menu open as an accordion or a lateral popup (fairly easy)

to update the variable parts, you would have to execute on each request:

wMenu(Textmerge("define bar bbb of menu prompt plugin ...")

or even define a timer in your form base class that would execute this instruction

you could also override xxxProcess.wFormStandardPage() to install your menu on each page.

I'll get back to you tomorrow with more solutions and ideas.

I'm sure other devs (Tuvia?) will love to help.


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...








-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Tuvia Vinitsky
  Michele
  Oct 29, 2014 @ 09:02am
Michele.

You certainly could do that with a VFP menu I would imagine.

We started our menu system before FiC supported VFP menus, so we used a CSS based menu that could do what you wish. In xxxserver.wFormHTML_cheader we put this:


LOCAL lcresult1


lcResult1 = "<div id='mainmenu' class='cssmenu'>"+get_menu(lcname)+"</div>"


RETURN lcResult1


The function get_menu then looks something like this: (ouser has security rights for this user)

PROCEDURE get_menu()
LPARAMETERS tName

* Called for master forms from the header proc (vm5serves.prg). That sets a
* div, and child forms have a method that uses the prototype update to replace the
* contents of a specified div.

*<a href="nameset.vm5"> for master forms
*IntuiCat.FormDisplay(event, 'nameset_scx', '.t.'); for child forms

LOCAL lcresult1
lcResult = ''

SET TEXTMERGE DELIMITERS TO "||" , "||" && 2 char max

IF EMPTY(ALLTRIM(tName))
TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li ><a href="#"><span>File</span></a> <ul>
<li><a href="#"><span>Please login</span></a></li>
</ul>
</li>
</ul>
ENDTEXT
ELSE && user has logged on

TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li><a href="#"><span>File</span></a>
<ul>
<li ||IIF(oUser.gaPass[1] =.f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'nameset.scx')"><a href="#"><span>Accounts</span></a></li>
ENDTEXT
IF oVM.giStudents
TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<li ||IIF(oUser.gaPass[35] = .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'studset.scx')"><a href="#"><span>Students</span></a></li>
ENDTEXT
ENDIF

TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15

<li onclick="FoxInCloud.FormDisplay(event, 'reports.scx')"><a href="#"><span>Reports</span></a></li>
<li class="disabled"><a href="#"><span>Parlor Meetings</span></a></li>
<li class="disabled"><a href="#"><span>Vaad HaTzedakos</span></a></li>
<li class="disabled"><a href="#"><span>Checkbook</span></a></li>
<li class="disabled"><a href="#"><span>Calendar</span></a></li>
</ul>
</li>
<li><a href='#'><span>Financial</span></a>
<ul>
<li ||IIF(oUser.gaPass[22]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'invoice.scx')"><a href="#"><span>Print Bills</span></a></li>
<li ||IIF(oUser.gaPass[23]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'statement.scx')"><a href="#"><span>Print Statements</span></a></li>
<li ||IIF(oUser.gaPass[24]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'receipt.scx')"><a href="#"><span>Print Receipts</span></a></li>
<li class='disabled' ><a href="#"><span>End of Day CC Processing</span></a></li>
<li class='disabled' onclick="FoxInCloud.FormDisplay(event, 'ccprocess.scx')" ><a href="#"><span>Process Pending CC/EFT</span></a></li>
<li class='disabled' ><a href="#"><span>Replace Fund Types</span></a></li>
<li ||IIF(oUser.gaPass[76]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'deposit.scx')"><a href="#"><span>Create Deposit</span></a></li>
<li ||IIF(oUser.gaPass[83]= .f. or oVM.gUseReceiptSeries = .f., "class='disabled'", "")|| ><a href="#"><span>Assign Receipt Number by Series</span></a></li>
</ul>
</li>
<li><a href='#'><span>Banquet</span></a>
<ul>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, '|| IIF(oVM.gIndividualBanqEntry, 'banqtab2.scx', 'banqtab.scx')||')" ><a href="#"><span>Batch Table Entry</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'repltabl.scx')"><a href="#"><span>Batch Table Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. or oVM.gInvSubFromDonor = .t., "class='disab'", "")||onclick="FoxInCloud.FormDisplay(event, 'rephon.scx')" ><a href="#"><span>Batch Honoree Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")||><a href="#"><span>Update Flags for Honorees</span></a></li>
</ul>
</li>

* etc . . . . . .

we have a menu css file and we end up with menus:


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...



Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Michele
  Tuvia Vinitsky
  Oct 29, 2014 @ 09:25am
Tuvia, do you have a site where i can see it ?


Michele.

You certainly could do that with a VFP menu I would imagine.

We started our menu system before FiC supported VFP menus, so we used a CSS based menu that could do what you wish. In xxxserver.wFormHTML_cheader we put this:


LOCAL lcresult1


lcResult1 = "<div id='mainmenu' class='cssmenu'>"+get_menu(lcname)+"</div>"


RETURN lcResult1


The function get_menu then looks something like this: (ouser has security rights for this user)

PROCEDURE get_menu()
LPARAMETERS tName

* Called for master forms from the header proc (vm5serves.prg). That sets a
* div, and child forms have a method that uses the prototype update to replace the
* contents of a specified div.

*<a href="nameset.vm5"> for master forms
*IntuiCat.FormDisplay(event, 'nameset_scx', '.t.'); for child forms

LOCAL lcresult1
lcResult = ''

SET TEXTMERGE DELIMITERS TO "||" , "||" && 2 char max

IF EMPTY(ALLTRIM(tName))
TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li ><a href="#"><span>File</span></a> <ul>
<li><a href="#"><span>Please login</span></a></li>
</ul>
</li>
</ul>
ENDTEXT
ELSE && user has logged on

TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li><a href="#"><span>File</span></a>
<ul>
<li ||IIF(oUser.gaPass[1] =.f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'nameset.scx')"><a href="#"><span>Accounts</span></a></li>
ENDTEXT
IF oVM.giStudents
TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<li ||IIF(oUser.gaPass[35] = .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'studset.scx')"><a href="#"><span>Students</span></a></li>
ENDTEXT
ENDIF

TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15

<li onclick="FoxInCloud.FormDisplay(event, 'reports.scx')"><a href="#"><span>Reports</span></a></li>
<li class="disabled"><a href="#"><span>Parlor Meetings</span></a></li>
<li class="disabled"><a href="#"><span>Vaad HaTzedakos</span></a></li>
<li class="disabled"><a href="#"><span>Checkbook</span></a></li>
<li class="disabled"><a href="#"><span>Calendar</span></a></li>
</ul>
</li>
<li><a href='#'><span>Financial</span></a>
<ul>
<li ||IIF(oUser.gaPass[22]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'invoice.scx')"><a href="#"><span>Print Bills</span></a></li>
<li ||IIF(oUser.gaPass[23]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'statement.scx')"><a href="#"><span>Print Statements</span></a></li>
<li ||IIF(oUser.gaPass[24]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'receipt.scx')"><a href="#"><span>Print Receipts</span></a></li>
<li class='disabled' ><a href="#"><span>End of Day CC Processing</span></a></li>
<li class='disabled' onclick="FoxInCloud.FormDisplay(event, 'ccprocess.scx')" ><a href="#"><span>Process Pending CC/EFT</span></a></li>
<li class='disabled' ><a href="#"><span>Replace Fund Types</span></a></li>
<li ||IIF(oUser.gaPass[76]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'deposit.scx')"><a href="#"><span>Create Deposit</span></a></li>
<li ||IIF(oUser.gaPass[83]= .f. or oVM.gUseReceiptSeries = .f., "class='disabled'", "")|| ><a href="#"><span>Assign Receipt Number by Series</span></a></li>
</ul>
</li>
<li><a href='#'><span>Banquet</span></a>
<ul>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, '|| IIF(oVM.gIndividualBanqEntry, 'banqtab2.scx', 'banqtab.scx')||')" ><a href="#"><span>Batch Table Entry</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'repltabl.scx')"><a href="#"><span>Batch Table Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. or oVM.gInvSubFromDonor = .t., "class='disab'", "")||onclick="FoxInCloud.FormDisplay(event, 'rephon.scx')" ><a href="#"><span>Batch Honoree Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")||><a href="#"><span>Update Flags for Honorees</span></a></li>
</ul>
</li>

* etc . . . . . .

we have a menu css file and we end up with menus:


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...




Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Tuvia Vinitsky
  Michele
  Oct 29, 2014 @ 12:24pm
Not really. I'll try and make a public site later today if I can.


Tuvia, do you have a site where i can see it ?


Michele.

You certainly could do that with a VFP menu I would imagine.

We started our menu system before FiC supported VFP menus, so we used a CSS based menu that could do what you wish. In xxxserver.wFormHTML_cheader we put this:


LOCAL lcresult1


lcResult1 = "<div id='mainmenu' class='cssmenu'>"+get_menu(lcname)+"</div>"


RETURN lcResult1


The function get_menu then looks something like this: (ouser has security rights for this user)

PROCEDURE get_menu()
LPARAMETERS tName

* Called for master forms from the header proc (vm5serves.prg). That sets a
* div, and child forms have a method that uses the prototype update to replace the
* contents of a specified div.

*<a href="nameset.vm5"> for master forms
*IntuiCat.FormDisplay(event, 'nameset_scx', '.t.'); for child forms

LOCAL lcresult1
lcResult = ''

SET TEXTMERGE DELIMITERS TO "||" , "||" && 2 char max

IF EMPTY(ALLTRIM(tName))
TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li ><a href="#"><span>File</span></a> <ul>
<li><a href="#"><span>Please login</span></a></li>
</ul>
</li>
</ul>
ENDTEXT
ELSE && user has logged on

TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li><a href="#"><span>File</span></a>
<ul>
<li ||IIF(oUser.gaPass[1] =.f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'nameset.scx')"><a href="#"><span>Accounts</span></a></li>
ENDTEXT
IF oVM.giStudents
TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<li ||IIF(oUser.gaPass[35] = .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'studset.scx')"><a href="#"><span>Students</span></a></li>
ENDTEXT
ENDIF

TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15

<li onclick="FoxInCloud.FormDisplay(event, 'reports.scx')"><a href="#"><span>Reports</span></a></li>
<li class="disabled"><a href="#"><span>Parlor Meetings</span></a></li>
<li class="disabled"><a href="#"><span>Vaad HaTzedakos</span></a></li>
<li class="disabled"><a href="#"><span>Checkbook</span></a></li>
<li class="disabled"><a href="#"><span>Calendar</span></a></li>
</ul>
</li>
<li><a href='#'><span>Financial</span></a>
<ul>
<li ||IIF(oUser.gaPass[22]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'invoice.scx')"><a href="#"><span>Print Bills</span></a></li>
<li ||IIF(oUser.gaPass[23]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'statement.scx')"><a href="#"><span>Print Statements</span></a></li>
<li ||IIF(oUser.gaPass[24]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'receipt.scx')"><a href="#"><span>Print Receipts</span></a></li>
<li class='disabled' ><a href="#"><span>End of Day CC Processing</span></a></li>
<li class='disabled' onclick="FoxInCloud.FormDisplay(event, 'ccprocess.scx')" ><a href="#"><span>Process Pending CC/EFT</span></a></li>
<li class='disabled' ><a href="#"><span>Replace Fund Types</span></a></li>
<li ||IIF(oUser.gaPass[76]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'deposit.scx')"><a href="#"><span>Create Deposit</span></a></li>
<li ||IIF(oUser.gaPass[83]= .f. or oVM.gUseReceiptSeries = .f., "class='disabled'", "")|| ><a href="#"><span>Assign Receipt Number by Series</span></a></li>
</ul>
</li>
<li><a href='#'><span>Banquet</span></a>
<ul>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, '|| IIF(oVM.gIndividualBanqEntry, 'banqtab2.scx', 'banqtab.scx')||')" ><a href="#"><span>Batch Table Entry</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'repltabl.scx')"><a href="#"><span>Batch Table Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. or oVM.gInvSubFromDonor = .t., "class='disab'", "")||onclick="FoxInCloud.FormDisplay(event, 'rephon.scx')" ><a href="#"><span>Batch Honoree Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")||><a href="#"><span>Update Flags for Honorees</span></a></li>
</ul>
</li>

* etc . . . . . .

we have a menu css file and we end up with menus:


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...





Gravatar is a globally recognized avatar based on your email address. Re: New graphical menu...
  Tuvia Vinitsky
  Tuvia Vinitsky
  Oct 29, 2014 @ 12:27pm
I also forgot the updating. A form calls a method that does this:

xMenu = get_menu(lcName)
* need to escape the double quotes
xMenu = STRTRAN(xMenu, '"', '\"')

if wlAjax()
AJAX.cScriptJSAdd(textmerge([$('mainmenu').update("");]))
* TBV jquery version:
*AJAX.cScriptJSAdd(textmerge([$('#mainmenu').html("");]))
ENDIF



Not really. I'll try and make a public site later today if I can.


Tuvia, do you have a site where i can see it ?


Michele.

You certainly could do that with a VFP menu I would imagine.

We started our menu system before FiC supported VFP menus, so we used a CSS based menu that could do what you wish. In xxxserver.wFormHTML_cheader we put this:


LOCAL lcresult1


lcResult1 = "<div id='mainmenu' class='cssmenu'>"+get_menu(lcname)+"</div>"


RETURN lcResult1


The function get_menu then looks something like this: (ouser has security rights for this user)

PROCEDURE get_menu()
LPARAMETERS tName

* Called for master forms from the header proc (vm5serves.prg). That sets a
* div, and child forms have a method that uses the prototype update to replace the
* contents of a specified div.

*<a href="nameset.vm5"> for master forms
*IntuiCat.FormDisplay(event, 'nameset_scx', '.t.'); for child forms

LOCAL lcresult1
lcResult = ''

SET TEXTMERGE DELIMITERS TO "||" , "||" && 2 char max

IF EMPTY(ALLTRIM(tName))
TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li ><a href="#"><span>File</span></a> <ul>
<li><a href="#"><span>Please login</span></a></li>
</ul>
</li>
</ul>
ENDTEXT
ELSE && user has logged on

TEXT TO lcResult1 TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<ul>
<li><a href="#"><span>File</span></a>
<ul>
<li ||IIF(oUser.gaPass[1] =.f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'nameset.scx')"><a href="#"><span>Accounts</span></a></li>
ENDTEXT
IF oVM.giStudents
TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15
<li ||IIF(oUser.gaPass[35] = .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'studset.scx')"><a href="#"><span>Students</span></a></li>
ENDTEXT
ENDIF

TEXT TO lcResult1 ADDITIVE TEXTMERGE NOSHOW FLAGS 1 PRETEXT 15

<li onclick="FoxInCloud.FormDisplay(event, 'reports.scx')"><a href="#"><span>Reports</span></a></li>
<li class="disabled"><a href="#"><span>Parlor Meetings</span></a></li>
<li class="disabled"><a href="#"><span>Vaad HaTzedakos</span></a></li>
<li class="disabled"><a href="#"><span>Checkbook</span></a></li>
<li class="disabled"><a href="#"><span>Calendar</span></a></li>
</ul>
</li>
<li><a href='#'><span>Financial</span></a>
<ul>
<li ||IIF(oUser.gaPass[22]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'invoice.scx')"><a href="#"><span>Print Bills</span></a></li>
<li ||IIF(oUser.gaPass[23]= .f. , "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'statement.scx')"><a href="#"><span>Print Statements</span></a></li>
<li ||IIF(oUser.gaPass[24]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'receipt.scx')"><a href="#"><span>Print Receipts</span></a></li>
<li class='disabled' ><a href="#"><span>End of Day CC Processing</span></a></li>
<li class='disabled' onclick="FoxInCloud.FormDisplay(event, 'ccprocess.scx')" ><a href="#"><span>Process Pending CC/EFT</span></a></li>
<li class='disabled' ><a href="#"><span>Replace Fund Types</span></a></li>
<li ||IIF(oUser.gaPass[76]= .f., "class='disabled'", "")|| onclick="FoxInCloud.FormDisplay(event, 'deposit.scx')"><a href="#"><span>Create Deposit</span></a></li>
<li ||IIF(oUser.gaPass[83]= .f. or oVM.gUseReceiptSeries = .f., "class='disabled'", "")|| ><a href="#"><span>Assign Receipt Number by Series</span></a></li>
</ul>
</li>
<li><a href='#'><span>Banquet</span></a>
<ul>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, '|| IIF(oVM.gIndividualBanqEntry, 'banqtab2.scx', 'banqtab.scx')||')" ><a href="#"><span>Batch Table Entry</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")|| onclick="FoxInCloud.FormDisplay(event, 'repltabl.scx')"><a href="#"><span>Batch Table Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. or oVM.gInvSubFromDonor = .t., "class='disab'", "")||onclick="FoxInCloud.FormDisplay(event, 'rephon.scx')" ><a href="#"><span>Batch Honoree Replace</span></a></li>
<li ||IIF(oUser.gaPass[74]= .f. , "class='disab'", "")||><a href="#"><span>Update Flags for Honorees</span></a></li>
</ul>
</li>

* etc . . . . . .

we have a menu css file and we end up with menus:


I have to think a new menu for my app. My customers ask for a menu similar to a treeview...or like that shown in the image below...






© 1996-2024