How to call screen action when a user clicks popup close(x)?

How to call screen action when a user clicks popup close(x)?

  
Hi.

I have a popup where the user must check an input.

If the user tries to close the popup without checking the input I want to do some logic in a screen action.

I've already looked at this topic http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=Popup-window-close-button-does-not-fire-an-event%3F but it's not quite what I want.

I want to prevent the popup from closing and instead do my logic. Any thoughts on this?

Thanks



Hi João,

In the 7.0 version of the RichWidgets the popup editor has a parameter to remove the close button of the popup.
If you really want to run code when the user clicks there you probably will have to unbind the click event and register your own.

But pay attention that the "x" button is not inside the popup page. It's rendered outside the iframe, so you shouldn't have logic there that depends on the popup itself.


Regards,
João Rosado
It's nice to know that version 7.0 has that new option, but I'm using version 6.0 for now.

Going back to my original question... can you give me an example of how to register my own event when "x" is clicked?

Regards,
João H.
João Rosado wrote:
Hi João,

In the 7.0 version of the RichWidgets the popup editor has a parameter to remove the close button of the popup.
If you really want to run code when the user clicks there you probably will have to unbind the click event and register your own.

But pay attention that the "x" button is not inside the popup page. It's rendered outside the iframe, so you shouldn't have logic there that depends on the popup itself.


Regards,
João Rosado
 
Hi. 
I'm using version 6 and i would like to remove the popup close (x), can it be done? If so how?
Regards
Rodrigo Henriques

 
Rodrigo Henriques wrote:
 
Hi. 
I'm using version 6 and i would like to remove the popup close (x), can it be done? If so how?
Regards
Rodrigo Henriques

 
 
 Hello Rodrigo,

maybe there is an easy and fast way to do it, but I think that it's not the most beautiful way to do it :)

in your stylesheet add up this:

.ui-dialog-titlebar-close-no-title{
display: none !important;
}

this if you're using a popup without title. If you are using title probably the class that you want to overwrite is "ui-dialog-titlebar-close" I'm not sure, but you could easily inspect element on the "x" and see what class it's using.

Explanation:
This way you will be overwriting the display attribute of that class to none, this way the "x" will be rendered but will remain hidden.

lets us know if this works for you!

cheers,
Miguel
Hi João and Rodrigo,

I think that the easiest way to do it, and perhaps the easiest to maintain, is for you to copy the component from the Richwidgets into one of your eSpaces and do the changes in the action onclose or just remove the close link. The down side of this solution, is that changes done on richwidgets, improvements on the pop-up and so on, will have to be merged by you.

Hope that this helps,

Cheers,

Rúben