picyka
-
Posts
1082 -
Joined
-
Last visited
-
Days Won
34
Content Type
Profiles
Forums
Events
Posts posted by picyka
-
-
-
-
3 minutes ago, Abaksoft said:
Humm.... Tenho uma dúvida. Talvez?!
Vou comprar um nome domaine e tentar...
If this works, it will help a lot of people.
-
I would like to generate for the domain of my system https://xxxx.domain.com.br
-
I don't quite understand this, but does this work for domains too?
-
does let's encrypt work with UNIGUI?
-
Any tip would be welcome.
-
Good morning, I took a linux server to put NGINX, I'm using a reverse proxy
port 8080 - Unigui
port 8081 - API
port 8082 - WSI wanted to continue using CloudFlare, in that environment, with hyperServer + IIS
Would you work?
-
A tip for those who want to copy text with few codes, I believe this could be implemented natively in unigui
ServerModule -> CustomMeta <script language="JavaScript"> function addslashes(str) { return (str + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0'); }; async function copyText(texto) { try { await navigator.clipboard.writeText(texto); } catch (err) { console.error('Failed to copy: ', err); } }; async function pasteText(jsName) { navigator.clipboard.readText().then(texto => { let txt = addslashes(texto); txt = txt.replace(/(?:\r\n|\r|\n)/g, '\\n'); let cmd = jsName + ".setValue('" + txt + "');"; eval(cmd); }); }; </script>
procedure TUniMainModule.Copy(Control : TUniFormControl; MsgSucess : Boolean); begin var lTexto := String(Control.Text); Self.CopyStr(lTexto, MsgSucess); end; procedure TUniMainModule.CopyStr(Text: String; MsgSucess: Boolean); begin try var lTexto := TStringUtils.JsEncode(Text); var lJsString := 'copyText(' + QuotedStr(lTexto) + ');'; UniSession.JSCode(lJsString); if MsgSucess then TToastUtils.Sucess('Copiado!',True,'Sucesso',1000); except on E: Exception do TMessageUtils.Error(E.Message); end; end; procedure TUniMainModule.Paste(Control : TUniFormControl); begin try var lJsName := Control.JSName; var lJsString := 'pasteText(' + QuotedStr(lJsName) + ');'; UniSession.JSCode(lJsString); except on E: Exception do TMessageUtils.Error(E.Message); end; end;
class function TStringUtils.JsEncode(const Src: String; const useNumericReference: boolean): String; var i, l: integer; Buf, P: PAnsiChar; ch: integer; begin Result := ''; l := Length(Src); if l = 0 then Exit; if useNumericReference then GetMem(Buf, l * 6) // to be on the *very* safe side else GetMem(Buf, l * 2); // to be on the *very* safe side try P := Buf; for i := low(Src) to high(Src) do begin ch := Ord(Src[i]); case ch of 8: begin // Backspace if useNumericReference then begin ALStrMove('\u0008', P, 6); Inc(P, 6); end else begin ALStrMove('\b', P, 2); Inc(P, 2); end; end; 9: begin // Tab if useNumericReference then begin ALStrMove('\u0009', P, 6); Inc(P, 6); end else begin ALStrMove('\t', P, 2); Inc(P, 2); end; end; 10: begin // New line if useNumericReference then begin ALStrMove('\u000A', P, 6); Inc(P, 6); end else begin ALStrMove('\n', P, 2); Inc(P, 2); end; end; 11: begin // Vertical tab if useNumericReference then begin ALStrMove('\u000B', P, 6); Inc(P, 6); end else begin ALStrMove('\v', P, 2); Inc(P, 2); end; end; 12: begin // Form feed if useNumericReference then begin ALStrMove('\u000C', P, 6); Inc(P, 6); end else begin ALStrMove('\f', P, 2); Inc(P, 2); end; end; 13: begin // Carriage return if useNumericReference then begin ALStrMove('\u000D', P, 6); Inc(P, 6); end else begin ALStrMove('\r', P, 2); Inc(P, 2); end; end; 34: begin // Double quote if useNumericReference then begin ALStrMove('\u0022', P, 6); Inc(P, 6); end else begin ALStrMove('\"', P, 2); Inc(P, 2); end; end; 38: begin // & ... we need to encode it because in javascript ' or & will be converted to ' and error unterminated string ALStrMove('\u0026', P, 6); Inc(P, 6); end; 39: begin // Apostrophe or single quote if useNumericReference then begin ALStrMove('\u0027', P, 6); Inc(P, 6); end else begin ALStrMove('\''', P, 2); Inc(P, 2); end; end; 60: begin // < ... mostly to hide all </script> tag inside javascript. // http://www.wwco.com/~wls/blog/2007/04/25/using-script-in-a-javascript-literal/ ALStrMove('\u003C', P, 6); Inc(P, 6); end; 62: begin // > ... mostly to hide all HTML tag inside javascript. ALStrMove('\u003E', P, 6); Inc(P, 6); end; 92: begin // Backslash character (\). if useNumericReference then begin ALStrMove('\u005C', P, 6); Inc(P, 6); end else begin ALStrMove('\\', P, 2); Inc(P, 2); end; end; else Begin P^ := AnsiChar(ch); Inc(P); end; end; end; SetString(Result, Buf, P - Buf); finally FreeMem(Buf); end; end;
-
@Farshad Mohajeri
Could you apply this correction to the source? -
Quote
Version: 68
When you send a file, where its name has blank spaces,unigui is putting %20 in place of the space
MultiCompleted Event
Object Files Files[0].FileName -
4 horas atrás, Sherzod disse:
Olá @picyka @ThiagoFiorilli @Abaksoft
Você também pode precisar deste CSS personalizado:
.x-boundlist { height: auto !important; }
perfect, thank you for always helping us.
- 1
-
3 hours ago, Sherzod said:
Did you attach the testcase?
It's hard to generate the error..
-
1 minuto atrás, Sherzod disse:
Você anexou o testcase?
No, but I can create one, I just attached the error stack
-
It's not hard to simulate, my case here, when I have a combo connected to a column as a filter
-
-
Could put these properties in the next build
-
Does MQTT work with Unigui?
-
-
Is anyone already using it? I found the settings complex, my scenario, I will have to use a reverse proxy, or buy a digital certificate
-
@Sherzod = JSMan
-
Could you post an example?
-
-
FastReport in UniGUI, How to have XLS reports?
in General
Posted
https://github.com/rareMaxim/Excel4Delphi/tree/master/source