Hi,
In boostrap mode, it does not seem possible to generate contextuel menu with DEFINE POPUP ... SHORTCUT
Is there a workaround?
Thanks in advance
Hi Vincent,
In VFP, shortcut
makes a difference between a popup that depends on a menu pad or popup bar -vs- a popup that can be displayed anywhere at a given mrow(), mcol()
, however it makes no difference in web mode.
For this reason we generate the same HTML for shortcut
and regular popups.
What do you expect from the shortcut
clause?
Thank's Thierry.
I wish to execute a code like this:
DEFINE POPUP raccourci SHORTCUT RELATIVE FROM MROW(), MCOL()
DEFINE BAR 1 OF raccourci PROMPT "Libellé 1"
DEFINE BAR 2 OF raccourci PROMPT "Libellé 2"
DEFINE BAR 3 OF raccourci PROMPT "\-"
DEFINE BAR 4 OF raccourci PROMPT "\<Annuler" PICTURE IClose
ON SELECTION POPUP raccourci STORE PROMPT () TO Mprompt && Variable publique
ACTIVATE POPUP raccourci
Even with wMenu("ACTIVATE POPUP raccourci", @m.wMenuResult), what's going on Bootstrap ?
Hi Vincent,
Thanks for your detailed issue report and code sample.
We had a bug in supporting the FROM
clause in command DEFINE POPUP raccourci SHORTCUT RELATIVE FROM MROW(), MCOL()
Now fixed as you can test by right-clicking in FoxInCloud Live Tutorial's Keypress form (running your code)
We'll soon release V 2.26.2-beta.1
including this fix.
update notice: mobile devices such as tablet don't really support .rightClick()
.
Hi Thierry,
Thank's for your answer. It will be fine, as usual ...
V 2.26.2-beta.1
just released…
I saw that and I can not wait to see the result ...
This code is called by a click on a button but nothing append in Web Mode:
wMenu('DEFINE POPUP Praccourci SHORTCUT RELATIVE FROM MROW(), MCOL()')
wMenu('DEFINE BAR 1 OF Praccourci PROMPT "Libellé 1"')
wMenu('DEFINE BAR 2 OF Praccourci PROMPT "Libellé 2"')
wMenu('DEFINE BAR 3 OF Praccourci PROMPT "\-"')
wMenu('DEFINE BAR 4 OF Praccourci PROMPT "\<Annuler"')
wMenu('ON SELECTION POPUP Praccourci STORE PROMPT () TO Mprompt')
wMenuReturn = wMenu("ACTIVATE POPUP Praccourci", "")
Something wrong ?
Did you see the code in ficTuto > keypress.scx > .rightClick() ?
yes and how to make the popup appear in bootstrap mode ?
in classic mode no worries but I do not get in bootstrap
please try
wMenu('ON SELECTION POPUP Praccourci STORE wMenu('PROMPT()') TO Mprompt')
instead of
wMenu('ON SELECTION POPUP Praccourci STORE PROMPT () TO Mprompt')
also wMenu()
returns a success code (.T. / .F.
), you better check it as here:
local success, result
success = .T.;
and wMenu(textmerge([DEFINE POPUP raccourci SHORTCUT RELATIVE FROM MROW(), MCOL()]), @m.result);
and wMenu(textmerge([DEFINE BAR 1 OF raccourci PROMPT "Libellé 1"]), @m.result);
and wMenu(textmerge([DEFINE BAR 2 OF raccourci PROMPT "Libellé 2"]), @m.result);
and wMenu(textmerge([DEFINE BAR 3 OF raccourci PROMPT "\-"]), @m.result);
and wMenu(textmerge([DEFINE BAR 4 OF raccourci PROMPT "\<Annuler" PICTURE ]), @m.result); && expand iClose to its value
and wMenu(textmerge([ON SELECTION POPUP raccourci STORE wMenu('PROMPT()') TO mPrompt]), @m.result); && mPrompt is a public variable
and wMenu(textmerge([ACTIVATE POPUP raccourci]), @m.result)
assert m.success message cAssertMsg(m.result) && in case of a problem in wMenu(), tells you the reason for error
Thanks Thierry, however, I have not managed to activate this popup in bootstrap mode in your ficTuto
can't you see this?
Only in classic mode
which version do you use?
F5?
2.26.2-beta.1
Firefox or Chrome, the problem is identic
what about http://foxincloud.com/tutotest/bs/Keypress.tuto
can you see the context menu there?
Yes
I do from this adress
please open your browser development tools and check for a JavaScript error (red in console pane)
Hi Thierry,
From this url: http://foxincloud.com/tutotest/bs/, I get this:
Blocage du chargement du contenu mixte actif (mixed active content) « http://foxincloud.com/awScripts/bower/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 »
Thanks for this feedback
I'm aware of this "error"; however it only deals with a font and should not have any impact on the contextual menu display.
what about http://foxincloud.com/tutotest/bs/Keypress.tuto
can you see the context menu there?
Not yet
Hi Thierry,
Strange, it works fine from http://foxincloud.com/tutotest/bs/Keypress.tuto but not from http://foxincloud.com/tutotest/bs/ and "Raccourcis clavier"
Thanks for the feedback;
In fact popup is behind the child form; we need to move it closer on the z-index: you can try this in the browser console:
jQuery('#popup-raccourci').css('z-index', '2000');
Not better. But you have a display: none
in .dropdown-menu. Unchecked and this is displayed well
Increasing z-index seems to do the trick: http://foxincloud.com/tutotest/bs/ > "Keyboard shortcuts / Raccourcis clavier"