Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New demo has been published
#1
A new demo has been published showing some new features introduced on version 15.3.10 that we have just released:

https://github.com/Atozed/IntraWeb/tree/...i/IWLocker

This has been a (very) frequent request from users that allow more control over the "page locking mechanism" (aka loading animation) in IntraWeb applications. 

Some users go a long way in order to have a customized version on their application. We believe that the new feature will eliminate the need for complicated 3rd party libraries and workarounds (yes, I'm talking to you, "HoldOn" user  Tongue ).

Enjoy  Big Grin
Reply
#2
(07-10-2023, 09:30 AM)Alexandre Machado Wrote: A new demo has been published showing some new features introduced on version 15.3.10 that we have just released:

https://github.com/Atozed/IntraWeb/tree/...i/IWLocker

This has been a (very) frequent request from users that allow more control over the "page locking mechanism" (aka loading animation) in IntraWeb applications. 

Some users go a long way in order to have a customized version on their application. We believe that the new feature will eliminate the need for complicated 3rd party libraries and workarounds (yes, I'm talking to you, "HoldOn" user  Tongue ).

Enjoy  Big Grin

Hello, 

Related to this question if i have got a callback called by showconfirm instruction, how can tell the ajax call to show the locker?
Thank you very much.

Blanca
Reply
#3
(07-11-2023, 08:52 AM)Blanca80 Wrote: Hello, 

Related to this question if i have got a callback called by showconfirm instruction, how can tell the ajax call to show the locker?
Thank you very much.

Blanca

Hi Blanca,

that's a good question.

Here's how:

Code:
procedure TIWForm1.ShowConfirmationWithCallback(const Msg: string);
var
  jsCallbackCode: string;
begin
  jsCallbackCode := 'javascript:ajaxCall(''MyConfirmCallback'', '''', {text:''Please wait until MyConfirmCallback returns''});';
  WebApplication.ShowConfirm(Msg, jsCallbackCode, Title, 'Yes', 'No');
end;

basically you call ShowConfirm() the same way, but instead of passing the callback method name (the Delphi callback registered previously), you pass the actual code (JavaScript) that will execute the callback call, preceded by a "javascript:" prefix.

I'll update our NewDialogs demo to show a case like this.

Please notice that the js callback code is using single quotes as JavaScript string delimiter. That's because internally our code is not escaping the double quotes (Something that I'll fix).

Cheers
Reply
#4
The NewDialogs demo has been updated to also show this feature:

https://github.com/Atozed/IntraWeb/tree/...NewDialogs

Enjoy  Big Grin
Reply
#5
(07-11-2023, 11:48 PM)Alexandre Machado Wrote: The NewDialogs demo has been updated to also show this feature:

https://github.com/Atozed/IntraWeb/tree/...NewDialogs

Enjoy  Big Grin

Thank you very much i'll take a look

(07-11-2023, 09:58 PM)Alexandre Machado Wrote:
(07-11-2023, 08:52 AM)Blanca80 Wrote: Hello, 

Related to this question if i have got a callback called by showconfirm instruction, how can tell the ajax call to show the locker?
Thank you very much.

Blanca

Hi Blanca,

that's a good question.

Here's how:

Code:
procedure TIWForm1.ShowConfirmationWithCallback(const Msg: string);
var
  jsCallbackCode: string;
begin
  jsCallbackCode := 'javascript:ajaxCall(''MyConfirmCallback'', '''', {text:''Please wait until MyConfirmCallback returns''});';
  WebApplication.ShowConfirm(Msg, jsCallbackCode, Title, 'Yes', 'No');
end;

basically you call ShowConfirm() the same way, but instead of passing the callback method name (the Delphi callback registered previously), you pass the actual code (JavaScript) that will execute the callback call, preceded by a "javascript:" prefix.

I'll update our NewDialogs demo to show a case like this.

Please notice that the js callback code is using single quotes as JavaScript string delimiter. That's because internally our code is not escaping the double quotes (Something that I'll fix).

Cheers
Hello Alexandre, 

I've tested on our application but i find a problem that makes impossible to use it for now. The parameter retvalue in the eventparams list when entering the callback had disappeared when calling showconfirm on this way and it's impossible to know wich button the user has pressed. 
I attach a pdf with the both event params list. 

Thank you.


Attached Files
.pdf   EventParams_retvaluemissing.pdf (Size: 61.79 KB / Downloads: 9)
Reply
#6
Yes, I missed that small detail...

The demo has been updated in our Git repo and it is working now as you expect.

https://github.com/Atozed/IntraWeb/tree/...NewDialogs
Reply
#7
hello i've got one more question about this demo and i hope you can answer.
The default behaviour of the application is to show the locker in all syncronous events when enabled from
servercontroller. How it is posible that it is also showed in the ajax call of the button, that is asynchronous?

thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)