Commit 6417f9f6 by Mac Stephens

pdf opens in tab, changed spacing on pdf and order grid all dates look alike,…

pdf opens in tab, changed spacing on pdf and order grid all dates look alike, header stays on top when scrolling orders grid
parent c7b10f14
object FViewOrders: TFViewOrders
Width = 676
Height = 480
Caption = 'edtorderid'
CSSLibrary = cssBootstrap
ElementFont = efCSS
Font.Charset = DEFAULT_CHARSET
......@@ -154,7 +153,7 @@ object FViewOrders: TFViewOrders
BorderColor = clSilver
ChildOrder = 11
ElementFont = efCSS
ElementHeaderClassName = 'thead-light'
ElementHeaderClassName = 'thead-light sticky-top bg-light'
ElementPosition = epRelative
ElementTableClassName = 'table table-striped table-hover table-bordered text-sm'
Footer.ButtonActiveElementClassName = 'btn btn-primary'
......@@ -194,7 +193,6 @@ object FViewOrders: TFViewOrders
Title = 'Order Type'
end
item
ElementClassName = 'text-nowrap'
DataField = 'orderDate'
Title = 'Order Date'
end
......
......@@ -48,7 +48,7 @@
<div id="order_table_section" class="overflow-auto mt-2"
style="max-height: calc(100vh - 250px); padding-bottom: 0; width: 100%;">
<table id="tblPhoneGrid" class="table table-striped table-bordered" style="width: 100%;">
<thead class="sticky-top bg-light">
<thead class="sticky-top thead-light">
<tr style="font-size: 0.875rem;">
<!-- Table headers are dynamically generated -->
</tr>
......
......@@ -132,27 +132,21 @@ var
xdcResponse: TXDataClientResponse;
searchOptions, pdfURL: string;
jsObject: TJSObject;
ShowPDFForm: TFViewPDF;
procedure AfterCreate(AForm: TObject);
begin
ShowPDFForm.LoadPDF(pdfUrl);
ShowPDFForm.ShowModal;
end;
begin
searchOptions := GenerateSearchOptions;
// Call the server method to generate the PDF
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateReportPDF', [searchOptions]));
jsObject := JS.TJSObject(xdcResponse.Result);
pdfUrl := JS.toString(jsObject.Properties['value']);
//ShowMessage('PDF Report Generated Successfully');
console.log(pdfURL);
//application.Navigate( pdfUrl, ntblank );
ShowPDFForm := TFViewPDF.CreateNew(@AfterCreate);
pdfURL := JS.toString(jsObject.Properties['value']);
// Open the PDF in a new browser tab without needing a different form
// This method is much faster too, even for large datasets
window.open(pdfURL, '_blank');
end;
procedure TFViewOrders.WebFormCreate(Sender: TObject);
// Initializes important values:
// PageNumber: What page number the user is on IE 1: 1-10, 2: 11-20 etc
......
......@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<noscript>Your browser does not support JavaScript!</noscript>
<link rel="icon" href="data:;base64,=">
<title>TMS Web Project</title>
<title>Web KG Orders</title>
<link href="css/app.css" rel="stylesheet" type="text/css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.3.1/css/flag-icon.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
......
......@@ -19,8 +19,7 @@ uses
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html},
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html},
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html},
View.PDF in 'View.PDF.pas' {FViewPDF: TWebForm} {*.html};
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html};
{$R *.res}
......
......@@ -180,11 +180,6 @@
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.PDF.pas">
<Form>FViewPDF</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/>
<None Include="css\app.css"/>
<None Include="config\config.json"/>
......
program kgOrdersServer;
uses
FastMM4,
System.SyncObjs,
System.SysUtils,
Vcl.StdCtrls,
......
......@@ -105,6 +105,7 @@
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.</DCC_ExeOutput>
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
......
[Settings]
MemoLogLevel=4
FileLogLevel=5
LogFileNum=55
LogFileNum=63
webClientVersion=1.0.0
[Database]
Server=192.168.159.132
--Server=192.168.100.130
--Server=192.168.159.132
Server=192.168.102.130
--Server=192.168.75.133
--Database=
--Username=
--Password=emsys!012
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment