Can We Disable the Close?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Can We Disable the Close?

Post by cishpix »

Hi....

I have a guest access like below screen
Guest-VP.png
Guest-VP.png (7.69 KiB) Viewed 14647 times
As I want, the guest user cannot click the close button on the title bar or set the button invisible on the title bar. Can we do like that?
Thank you
Regards,

Suwandy
-----------------
Kisaran - Indonesia
ORS61
Posts: 15
Joined: Fri Dec 18, 2015 9:35 pm
Location: Trabzon

Re: Can We Disable the Close?

Post by ORS61 »

Add below code to render script of your form. This will hide all menu items in panel toolbox including close button.

$(".k-window-actions").css ("display", "none");
pureist
Posts: 427
Joined: Sun Jan 24, 2016 10:00 pm

Re: Can We Disable the Close?

Post by pureist »

..but the user pressing Esc will still close it.
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Can We Disable the Close?

Post by cishpix »

ORS61 wrote:Add below code to render script of your form. This will hide all menu items in panel toolbox including close button.

$(".k-window-actions").css ("display", "none");
Very appreciate for you, it's really work. Thank you

pureist wrote:

Code: Select all

..but the user pressing Esc will still close it.
Yes, I know it but do you have any idea to prevent it?
Regards,

Suwandy
-----------------
Kisaran - Indonesia
ORS61
Posts: 15
Joined: Fri Dec 18, 2015 9:35 pm
Location: Trabzon

Re: Can We Disable the Close?

Post by ORS61 »

Use this script to disable esc key. Paste it to bottom of startup.html file just before </body>
This will disable esc key for your popups. I'm not an expert, it may have negative affects.

<script>
$(function () {
kendo.ui.Window.fn._keydown = function (originalFn) {
var KEY_ESC = 27;
return function (e) {
if (e.which !== KEY_ESC) {
originalFn.call(this, e);
}
};
}(kendo.ui.Window.fn._keydown);
});
</script>
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Can We Disable the Close?

Post by aware_support »

If this is the process, there is a setting on the properties of the process to disallow users to cancel the process.
Aware IM Support Team
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Can We Disable the Close?

Post by cishpix »

ORS61 wrote:Use this script to disable esc key. Paste it to bottom of startup.html file just before </body>
This will disable esc key for your popups.
Thank you for your response. I think you're really familiar with the basic of javascript but I just think the script will effect all of other applications, is it right?

aware_support wrote:If this is the process, there is a setting on the properties of the process to disallow users to cancel the process.
Yeah... Support are right, it's the process.
I have test it before (remove the tick on 'Allow user to cancel the process' checkbox) but I still can cancel the form from 'esc' button on keyboard or click close button on the title bar of the form (if I don't use ORS61's trick).
Regards,

Suwandy
-----------------
Kisaran - Indonesia
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Can We Disable the Close?

Post by aware_support »

If you are not running the latest build - update. There was a fix for this in one of the latest builds.
Aware IM Support Team
cishpix
Posts: 183
Joined: Fri Nov 06, 2015 5:07 am
Location: Indonesia

Re: Can We Disable the Close?

Post by cishpix »

aware_support wrote:If you are not running the latest build - update. There was a fix for this in one of the latest builds.
I have test it on the latest version (build 2229) but I still can cancel the process from 'Esc' button on keyboard.
Regards,

Suwandy
-----------------
Kisaran - Indonesia
pureist
Posts: 427
Joined: Sun Jan 24, 2016 10:00 pm

Re: Can We Disable the Close?

Post by pureist »

To be specific, despite any 'fix' which supposedly occurred, NOT enabling the 'Allow user to cancel process' setting for a Process ONLY has the effect of removing the Cancel Button from the popup.

It does not also (as it should according to the description of the setting) prevent the X from appearing in the Title Bar of the popup as well as presses of the the Esc key to be ignored.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Can We Disable the Close?

Post by aware_support »

Code: Select all

I have test it on the latest version (build 2229) but I still can cancel the process from 'Esc' button on keyboard.
This should be fixed in build 2235
Aware IM Support Team
Post Reply