Modal Mask on controls

Answered
0
0

Hi.

I have a Page with a NavigationBar docked on its left, a Panel docked on its top and a Desktop control set to Fill the inside area. This works great as none of the open forms will ever be able to be position on the top of the NavigationBar and the Menu in the Panel on the top. I have one problem though, when we open a Modal dialog, the Modal Mask will only be applied to the controls inside the Desktop control.

I have followed Luca’s advice and am able to intercept the Application.EnterThreadModal and LeaveThreadModal events to take care of the external controls of the Desktop. So, I am trying to find a way to set a Modal Mask on top of the NavigationBar and the top Panel. Would anyone have some directions on how I could accomplish that?

Thanks in advance.

Ivan

  • You must to post comments
Best Answer
0
0

Hi Ivan,

All Wisej widgets can be blocked (see ShowLoader property). However, the standard blocker shows the ajax loader. The blocker (modal mask) you see on the desktop is a special one managed by the window manager because it’s not just a simple blocker, it has to be be moved up/down the z-index depending on the order the modals and popups and forms are created.

You can try this:

this.navBar.Eval(“this.getBlocker().setBackgroundImage(null);this.getBlocker().block();”);

and

this.navBar.Eval(“this.getBlocker().unblock();”);

block() and unblock() use a counter. To force the unblocking regardless of the counter use

this.navBar.Eval(“this.getBlocker().forceUnblock();”);

Note that if the  user hits refresh the calls you made to javascript are lost.

Another way could be this:

  1. In the InitScript property of the NavigationBar put “this.getBlocker().setBackgroundImage(null);”
  2. Now you can use the property this.NavigationBar.ShowLoader = true/false.

HTH

– Everything is possible with Wisej 🙂

 

 

 

 

  • Ivan Borges
    Hey Luca! That is all great information. I will play with it and let you know. Thank you!
  • You must to post comments
0
0

That is true!
It worked like a charm.

Thank you.

  • You must to post comments
0
0

If you use the last option it is automatically persisted also across a refresh:

  1. In the InitScript property of the NavigationBar put “this.getBlocker().setBackgroundImage(null);”
  2. Now you can use the property this.NavigationBar.ShowLoader = true/false.
  • You must to post comments
0
0

Hi Luca.

Yep, it worked as you stated. And hitting refresh does break the desired results. So, I decided to work on the Enabled property of each element on those controls and set them to False/True whenever a Modal comes into play. So, this way I still get the Modal Mask inside the Desktop control and individual items Disabled in the NavBar and Menu outside it and this won’t be affected by a Refresh.

Thank you!

Best.

Ivan

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.