Jump to content

pedrisco

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by pedrisco

  1. For logout... UniMainModule.ServerMessages.TerminateTemplate <script> document.location = document.location; </script> I haven't tried for UniMainModule.ServerMessages.InvalidSessionTemplate, but should work.
  2. change timeout to 100 or something bigger
  3. I've found some issues too, it's buggy. You can find the same issue in the sample https://www.swarmonline.com/Ext.ux.TouchCalendar/examples/Ext.ux.TouchCalendar.html, when you scroll down the day view, the other views scroll down too. I know it's uggly but after "setView" do this... setTimeout(function(){ frmBitacora.touchCalendar.view.innerElement.setStyle({transform:""}); },50); //increment if you need to populate i'm doing this... procedure TfrmBitacora.calendarPanelAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var date1,date2:String; jsonString:String; begin if eventName='periodchange' then begin date1 := copy( params.Values[ 'date1' ], 4 ); date1 := copy( date1, 7,2 ) +FormatSettings.DateSeparator +copy( date1, 5,2 ) +FormatSettings.DateSeparator +copy( date1, 1,4 ); date2 := copy( params.Values[ 'date2' ] , 4 ); date2 := copy( date2, 7,2 ) +FormatSettings.DateSeparator +copy( date2, 5,2 ) +FormatSettings.DateSeparator +copy( date2, 1,4 ); dataSet.close; dataSet.ParamByName('date1').AsDate := strToDate( date1 ); dataSet.ParamByName('date2').AsDate := strToDate( date2 ); dataSet.Open; jsonString := ''; while not dataSet.Eof do begin jsonString := jsonString+'{' + 'event:"'+dataSet['event']+'"' + ',start:"'+formatDateTime( 'yyyy-mm-dd',dataSet.FieldByName('fech').asDateTime )+'"' + ',end:"'+formatDateTime( 'yyyy-mm-dd',dataSet.FieldByName('fech').asDateTime )+'"' + '},'; dataSet.next; end; uniSession.AddJS( 'frmBitacora.touchCalendar.view.eventStore.setData([' +copy(jsonString,1,length(jsonString)-1) +'])' ); end; end;
  4. updated sample https://mega.nz/#!HkUS1ZQJ!PUrPygw1mFnM5E-TYnCh7LmkQht6tKjSYrr8FoVX28c
  5. to change the view ... frmBitacora.touchCalendar.setViewMode('month'); //month, week , day to populate the store... frmBitacora.touchCalendar.view.eventStore.setData( [ {event:"text1", start:new Date(), end: new Date()}, {event:"text2", start:new Date(), end: new Date()}, ... ] );
  6. I would say "selectionchange". calendar.on('selectionchange', function(calendar, newDate, oldDate){ console.log('selectionchange'); console.log(calendar); }); I've not tried all of them but you can see more events here https://github.com/SwarmOnline/Ext.ux.TouchCalendar/blob/master/examples/Ext.ux.TouchCalendarEvents.html .
  7. Once i had to deal with legacy and custom libraries for serial communicaction, so i was forced to use "sleep", just avoid the use of "Application.ProcessMessages".
  8. Sorry, I forgot to mention that, but as far as i know sencha-touch is not included in 1.10., and till now i haven't found a "plug&play" theme, that's why i'm still using sencha-touch. Maybe is just a matter of include it. Moreover, i thought that in 1.10 there is no difference between mobile and desktop (!?).
  9. I needed a "CalendarPanel" in mobile, so i took Ext.ux.TouchCalendar (https://github.com/SwarmOnline/Ext.ux.TouchCalendar) and merged in my sencha-touch project. I can't upload this sample so i'm gonna leave this here, maybe can help to someone. https://mega.nz/#!P0sgXbIQ!jsTHKaMMb7AzNCImIcQU1MmmQurbXN1ZEb0L8tO4td0 Tips: calendarPanel.uniEvents.afterCreate dpDate.extEvents.change dpDate.uniEvents.beforeInit dpDate.uniEvents.afterCreate procedure TfrmBitacora.calendarPanelAjaxEvent
  10. what if you use dbgrid.ondblclick instead ?
  11. //mainmenu with UniGUIServerForm.ServerForm.File1 do begin add( TMenuItem.create( UniGUIServerForm.ServerForm ) ); items[ Count-1 ].Caption := 'my MainMenu option'; end; //try icon with UniGUIServerForm.ServerForm.popup do begin items.add( TMenuItem.create( UniGUIServerForm.ServerForm ) ); items[ items.Count-1 ].Caption := 'my popupMenu option'; end;
  12. Nop, for some reason it didn't work for me in server2008, so i was forced to run the service as administrator, but never mine, it's working. I'm glad I helped .
  13. The embarcadero post refers to another post that summarizes posible workarounds for the excel issue. I tried myself without success, but maybe can help. http://troyvssharepoint.blogspot.cl/2012/07/stumbled-upon-interesting-one-today.html
  14. Hi, A couple of days ago i've found the same issue editing an excel workbook. It was related to the access grants for the user assigned to run the windows service. In my case i've found a workaround in windows 7 creating the folder c:\Windows\System32\config\systemprofile\Desktop (the write access for the SYSTEM user is inherited), If yours is a 32 bits service running under a 64bits environment check the same but with c:\windows\syswow64\config\systemprofile\Desktop. In my case the production server is a win2008 and it didn't work, so i was forced to run the service as administrator. References: https://forums.embarcadero.com/thread.jspa?threadID=252184 https://blogs.msdn.microsoft.com/dataaccesstechnologies/2012/12/19/error-microsoft-office-excel-cannot-access-the-file-while-accessing-microsoft-office-11-0-object-library-from-ssis/ Good luck.
  15. Hi, you can try this: https://github.com/PKISharp/win-acme/wiki/Basic-usage https://github.com/PKISharp/win-acme/wiki/Apache-2.4-Basic-usage It creates a windows task that automates the renew. I've tested it with IIS and it works like a charm. Please tell us your result with Apache.
  16. slotOrder: ['hour','minute']
  17. I'm not a iis man but, what about enabling CORS ?
  18. TStringList is not thread safe, try with TidThreadSafeStringList.
  19. Hi I've found the same issue... The quick way is write the onGetText event for every field. procedure TForm1.numberFieldGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin text := formatFloat( TNumericField( sender ).DisplayFormat , sender.value ); end; But if you have uniDBUtils.pas and you feel brave, you can touch the "numbers" section in the FieldValueToJS function: ... ftCurrency: begin if f.InheritsFrom( TNumericField ) and (TNumericField( f ).DisplayFormat<>'') then try result := '"'+formatFloat( TNumericField( f ).DisplayFormat , f.value )+'"'; except Result := F.Value; // important: here we must use Delphi's {FormatSettings}.DecimalSeparator, becuase "F.Value" internally uses it to convert value to string. Result:=UniStringReplace(Result, {$ifdef COMPILER_15_UP}SysUtils.FormatSettings.{$endif}DecimalSeparator, '.'); end else begin Result := F.Value; // important: here we must use Delphi's {FormatSettings}.DecimalSeparator, becuase "F.Value" internally uses it to convert value to string. Result:=UniStringReplace(Result, {$ifdef COMPILER_15_UP}SysUtils.FormatSettings.{$endif}DecimalSeparator, '.'); end; end;
  20. Hi how can i change the TunimDBGrid header and rows height ? Thanks
  21. pedrisco

    Logs error

    UniServerModule.Logger.AddLog('Hello world!');
  22. I use a transparent gif, without text, this way: UniServerModule.CustomCSS .x-mask-msg{ background:none; border-width:0px; } .x-mask-msg-inner{ border-width:0px; color:none; padding:50px; background: rgba(0, 0, 0, 0); background-image:url(files/loading.gif); background-repeat:no-repeat; background-size: contain; } .x-mask-msg-text{ display:none; background-image:none; } But i suppose that just changing UniServerModule.ServerMessages.LoadingMessage and cutting the ".x-mask-msg-text" selector should do the job. Good luck.
  23. Good to know, and just for the record, in your first snippet you were trying to redirect using "uniSession.SSL" as a control variable. I don't know what uniSession.SSL means, but in my tests no matter the url is (http or https), it acts just like UniServerModule.SSL.enabled. So, uniSession.SSL cann't be used "TO KNOW" whether the browser request was https or http.
  24. I'm gonna try to recapitulate, but i'm not a web guru so please feel free to correct me if i'm wrong... When you enable SSL, standard way is using port 443 to serve secure layer, and unsecure html is still served at 80. If you serve any of this protocols in any non standard port (secure=443, not_secure=80), the browser will take the protocol prefixed in the URL (http://=>not secure, https://=>secure), when you use the standard way you can redirect using javascript because the html page was retrieved from the unsecure/plane http port, when you don't you cann't use javascript unless the user writes the right (not secure) port in the url (p.ej. http://yourdomain.com:81). So, you have two stages: 1.Using standard ports. 2.Using non standard ports, lets say https at 444 and http at 81. In the stage 1, you have 3 common stages: 1.a ) The user writes http://yourdomain.com, so the "redirector javascript" does its job. 1.b ) The user writes https://yourdomain.com, so the "redirector javascript" has nothing to do (...). 1.c ) The user writes "yourdomain.com", so the browser tries prefixing "http://", if nothing is found (no response) tries "https://" and goes on. In the stage 2 (non standard ports), you have: 2.a ) The user writes http://yourdomain.com:81, then the "redirector javascript" does its job. 2.b ) The user writes https://yourdomain.com:444, then the "redirector javascript" has nothing to do (...). 2.c ) The user writes "yourdomain.com:444", but your server is serving "https" in this port, so your browser retrieves encrypted data when is expecting unencryted data, so the browser doesn't "understand" the data so its content is not interpreted, so the javascript won't do the job. I don't know how work IIS and Apache in this context, but the only way i know to redirect from http to https without being forced to serve http somewhere, is using a dns level redirect (masking, forwarding, page-rule, etc.). Hope it helps.
  25. i'm 45 22 years with delphi, since delphi 1 (16 bits). PD:I think delphi is the best, but i think it's time to move on, i'm unemployed cause i didn't update other skills like html, css and javascript, the most popular languages today.
×
×
  • Create New...