Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KGOrders
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cam Hayes
KGOrders
Commits
facf79ff
Commit
facf79ff
authored
Jun 18, 2025
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Quick update to fix button colors on view.items and add hover and highlight to the items table
parent
84caa500
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
22 deletions
+45
-22
View.Items.dfm
kgOrdersClient/View.Items.dfm
+2
-6
View.Items.html
kgOrdersClient/View.Items.html
+1
-1
View.Items.pas
kgOrdersClient/View.Items.pas
+41
-13
webKGOrders.dproj
kgOrdersClient/webKGOrders.dproj
+0
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.Items.dfm
View file @
facf79ff
...
@@ -48,7 +48,6 @@ object FViewItems: TFViewItems
...
@@ -48,7 +48,6 @@ object FViewItems: TFViewItems
Height = 25
Height = 25
Caption = 'Add'
Caption = 'Add'
ChildOrder = 7
ChildOrder = 7
ElementClassName = 'btn btn-light'
ElementID = 'btnadd'
ElementID = 'btnadd'
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
...
@@ -110,6 +109,7 @@ object FViewItems: TFViewItems
...
@@ -110,6 +109,7 @@ object FViewItems: TFViewItems
ElementPosition = epRelative
ElementPosition = epRelative
Role = 'null'
Role = 'null'
TabOrder = 5
TabOrder = 5
Visible = False
object lblMessage: TWebLabel
object lblMessage: TWebLabel
Left = 28
Left = 28
Top = 9
Top = 9
...
@@ -148,7 +148,6 @@ object FViewItems: TFViewItems
...
@@ -148,7 +148,6 @@ object FViewItems: TFViewItems
Height = 25
Height = 25
Caption = 'Save'
Caption = 'Save'
ChildOrder = 79
ChildOrder = 79
ElementClassName = 'btn btn-light'
ElementID = 'btnconfirm'
ElementID = 'btnconfirm'
ElementFont = efCSS
ElementFont = efCSS
ElementPosition = epRelative
ElementPosition = epRelative
...
@@ -160,12 +159,11 @@ object FViewItems: TFViewItems
...
@@ -160,12 +159,11 @@ object FViewItems: TFViewItems
end
end
object btnCancel: TWebButton
object btnCancel: TWebButton
Left = 565
Left = 565
Top = 25
9
Top = 25
6
Width = 96
Width = 96
Height = 25
Height = 25
Caption = 'Cancel'
Caption = 'Cancel'
ChildOrder = 79
ChildOrder = 79
ElementClassName = 'btn btn-light'
ElementID = 'btncancel'
ElementID = 'btncancel'
ElementFont = efCSS
ElementFont = efCSS
ElementPosition = epRelative
ElementPosition = epRelative
...
@@ -182,7 +180,6 @@ object FViewItems: TFViewItems
...
@@ -182,7 +180,6 @@ object FViewItems: TFViewItems
Height = 25
Height = 25
Caption = 'Delete'
Caption = 'Delete'
ChildOrder = 79
ChildOrder = 79
ElementClassName = 'btn btn-light'
ElementID = 'btndelete'
ElementID = 'btndelete'
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
...
@@ -197,7 +194,6 @@ object FViewItems: TFViewItems
...
@@ -197,7 +194,6 @@ object FViewItems: TFViewItems
Height = 25
Height = 25
Caption = 'Edit'
Caption = 'Edit'
ChildOrder = 83
ChildOrder = 83
ElementClassName = 'btn btn-light'
ElementID = 'btnedit'
ElementID = 'btnedit'
ElementFont = efCSS
ElementFont = efCSS
HeightStyle = ssAuto
HeightStyle = ssAuto
...
...
kgOrdersClient/View.Items.html
View file @
facf79ff
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</div>
</div>
</form>
</form>
<table
class=
"table table-responsive table-striped table-bordered"
id=
"tblPhoneGrid"
>
<table
class=
"table table-responsive table-striped table-
hover table-
bordered"
id=
"tblPhoneGrid"
>
<thead
class=
"thead-dark"
>
<thead
class=
"thead-dark"
>
<tr>
<tr>
<th
scope=
"col"
>
ID
</th>
<th
scope=
"col"
>
ID
</th>
...
...
kgOrdersClient/View.Items.pas
View file @
facf79ff
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
// to sort the entries, filter their search, and search for a specific person.
// to sort the entries, filter their search, and search for a specific person.
// Authors:
// Authors:
// Cameron Hayes
// Cameron Hayes
// Mac
...
// Mac
Stephens
unit
View
.
Items
;
unit
View
.
Items
;
...
@@ -115,46 +115,74 @@ begin
...
@@ -115,46 +115,74 @@ begin
cbStatus
.
enabled
:=
true
;
cbStatus
.
enabled
:=
true
;
end
;
end
;
procedure
TFViewItems
.
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
procedure
TFViewItems
.
AddRowToTable
(
ID
,
Name
,
Description
,
Status
:
string
);
// Adds rows to the table
// Adds one row to #tblPhoneGrid and lets Bootstrap 5.3 highlight the row
// ID: item ID
// with its built-in `table-active` class when the user clicks it.
// Name: item name
// Description: item description
// Status: inactive or active
var
var
NewRow
,
Cell
,
P
,
Button
,
Audio
:
TJSHTMLElement
;
NewRow
,
Cell
:
TJSHTMLElement
;
begin
begin
NewRow
:=
TJSHTMLElement
(
document
.
createElement
(
'tr'
));
NewRow
:=
TJSHTMLElement
(
document
.
createElement
(
'tr'
));
// Item ID Cell
// Row-select click handler
NewRow
.
addEventListener
(
'click'
,
procedure
(
Event
:
TJSMouseEvent
)
var
TBody
:
TJSHTMLElement
;
Rows
:
TJSHTMLCollection
;
I
:
Integer
;
RowElem
:
TJSHTMLElement
;
begin
// Grab the <tbody> once and cast it
TBody
:=
TJSHTMLElement
(
(
document
.
getElementById
(
'tblPhoneGrid'
)
as
TJSHTMLElement
)
.
getElementsByTagName
(
'tbody'
)[
0
]
);
// Remove 'table-active' from every existing row
Rows
:=
TBody
.
children
;
for
I
:=
0
to
Rows
.
length
-
1
do
begin
RowElem
:=
TJSHTMLElement
(
Rows
.
item
(
I
));
// ? cast Node ? HTMLElement
RowElem
.
classList
.
remove
(
'table-primary'
);
end
;
// Add highlight to the clicked row
TJSHTMLElement
(
Event
.
currentTarget
).
classList
.
add
(
'table-primary'
);
end
);
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Item ID'
);
Cell
.
setAttribute
(
'data-label'
,
'Item ID'
);
Cell
.
innerText
:=
ID
;
Cell
.
innerText
:=
ID
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
// Name Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Name'
);
Cell
.
setAttribute
(
'data-label'
,
'Name'
);
Cell
.
innerText
:=
Name
;
Cell
.
innerText
:=
Name
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
// Description Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Description'
);
Cell
.
setAttribute
(
'data-label'
,
'Description'
);
Cell
.
innerText
:=
Description
;
Cell
.
innerText
:=
Description
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
// Status Cell
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
:=
TJSHTMLElement
(
document
.
createElement
(
'td'
));
Cell
.
setAttribute
(
'data-label'
,
'Status'
);
Cell
.
setAttribute
(
'data-label'
,
'Status'
);
Cell
.
innerText
:=
Status
;
Cell
.
innerText
:=
Status
;
NewRow
.
appendChild
(
Cell
);
NewRow
.
appendChild
(
Cell
);
// Appends new rows to the table body
TJSHTMLElement
(
TJSHTMLElement
(
document
.
getElementById
(
'tblPhoneGrid'
).
getElementsByTagName
(
'tbody'
)[
0
]).
appendChild
(
NewRow
);
(
document
.
getElementById
(
'tblPhoneGrid'
)
as
TJSHTMLElement
)
.
getElementsByTagName
(
'tbody'
)[
0
]
).
appendChild
(
NewRow
);
Utils
.
HideSpinner
(
'spinner'
);
Utils
.
HideSpinner
(
'spinner'
);
end
;
end
;
procedure
TFViewItems
.
GeneratePagination
(
TotalPages
:
Integer
);
procedure
TFViewItems
.
GeneratePagination
(
TotalPages
:
Integer
);
// Generates pagination for the table.
// Generates pagination for the table.
// TotalPages: Total amount of pages generated by the search
// TotalPages: Total amount of pages generated by the search
...
...
kgOrdersClient/webKGOrders.dproj
View file @
facf79ff
...
@@ -208,7 +208,6 @@
...
@@ -208,7 +208,6 @@
<DCCReference Include="Utils.pas"/>
<DCCReference Include="Utils.pas"/>
<DCCReference Include="View.AddItem.pas">
<DCCReference Include="View.AddItem.pas">
<Form>fViewAddItem</Form>
<Form>fViewAddItem</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
</DCCReference>
<None Include="index.html"/>
<None Include="index.html"/>
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
facf79ff
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
MemoLogLevel
=
3
FileLogLevel
=
5
FileLogLevel
=
5
webClientVersion
=
0.9.4
webClientVersion
=
0.9.4
LogFileNum
=
7
19
LogFileNum
=
7
21
[Database]
[Database]
--Server
=
192.168.159.131
--Server
=
192.168.159.131
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment