Change Label on Default Cance on Mobile

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Change Label on Default Cance on Mobile

Post by BLOMASKY »

When I click the hamburger menu on a mobile query, the operations with records open on the bottom, all is good, The system adds a default "CANCEL" to the end of the list. My question is: Can I either change the label or can I eliminate this option. I need to have a "Cancel" option for my users and it is confusing with 2 cancels.
Screen Shot 2021-07-22 at 4.26.34 PM.png
Screen Shot 2021-07-22 at 4.26.34 PM.png (182.52 KiB) Viewed 1646 times
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Change Label on Default Cance on Mobile

Post by aware_support »

At the moment you can only do it by either changing Aware IM code directly or overriding it in a custom Javascript file.

If you do this, though, it will apply to ALL mobile queries in all your applications. If you want to do it for a particular query only let me know and maybe I will think of something. So to change the code directly open the file AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/customMobileParser.js and search for "AwareApp.Locale["CE_Cancel"]". You will find this:

var wc = {
cancel: AwareApp.Locale["CE_Cancel"],
command: function (o) {
me.onActionSheetClick (o);
}
};

Either remove the cancel property:

var wc = {
command: function (o) {
me.onActionSheetClick (o);
}
};

or change it:

var wc = {
cancel: "My Cancel",
command: function (o) {
me.onActionSheetClick (o);
}
};

Then make sure you clear the browser cache and refresh the browser
Aware IM Support Team
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Change Label on Default Cance on Mobile

Post by Jaymer »

Vlad
This is helpful - thx.
What would be the variable/function to check for the current application/BSV name?

IF (BSV_NAME == 'APP1') { then remove the cancel action }

... or the Class of the form this is being called from?
Its from a Custom Query / Hamburger Menu, so if we classed ONLY this query, maybe we could conditionally hide it then? ... so it wont affect ALL queries system-wide.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Change Label on Default Cance on Mobile

Post by aware_support »

This is how you can get the name of the business space:

var businessSpaceName = getAttributeValue (AwareApp.m_statusHeader, "business_space_raw", null);
Aware IM Support Team
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Change Label on Default Cance on Mobile

Post by BLOMASKY »

Thanks Vlad. That will work for now.

Bruce
Post Reply