Be able to use tabulation with Menu

Use this Forum to post your “How to …” questions about your use of aXes. This is not a technical support forum. Both the aXes Support Team at LANSA and other aXes customers may answer your questions. LANSA cannot guarantee the accuracy of any information posted by customers.

Moderator: jeanmichel

Post Reply
JMB
Posts: 3
Joined: 01 Oct 2018, 19:34

Be able to use tabulation with Menu

Post by JMB » 21 Aug 2019, 01:16

aXes 3.11

We have a customer who wants to use tabulations on their menus.
He has used Link extensions to replace all menu options.
And after that he has defined in USERENV.js a list and a function to retrieve the value and the Option description.

Apparently that works.

He can move in the menu and do Enter to open the option of the menu.

The customer wanted to know if you think that a better, simpler solution exist?

Thanks for comments and advices

User avatar
jeanmichel
Posts: 97
Joined: 23 May 2014, 11:37
Location: Sydney

Re: Be able to use tabulation with Menu

Post by jeanmichel » 21 Aug 2019, 18:37

HI JM,

Can you give us some more information and the example in the userenv?
I find it difficult to see what is happening.
Regards,

Jean-Michel Rapin

LANSA Pty Ltd
email: JeanMichel.Rapin@lansa.com.au
Address: 122 Arthur Street, North Sydney, NSW 2060, Australia
Tel: +61 289 070 262 http://www.lansa.com | http://blog.lansa.com |

JMB
Posts: 3
Joined: 01 Oct 2018, 19:34

Re: Be able to use tabulation with Menu

Post by JMB » 22 Aug 2019, 18:35

Hi Jean-Michel,
I have asked to the customer more informations.

But I'm afraid that I couldn't get more. This a customer who wants always more explanations and advices. But he doesn't never find time to provide supplementary informations.
:?

JMB
Posts: 3
Joined: 01 Oct 2018, 19:34

Re: Be able to use tabulation with Menu

Post by JMB » 22 Aug 2019, 22:58

Hi Jean-Michel,

the instructions used by the customer:

On the OnArrive Event :

var i = 0;
var num_opt = 0;
var nbr_elt_tab = USERENV.TabOpt_Popup.length - 2;

$("a").focus(function()
{

if(i<=nbr_elt_tab)
{
i ++;
}
else
{
i = 1;
}

num_opt = USERENV.TabOpt_Popup;
FIELDS("a1").setValue(num_opt);

});


Within USERENV.js :

TabOpt_Popup : [],

TabNumOpt_Popup: function(string) {
if (USERENV.TabOpt_Popup[0] == null) {
USERENV.TabOpt_Popup[0] = "0";
}

//var temp_array = [];
if (string.length > 0) {
//temp_array = string.split(". ");
//string = temp_array[1].trim();
//USERENV.TabOpt_Popup.push(temp_array[0]);

num_opt = string.substr(0, 1);

string = string.substr(2).trim();
USERENV.TabOpt_Popup.push(num_opt);

}

return string;
},

In the Caption of element :

USERENV.TabNumOpt_Popup(FIELD.getValue());


On the OnLeave Event :

USERENV.TabOpt_Popup = [];

Post Reply