andyhill
uniGUI Subscriber-
Posts
1266 -
Joined
-
Last visited
-
Days Won
6
Content Type
Profiles
Forums
Events
Everything posted by andyhill
-
I have a Mobile DBListGrid custom template that uses checkboxes and I need to increase the checkbox size - please advise how - thanks. CustomCSS.Add('.gridCustom '); CustomCSS.Add('{ '); CustomCSS.Add(' min-height: 22px !important; '); CustomCSS.Add(' height: 26px !important; '); CustomCSS.Add(' line-height: 1.1 !important; '); // I would assume here instead of there (makes no difference) CustomCSS.Add('} '); config.itemTpl = new Ext.XTemplate ( '<table class="gridCustom">'+ '<tr>'+ '<td width="269px" style="text-align:left; height:80%">{[this.getStreet(values)]}</td>'+ '<td width="60px" style="text-align:left; height:80%">{[this.getNAH(values)]}</td>'+ '</tr>'+ '</table>', ... getNAH: function(values) { if(values[2] == true) return '<input type="checkbox" checked id="myCheck" onclick="javascript:NotHomemForm.ListGrid.showNahCheck(\''+values[2]+'\')" align="middle" style="margin:auto; width=24px height=24px"/>'; else return '<input type="checkbox" id="myCheck" onclick="javascript:NotHomemForm.ListGrid.showNahCheck(\''+values[2]+'\')" align="middle" style="margin:auto; width=24px height=24px"/>'; } ...
-
I am trying to limit the scaling of the Mobile Form that the PDFFrame inflicts on the Parent Form. I have tested for the resize fire event and it appears not to fire ? PDFFrame.ClientEvents.ExtEvents.Clear; PDFFrame.ClientEvents.ExtEvents.Add('resize=function resize(sender, eOpts) '#13#10+ '{ '#13#10+ ' function resize(sender, width, height, oldWidth, oldHeight, eOpts) '#13#10+ ' { '#13#10+ ' alert(width); '#13#10+ ' } '#13#10+ '} '); Later, I want to reset the form scale after testing the new width against a maximum value - please advise - thanks -webkit-transform: scale(0.5); transform: scale(0.5); -webkit-transform-origin: 0 0; transform-origin: 0 0;
-
I have a web App that is working fine in Mobile Mode and Desktop Emulation Mode but Desktop Mode no longer works (we did an update to UniGU 1423 some time ago and I have only just realized Desktop no longer works as I was always using /m) - Please advise - Thanks:- program WebMapApp; {$R *.dres} uses Forms, ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule}, MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule}, Main in 'Main.pas' {MainForm: TUniForm}, Mainm in 'Mainm.pas' {MainmForm: TUnimForm}, Login in 'Login.pas' {LoginForm: TUniLoginForm}, Loginm in 'Loginm.pas' {LoginmForm: TUnimLoginForm}, ... {$R *.res} begin ReportMemoryLeaksOnShutdown := False; Application.Initialize; TUniServerModule.Create(Application); Application.Run; end.
-
Perfect - Thank You
-
Code Project1.zip
-
Here is a DFM breakdown of the ToolBar object ToolBar: TUnimToolBar Left = 0 Top = 0 Width = 304 Height = 48 Hint = '' Anchors = [akLeft, akTop, akRight] Caption = '' object Container0: TUnimToolButton Left = 0 Top = 0 Width = 48 Height = 48 Hint = '' CreateOrder = 1 Style = tbsContainer Caption = 'Container0' object Prior: TUnimBitBtn Left = -177 Top = 1 Width = 30 Height = 47 Hint = '' Flex = 1 Caption = '<' OnClick = PriorClick end end object Container1: TUnimToolButton Left = 48 Top = 0 Width = 185 Height = 48 Hint = '' CreateOrder = 2 Style = tbsContainer Caption = '' Flex = 4 DesignSize = ( 185 48) object MyDate: TUnimDatePicker Left = 1 Top = 1 Width = 242 Height = 47 Hint = '' Anchors = [akTop, akBottom] ClientEvents.ExtEvents.Strings = ( 'change=function change(sender, newDate, oldDate, eOpts)'#13#10'{'#13#10' /*' + 'ajaxRequest(sender, '#39'_dateChange'#39', ['#39'val='#39'+Ext.Date.format(newDa' + 'te, Ext.Date.patterns.CustomFormat)]);*/'#13#10' console.log(newDate)' + ';'#13#10'}') ClientEvents.UniEvents.Strings = ( 'beforeInit=function beforeInit(sender, config)'#13#10'{'#13#10' config.pick' + 'er = Ext.create'#13#10' ('#13#10' '#39'Ext.ux.picker.DateTime'#39','#13#10' {'#13#10' ' + ' useTitles: true,'#13#10' doneButton: true,'#13#10' cancelButton:' + ' true,'#13#10' slotOrder: ['#39'day'#39', '#39'month'#39', '#39'year'#39'],'#13#10' toolba' + 'r:'#13#10' {'#13#10' //items : datetimepickettoolbaritems'#13#10' ' + ' }'#13#10' }'#13#10' );'#13#10' Ext.Date.patterns={CustomFormat: "d/m/Y"};'#13#10' ' + ' config.dateFormat=Ext.Date.patterns.CustomFormat; '#13#10'}') DateFormat = 'dd/MM/yyyy' Date = 43185.000000000000000000 OnAjaxEvent = MyDateAjaxEvent OnChange = MyDateChange end end object Container2: TUnimToolButton Left = 233 Top = 0 Width = 48 Height = 48 Hint = '' CreateOrder = 3 Style = tbsContainer Caption = 'Container2' object Next: TUnimBitBtn Left = -177 Top = 1 Width = 225 Height = 47 Hint = '' Flex = 1 Caption = '>' OnClick = NextClick end end end
-
I appreciate your response - however - it does not disable ?
-
I have a Mobile Toolbar with 3 Containers each holding an object (button, DatePicker etc.). During Runtime there are times when I need to Disable the Toolbar and its objects, ToolBar.Enabled:= False; makes no difference ? Please advise how - Thanks in advance.
-
Thanks, I followed your logic with my code below, Desktop Downloads as expected, iPhone X does nothing ? FStream:= TFileStream.Create(UniServerModule.EXEDir+'web\'+UniMainModule.ReportFileName, fmOpenRead, fmShareDenyWrite); FStream.Position:= 0; BStream:= TBytesStream.Create; BStream.CopyFrom(FStream, FStream.Size); BStream.Position:= 0; FileName:= 'Report.pdf'; if (upiPhone in UniSession.UniPlatform) or (upiPad in UniSession.UniPlatform) then Begin PdfAnsi:= TIdEncoderMIME.EncodeBytes(TIdBytes(BStream.Bytes)); // IDCoder, IDCoderMime, IdGlobal Str:= 'var base64EncodedPdf="'+PdfAnsi+'"; '; Str:= Str+'window.open("data:application/pdf;base64," +base64EncodedPdf); '; UniSession.AddJS(Str); end else Begin UniSession.SendStream(BStream, FileName); end; BStream.Free; FStream.Free; Can you advise please ?
-
Works as expected - Thank You Again.
-
Thank You - will test
-
Yes. I can live with a Local Variable that can be updated by the Picker's Change Event HOWEVER how do I pre-load the Picker's Time with the Local Variables original Time ? Please show me in code - thanks.
-
I tried this code below but it locks up browser (chrome) in Desktop emulation (/m), file exists, endcoding works - can you please advise - thanks. base64EncodedPDF: String; ... procedure TMainmForm.EnCode64FileToStream(const FileName: string); var FileStream: TFileStream; s: String; begin try base64EncodedPDF:= ''; s:= ''; FileStream:= TFileStream.Create(FileName, fmOpenRead or fmShareDenyWrite); FileStream.Position:= 0; s:= TIdEncoderMIME.EncodeStream(FileStream); base64EncodedPDF:= 'window.open("data:application/pdf;base64, "'+s+');'; finally FileStream.Free; end; end; ... EnCode64FileToStream('test.pdf'); UniSession.AddJS(base64EncodedPDF); ...
-
Great, can you show me your code to encode please ?
-
Locate all the File Not Found (apple-touch-icon-precomposed.png etc.) and create them. Apple and others expect thumb nails, give them what they want.
-
Thanks, if you had an English version it would be even better.
-
Here it is again, this time Mobile W32. Please copy the 2 JavaScript files into the EXE Directory. Project1.zip
-
The one you told me to use for Tokyo 10.2 uni-1.0.0.1423 unim-1.0.0.1423 touch-2.4.2 ext-4.2.5.1763
-
My project is too big so I tried to quickly knock this up 64bit Desktop / Mobile (hybrid). Please copy the 2 JavaScript files into the EXE Directory. Debug and trace set DatePicker (no time is set) and read DatePicker (no time is read). Project1.zip
-
I have proved that on both Desktop Emulation (/m) and Mobile (iOS) the Time Values are not persistent - that is the modified TDatePicker (that now handles time) has no way of receiving the Time Values from Delphi (set the time) as well as has no way to have it's Time Values read by Delphi ? Using an ajax event to catch when the Time changes does not allow one to program the time into the picker in the first place plus it is messy to catch the time change and store elsewhere when it really should have been bound to the DateTime object - not forgetting to mention what happens if they do not change the time. Please advise how to resolve ASAP as this is very urgent - thanks in advance.
-
All code is in place as instructed. The Reading and Writing of the Time values always results in ZERO. Is it possible the Time Picker only works if the platform is 'mobile' making /m (Desktop Emulation) invalid ?