Context menu for output fields?

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
eduardorama
Posts: 13
Joined: 19 Aug 2020, 11:26

Context menu for output fields?

Post by eduardorama »

How do I enable the browser's context menu for output field?
I enabled this option in Application > Basic eXtensions
enabled contextmenu.PNG
enabled contextmenu.PNG (16.88 KiB) Viewed 6603 times
But it works only for non read-only Input and textarea.

I tried to remove the highlighted code below in axuser.min.js but it didn't work.
axuser.min.js line.PNG
axuser.min.js line.PNG (11.78 KiB) Viewed 6603 times
I suspect that it might be somewhere in axdev.min.js but I still can't figure it out.
Fairdinkum
Posts: 128
Joined: 24 Jul 2017, 17:02

Re: Context menu for output fields?

Post by Fairdinkum »

Hi eduardorama,

Try the following.

(onApplicationStart)

Code: Select all

/*
 * 右クリックメニュー(Context Menu)の有効化
 * Enable the context menu
 */
document.addEventListener('contextmenu',function(e){e.stopPropagation();},true);
Image 1610.png
Image 1610.png (48.74 KiB) Viewed 6584 times
HTH!

Regards,
Hide
eduardorama
Posts: 13
Joined: 19 Aug 2020, 11:26

Re: Context menu for output fields?

Post by eduardorama »

Hi Fairdinkum,

Thank you, it did work.

However, when I applied it onApplicationStart, it applied as well to edit mode/edit screen.
If it's possible, we want it only to work for the users and not affecting the designer's contextmenu (add user field /revert to default).
Fairdinkum
Posts: 128
Joined: 24 Jul 2017, 17:02

Re: Context menu for output fields?

Post by Fairdinkum »

Hi Eduardorama,

If that's the case, try the code below.

Code: Select all

/*
 * 右クリックメニュー(Context Menu)の有効化
 * Enable the context menu
 */
if ( !AXES.isDeveloper() ){
    document.addEventListener('contextmenu',function(e){e.stopPropagation();},true);
}
You might want to clear the cache before this testing.

I hope this will help.

Regards,
Hide
eduardorama
Posts: 13
Joined: 19 Aug 2020, 11:26

Re: Context menu for output fields?

Post by eduardorama »

Hi Fairdinkum,

That did the trick.

Thank you so much for the help.
Post Reply