Jump to content

Hayri ASLAN

Moderators
  • Posts

    1577
  • Joined

  • Last visited

  • Days Won

    134

Everything posted by Hayri ASLAN

  1. Please check console. Do you have any error?
  2. Hello, Can you please specify which editon and build of UniGUI are you using?
  3. Hello, Can you please specify which editon and build of UniGUI are you using?!
  4. Hi Please check this example and modify based on your appid. UniOneSignal.rar
  5. Hello, I'm working on onesignal. I will share example soon. It is not that much easy to implement
  6. You can create simple android app and add webview on it.
  7. It is not in the next 2 sprint. Most likely after that.
  8. Hi, I already answered that. "please add ssl libraries to folder."
  9. Hi, What question you are waiting for answer?
  10. First of all, please adjust your forum email address: http://forums.unigui.com/index.php?/topic/6291-new-users-please-adjust-your-forum-email-address/
  11. UniSession.AddJS('setTimeout(function () { '+ ' try { '+ ' var ct = '+UniDBGrid1.JSName+'.headerCt; '+ ' ct.setMaxHeight(50); '+ ' } catch (err) {} '+ ' }, 1);');
  12. Hi, Can you try this? with UniPDFFrame1, JSInterface do begin UniSession.AddJS('var pdfApp = document.getElementsByName('+JSName+'.ifName)[0].contentWindow.PDFViewerApplication; '+ ' pdfApp.findBar.open(); '+ ' pdfApp.findBar.findField.value = "large"; '+ ' pdfApp.findBar.caseSensitive.checked = true; '+ ' pdfApp.findBar.highlightAll.checked = true; '+ ' pdfApp.findBar.findNextButton.click();'); end;
  13. Can you try this? THackDBGrid(UniDBGrid1).SetColumnsChanged; UniSession.AddJS('var ct='+UniDBGrid1.JSName+'.headerCt; '+ 'try {ct.setMaxHeight(50);} catch (err) {}');
  14. Hello type THackDBGrid = Class(TUniDBGrid); When you enable/disable filter, call THackDBGrid(UniDBGrid1).SetColumnsChanged;
  15. We will implement this. It is in our backlog.
  16. Hi, Are you using UniNumberEdit or UniSpinEdit?
  17. You can't do this with UniPDFFrame. You need to use 3rd party tools to search text in pdf file.
  18. Confirmed. Adding MimeTable.AddMimeType('csv', 'text/csv', False); has no effect.
  19. please add ssl libraries to folder. we are asking to google to verify. response := idHttp1.Get('https://www.google.com/recaptcha/api/siteverify?secret='+FSecretKey+'&response='+AParams['response'].AsString);
  20. C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ReCaptcha
  21. Hello, I didn't expect someone use 2 recaptcha in the same time. Fixed. You will get with new build. For now you can change uniReCAPTCHA.pas file with this. unit UniReCAPTCHA; interface uses SysUtils, Classes, Controls, Forms, uniGUIBaseClasses, uniGUIClasses, uniPanel, uniHTMLFrame, uniGUITypes, uIdHTTP, uniGUIApplication; type TUniReCAPTCHA = class(TUniCustomHTMLFrame) private FSiteKey: string; FVerified: boolean; FOnVerified: TNotifyEvent; FSecretKey: String; procedure SetSiteKey(const Value: string); procedure SetSecretKey(const Value: String); { Private declarations } protected procedure LoadCompleted; override; procedure JSEventHandler(AEventName: string; AParams: TUniStrings);override; procedure BeforeLoadCompleted; override; public constructor Create(AOwner:TComponent); override; destructor Destroy; override; { Public declarations } published property SiteKey:string read FSiteKey write SetSiteKey; property SecretKey: String read FSecretKey write SetSecretKey; property Verified : boolean read FVerified; property OnVerified :TNotifyEvent read FOnVerified write FOnVerified; procedure Reset; { Published declarations } end; implementation { TUniReCAPTCHA } procedure TUniReCAPTCHA.BeforeLoadCompleted; var sWidth:string; begin inherited; if Trim(FSiteKey)='' then begin raise Exception.Create('UniReCAPTCHA : Please Set SiteKey'+ #13#10+' To Get SiteKey Please Visit : https://www.google.com/recaptcha/admin'); Exit; end; if Trim(FSecretKey)='' then begin raise Exception.Create('UniReCAPTCHA : Please Set SecretKey'+ #13#10+' To Get SecretKey Please Visit : https://www.google.com/recaptcha/admin'); Exit; end; JSCode(JSName+'OnCallBack = function() {ajaxRequest('+JSName+', "OnCallBack", {response: grecaptcha.getResponse()}) };'); sWidth:=StringReplace(FormatFloat('0.00',Width/302),',','.',[rfReplaceAll]); Height:=Trunc(76*Width/302); StaticHTML:=True; HTML.Text:='<div id="' + JSName + '_recaptcha" class="g-recaptcha" data-sitekey="'+FSiteKey+'" data-callback="'+JSName+'OnCallBack" style="transform:scale('+sWidth+');transform-origin:0 0" ></div>'; end; constructor TUniReCAPTCHA.Create(AOwner: TComponent); begin inherited; Width:=302; Height:=76; end; destructor TUniReCAPTCHA.Destroy; begin inherited; end; procedure TUniReCAPTCHA.JSEventHandler(AEventName: string; AParams: TUniStrings); var idHttp1: TIdHTTP; response: String; begin inherited; if AEventName='OnCallBack' then begin idHttp1:=TIdHTTP.Create(Self); try // idHttp1.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(idHttp1); // idHttp1.HandleRedirects := True; response := idHttp1.Get('https://www.google.com/recaptcha/api/siteverify?secret='+FSecretKey+'&response='+AParams['response'].AsString); if Pos('"success": true', response)>0 then begin FVerified:=True; if Assigned(OnVerified) then OnVerified(Self); end; finally idHttp1.Free; end; end; end; procedure TUniReCAPTCHA.LoadCompleted; begin inherited; JSCallGlobal('setTimeout', [JSFunction('','recaptcha = document.getElementById("' + JSName + '_recaptcha"); if (recaptcha) {grecaptcha.render(recaptcha);}'),100]); end; procedure TUniReCAPTCHA.Reset; begin FVerified:=False; JSCallGlobal('grecaptcha.reset',[]); end; procedure TUniReCAPTCHA.SetSecretKey(const Value: String); begin FSecretKey := Value; end; procedure TUniReCAPTCHA.SetSiteKey(const Value: string); begin FSiteKey := Value; end; initialization UniAddJSLibrary('https://www.google.com/recaptcha/api.js?render=explicit', True, [upoPlatformBoth]); end.
  22. Can you please create a test case? I can not reproduce this issue
  23. Hello, Which edition and build of UniGUI are you using?
×
×
  • Create New...