mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-04-18 19:29:21 +02:00
* Use correct properties for OK button, and close on cancel button click
This commit is contained in:
parent
2a0eb561d5
commit
54b6dbb3c8
@ -108,6 +108,7 @@ Type
|
||||
Procedure Hide;
|
||||
Function HTMLTag : String; override;
|
||||
Property Showing : Boolean Read FShowing;
|
||||
Property Reference;
|
||||
// Id of the modal toplevel element. If not set, the first child is used.
|
||||
Published
|
||||
Property ParentID;
|
||||
@ -472,7 +473,10 @@ begin
|
||||
NList:=Element.querySelectorAll('.modal-background, .modal-close, .modal-card-head .delete');
|
||||
for I:=0 to Nlist.length-1 do
|
||||
TJSHTMLElement(NList.Nodes[i]).addEventListener('click',@HideClick);
|
||||
E:=References.FindElementByName('OK');
|
||||
E:=References.FindElementByName(OKButtonName);
|
||||
if (E<>Nil) then
|
||||
E.addEventListener('click',@HideClick);
|
||||
E:=References.FindElementByName(CancelButtonName);
|
||||
if (E<>Nil) then
|
||||
E.addEventListener('click',@HideClick);
|
||||
for I:=0 to References.Count-1 do
|
||||
|
Loading…
Reference in New Issue
Block a user