Page 1 of 1

OnClick Button -> Disable Button -> show wait animation

PostPosted: 18 Aug 2016 11:43
by jorgo
Hi,

I want the basic functionallity of a button:
- Click on button
- disable button (prevent more clicks)
- show a wait animation (e.g. your bubbles in a circle)

My steps:

1.) Place "IWCGJQLockIndicator1" on ServerController
- Add a new item to property Indicators

2.) Add a OnClick event for JQButtonOptions
- Select prop. Indicator as IWServerController.IWCGJQLockIndicator1
- Select prop. IndicatorIndex = 0

3.) JQButtonOptions OnClick event handler

Code: Select all
procedure TIWForm1.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
begin
    IWCGJQButton1.JQButtonOptions.Disabled := true;
    IWCGJQButton1.AjaxReRender(False, True);

    Sleep(3000);
end;


I expected following sequence:
- button disabled
- wait animation for 3 seconds

What must I change to get it runing?

Kind regards

Re: OnClick Button -> Disable Button -> show wait animation

PostPosted: 18 Aug 2016 11:50
by Alexander Bulei
Hello,

You don't need use the disabled property, since the lock indicator will lock whole page.

You don't see the lock animation?

Best Regards.

Re: OnClick Button -> Disable Button -> show wait animation

PostPosted: 18 Aug 2016 15:40
by jorgo
Hi,

if I set it in object inspector I see nothing.
If I set it during runtime it's working:

Code: Select all
procedure TIWForm1.IWAppFormCreate(Sender: TObject);
begin
   IWCGJQButton1.JQButtonOptions.OnClick.Indicator:= IWServerController.IWCGJQLockIndicator1;
   IWCGJQButton1.JQButtonOptions.OnClick.IndicatorIndex:= 0;
end;


1.) Question: Is it possible to get an "Overlay screen" + "image" without that bordered-region around the image?
2.) Question: Is it possible to change the backcolor of the "Overlay screen"? (A soft blue or green would be my wish)

Kind regards

Re: OnClick Button -> Disable Button -> show wait animation

PostPosted: 18 Aug 2016 16:31
by Alexander Bulei
Hi,

IWServerController.IWCGJQLockIndicator1


Since you have it on IWServerController, you need always set in run-time.

1.) Question: Is it possible to get an "Overlay screen" + "image" without that bordered-region around the image?


What are you talking about?

2.) Question: Is it possible to change the backcolor of the "Overlay screen"? (A soft blue or green would be my wish)


Yes, check the OverlayCss property of Item, and add the background color.

E.g:

Code: Select all
"background":"#000000"


Best Regards.