pas2js: less hints

This commit is contained in:
mattias 2024-01-27 10:22:59 +01:00
parent 94547e3f9a
commit 2734600c27
5 changed files with 11 additions and 11 deletions

View File

@ -28,7 +28,6 @@ Type
TBootstrapFormGenerator = class(TDataFormGenerator) TBootstrapFormGenerator = class(TDataFormGenerator)
private private
FBottomMargin: Integer; FBottomMargin: Integer;
FEditlColWidth: Integer;
FHorizontalForm: Boolean; FHorizontalForm: Boolean;
FLabelColWidth: Integer; FLabelColWidth: Integer;
FUseInputGroup: Boolean; FUseInputGroup: Boolean;
@ -86,12 +85,14 @@ begin
S:='mb-'+IntToStr(FBottomMargin); S:='mb-'+IntToStr(FBottomMargin);
Result:=Result+Indent+Format('<div class="row %s">',[S])+LF; Result:=Result+Indent+Format('<div class="row %s">',[S])+LF;
IncIndent; IncIndent;
if aEntry=nil then ;
end; end;
function TBootstrapFormGenerator.GetRowColEnd(aEntry: TDataFieldEntryItem): String; function TBootstrapFormGenerator.GetRowColEnd(aEntry: TDataFieldEntryItem): String;
begin begin
Decindent; Decindent;
Result:=Indent+'</div> <!-- .row -->'+Lf; Result:=Indent+'</div> <!-- .row -->'+Lf;
if aEntry=nil then ;
end; end;
constructor TBootstrapFormGenerator.Create(aOwner: TComponent); constructor TBootstrapFormGenerator.Create(aOwner: TComponent);
@ -175,12 +176,14 @@ function TBootstrapFormGenerator.GetInputGroup(aEntry : TDataFieldEntryItem): St
begin begin
Result:=Indent+'<div class="input-group">'+LF; Result:=Indent+'<div class="input-group">'+LF;
IncIndent; IncIndent;
if aEntry=nil then ;
end; end;
function TBootstrapFormGenerator.GetInputGroupEnd(aEntry : TDataFieldEntryItem): String; function TBootstrapFormGenerator.GetInputGroupEnd(aEntry : TDataFieldEntryItem): String;
begin begin
DecIndent; DecIndent;
Result:=Indent+'</div> <!-- .input-group -->'+LF; Result:=Indent+'</div> <!-- .input-group -->'+LF;
if aEntry=nil then ;
end; end;
function TBootstrapFormGenerator.GenerateFieldHTML(aEntry: TDataFieldEntryItem): String; function TBootstrapFormGenerator.GenerateFieldHTML(aEntry: TDataFieldEntryItem): String;

View File

@ -5,7 +5,7 @@ unit frmaddmissingtablecolumns;
interface interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ButtonPanel, ExtCtrls, ValEdit, Grids, StdCtrls, Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ButtonPanel, ExtCtrls, Grids, StdCtrls,
db, types, stub.bootstraptablewidget; db, types, stub.bootstraptablewidget;
type type
@ -236,7 +236,7 @@ begin
For I:=1 to SGFields.RowCount-1 do For I:=1 to SGFields.RowCount-1 do
if SGFields.Cells[idxAdd,I]='1' then if SGFields.Cells[idxAdd,I]='1' then
Inc(Count); Inc(Count);
SetLength(Result,Count); SetLength(Result{%H-},Count);
Count:=0; Count:=0;
For I:=1 to SGFields.RowCount-1 do For I:=1 to SGFields.RowCount-1 do
if SGFields.Cells[idxAdd,I]='1' then if SGFields.Cells[idxAdd,I]='1' then
@ -311,7 +311,6 @@ end;
class function TAddMissingTableColumsForm.GetFieldProps(aTable: TDBBootstrapTableWidget; const aFieldName : String; out aProps: TFieldProps): Boolean; class function TAddMissingTableColumsForm.GetFieldProps(aTable: TDBBootstrapTableWidget; const aFieldName : String; out aProps: TFieldProps): Boolean;
var var
DS : TDataset; DS : TDataset;
I : Integer;
FD : TFieldDef; FD : TFieldDef;
F : TField; F : TField;

View File

@ -136,7 +136,7 @@ var
begin begin
aComp:=aComp.Owner; aComp:=aComp.Owner;
aCount:=0; aCount:=0;
SetLength(Result,aComp.ComponentCount); SetLength(Result{%H-},aComp.ComponentCount);
For I:=0 to aComp.ComponentCount-1 do For I:=0 to aComp.ComponentCount-1 do
if aComp.Components[i] is TDatasource then if aComp.Components[i] is TDatasource then
begin begin

View File

@ -5,10 +5,10 @@ unit pas2jscompedits;
interface interface
uses uses
Classes, SysUtils, ProjectIntf, PropEdits, ComponentEditors, fpjsondataset, dbpropedits, Classes, SysUtils, ProjectIntf, PropEdits, ComponentEditors, dbpropedits,
db, stub.htmlfragment, stub.htmlactions, stub.data.htmlactions, stub.restdataset, db, stub.htmlactions, stub.data.htmlactions, stub.restdataset,
stub.webwidget, stub.bootstrapwidgets, stub.bootstraptablewidget, stub.bulmawidgets, stub.webwidget, stub.bootstrapwidgets, stub.bootstraptablewidget, stub.bulmawidgets,
stub.templateloader, stub.jsondataset, stub.dbwebwidget, stub.dbhtmlwidgets, stub.templateloader, stub.dbhtmlwidgets,
stub.fprpcclient; stub.fprpcclient;
Type Type
@ -204,7 +204,7 @@ implementation
uses uses
// LCL/Lazarus // LCL/Lazarus
Types, IDEWindowIntf, controls, forms, dialogs, formeditingintf, lazideintf, idemsgintf, IDEExternToolIntf, Menuintf, Types, IDEWindowIntf, controls, forms, dialogs, formeditingintf, lazideintf, IDEExternToolIntf, Menuintf,
idehtmltools, idehtmltools,
frmHTMLActionsEditor, strpas2jscomponents, pas2jsrestutils, pas2jsrestcmd, frmpas2jsedithtml, p2jselementactions, frmHTMLActionsEditor, strpas2jscomponents, pas2jsrestutils, pas2jsrestcmd, frmpas2jsedithtml, p2jselementactions,
frmcreaterpcserviceclient, frmaddmissingtablecolumns; frmcreaterpcserviceclient, frmaddmissingtablecolumns;

View File

@ -190,8 +190,6 @@ Type
implementation implementation
uses stub.web;
{ TRPCCustomService } { TRPCCustomService }
procedure TRPCCustomService.SetClient(AValue: TRPCClient); procedure TRPCCustomService.SetClient(AValue: TRPCClient);