Jump to content

Fábio Matte

uniGUI Subscriber
  • Posts

    131
  • Joined

  • Last visited

  • Days Won

    1

Fábio Matte last won the day on December 15 2019

Fábio Matte had the most liked content!

1 Follower

Profile Information

  • Gender
    Male

Contact Methods

  • Skype
    matriz.fabio

Recent Profile Visitors

1227 profile views

Fábio Matte's Achievements

Active Member

Active Member (3/4)

6

Reputation

  1. Excellent resource, it worked here for me, it was a lot of show.
  2. Good morning, I ended up managing to put it like this: lstInventario.ClientEvents.UniEvents.Values['beforeInit'] := myJSScript.Lines.Text; I store what I need inside a memo, and from there I carry it where I need it. Thanks.
  3. So, I need to add the code mentioned above in Properties: ClientEvents> UniEvents [Ext.dataview.List> beforeInit] of the UnimDBListGrid Component at Runtime (See Image) and not at design time, because the way it is here, added to the project , you are not attending me the way I need to.
  4. How can I do to load the code below into a ClientEvents> UniEvents? function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; var descr = '<table style="width: 100%; border-collapse: collapse; border-style: none; height: 10px;" border="0"> ' + '<tbody> ' + '<tr style="height: 10px;"> ' + '<td style="width: 9.33229%; height: 10px;"> ' + '<table style="height: 100%; width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> ' + '<tbody> ' + '<tr> ' + '<td style="width: 100%;"><div class="circle"><img style="border-style: none; display: block; margin-left: auto; margin-right: auto;" src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" onerror="this.src="http://wps.singus.com.br/html/img/singuslogo.png" alt="" width="50" height="55" </></div></td> ' + '</tr> ' + '</tbody> ' + '</table> ' + '</td> ' + '<td style="width: 90.6677%; height: 10px;"> '+ '<table style="width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> '+ '<tbody> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #0000ff;"><strong>'+ 'TIPO: {0}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 90%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #ff0000;"><strong>{3}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 9px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #003300;"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td> '+ '</tr> '+ '</tbody> '+ '</table> ' + '</td> ' + '</tr> ' + '</tbody> '+ '</table>'; config.itemTpl = new Ext.XTemplate(descr); }
  5. Thank you friend, It was even better using this code that you put here. It cost !!!
  6. The same happened to me, I had to go back to version 1545 to not have problems.
  7. This is the HTML I use in the Error templates: <!DOCTYPE html> <html lang="pt-br"> <head> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Roboto:400,100,300,500,700,900|RobotoDraft:400,100,300,500,700,900'> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css'> <link rel="stylesheet" href="www/css/estilos.css" type="text/css"> <title class="msgerro">Patrimonio Web [Encerrado]</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <div class="wrapper"> <div class="titulo"> <img src="www/img/singuslogo_p.png" alt="Patrimonio Web" title="Patrimonio Web" width="350" height="150"/> <h1>Patrimonio Web</h1><span><a href=''>Sistema de Avaliação de Bens e Controle de Patrimonio</a></span> </div> <div class="msgerro"><p>[###message###]</p></div> <div class="reiniciarapp"><p><a href="[###url###]">Reiniciar Aplicação</a></p></div> </div> <footer> <div class="statusbar"> <div class="statusbarcentro"><span><a href="http://www.meusite.com.br" target="_blank">www.meusite.com.br</a></span></div> </div> </footer> </body> </html>
  8. I put my HTML code in these properties but it doesn't return the personalized page. The same thing I did in TerminateTemplate and it worked, but in ExceptionTemplate and InvalidSessionTemplate nothing happens. Note.: Doing this in MainModule
  9. I found this function here that I believe is a desire to give a Reload / Fresh of the image: { xtype: 'box', imageSrc : 'getImage.do', autoEl: {tag: 'img', height: 60, width: 205}, refreshMe : function(src){ var el; if(el = this.el){ el.dom.src = (src || this.imageSrc) + '?dc=' + new Date().getTime(); } } listeners : { render : function(){ this.refreshMe(); } } } Or is Code: var img = Ext.getCmp('img_a'); img.updateSrc('...'); // or img.setSrc('...'); Ext.create('Ext.Img', { src: 'http://redino.net/xxx.jpg?' + new Date().getTime() }); Note: But I have no idea how to use it. But how can I use the code above implementing it in the code below: function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; var descr = '<table style="width: 100%; border-collapse: collapse; border-style: none; height: 10px;" border="0"> ' + '<tbody> ' + '<tr style="height: 10px;"> ' + '<td style="width: 9.33229%; height: 10px;"> ' + '<table style="height: 100%; width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> ' + '<tbody> ' + '<tr> ' + '<td style="width: 100%;"><div class="circle"><img style="border-style: none; display: block; margin-left: auto; margin-right: auto;" src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" onerror="this.src="http://wps.singus.com.br/html/img/singuslogo.png" alt="" width="50" height="55" </></div></td> ' + '</tr> ' + '</tbody> ' + '</table> ' + '</td> ' + '<td style="width: 90.6677%; height: 10px;"> '+ '<table style="width: 100%; border-collapse: collapse; border-style: hidden;" border="0" cellspacing="0" cellpadding="0"> '+ '<tbody> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #0000ff;"><strong>'+ 'CODIGO: {0}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #ff0000;"><strong>{3}</strong></span></span></span></td> '+ '</tr> '+ '<tr> ' + '<td style="width: 100%;"><span style="font-size: 11px; padding-left: 5px;"><span style="font-family: tahoma,geneva,sans-serif;"><span style="color: #003300;"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td> '+ '</tr> '+ '</tbody> '+ '</table> ' + '</td> ' + '</tr> ' + '</tbody> '+ '</table>'; config.itemTpl = new Ext.XTemplate(descr); }
  10. I put it that way, but it still didn't work.
  11. Solved with a conversion function. function ConverteMiniatura(Imagem: TGraphic; W, H: Integer; vTransparente : Boolean; Tipo: TGraphicClass = nil): TGraphic; var B : TBitmap; jpg : TJPEGImage; LogFont : TLogFont; aFont : TFont; Rect1 : TRect; sText : string; lAltura, lLargura, lEsquerda, lDireita : Integer; vIncRect : Integer; ww, hh : Integer; newH, newW : Integer; X, Y : integer; Imagem2 : TGraphic; begin B := TBitmap.Create; try if imgW < imgH then begin newH := W; newW := H; end; if imgW > imgH then begin newH := H; newW := W; end; H := newH; W := newW; B.Height := H; B.Width := W; B.Transparent := vTransparente; B.Canvas.StretchDraw(Rect(0, 0, W, H), Imagem ); if Tipo = nil then Result := TGraphic(Imagem.ClassType.Create) else begin Result := Tipo.Create; Result.Assign(B); end; Try Jpg := TJPEGImage.Create; Jpg.Assign(B); Jpg.CompressionQuality := 100; jpg.Compress; Jpg.SaveToFile( PatchArquivosCliente + 'thumbmail\' + IntToStr( myChapa ) + '.jpg' ); Finally Jpg.Free; End; finally B.Free; end; end;
  12. I have a UnimDBListGrid, in which I load some information using HTML via UniEvents, according to this code below: Whatch line: '<td style="width: 5.69044%; height: 43px;"><img src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" alt="{3}" onerror="img/semimagem.jpg" width="50" height="50" /></td>' + Full Code: function beforeInit(sender, config) { config.loadingText='Carregando...'; config.grouped=true; config.selectedCls=''; config.disableCaching = true; config.itemTpl= ' <table style="border-collapse: collapse; width: 49.7724%; height: 43px;" border="0"; white-space: word-wrap:break-word>' + ' <tbody>' + ' <tr style="height: 63px;">' + '<td style="width: 5.69044%; height: 43px;"><img src="ArquivosCliente/{7}/{6}/Fotos/Bens/thumbmail/{1}.jpg" alt="{3}" onerror="img/semimagem.jpg" width="50" height="50" /></td>' + ' <td style="width: 94.3096%; height: 43px;">' + '<table style="width:100%;white-space: nowrap;vertical-align:middle;">'+ ' <tbody>' + ' <tr>' + '<td><span style="font-size:9px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><span style="color:#0000CD"><strong>CODIGO: {0}</strong></span></span></span></td>' + ' </tr>' + ' <tr>' + '<td><span style="color:#B22222"><span style="font-size:12px;padding-top:1px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><strong>{3}</strong></span></span></span></td>' + ' </tr>' + ' <tr>' + '<td><span style="color:#006400"><span style="font-size:12px;padding-top:1px;padding-left:1px;"><span style="font-family:tahoma,geneva,sans-serif"><strong>CHAPA ATUAL: {1} | CHAPA ANT.: {2}</strong></span></span></span></td>' + ' </tr>' + ' </tbody>' + ' </table>' + ' </td>' + ' </tr>' + ' </tbody></table>'; } However, if I change the image on the server, the list is not shown with the new image, it is just loading the old one, even if I delete this image on the server, it continues to be displayed. So, how can I reload the image or not cache it !!! Result:
×
×
  • Create New...