Skip to content

Commit 199f729

Browse files
authored
Refactor | Xojo 2024r4 (#28)
* Xojo 2024r4 supports setting CSSClasses in Xojo IDE * Fix Bugs introduced with Refactoring Datasource Loading
1 parent 30fd01e commit 199f729

File tree

7 files changed

+244
-207
lines changed

7 files changed

+244
-207
lines changed

cubesql-webadmin.xojo_project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ WebLaunchBrowser=True
113113
WebLivePort=80
114114
WebSecurePort=443
115115
WebProtocol=1
116-
WebHTMLHeader=<style>\n.listboxDbHeaderAlignment th:nth-child(1)\x2C\n.listboxDbHeaderAlignment th:nth-child(3)\x2C\n.listboxDbHeaderAlignment th:nth-child(5) {\n text-align: center;\n}\n\n.listboxGroupsHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxUsersHeaderAlignment th:nth-child(2) {\n text-align: center;\n}\n\n.listboxClientsHeaderAlignment th:nth-child(1) {\n text-align: center;\n}\n\n.listboxSchedulesHeaderAlignment th:nth-child(3) {\n text-align: center;\n}\n\n.form-check-input {\n cursor:pointer;\n}\n\n.btn-light {\n --bs-btn-bg: #E5E5E8;\n}\n\ndiv.dataTables_processing > div:last-child > div {\n background-color: #003264;\n}\n\n/* Workaround for Xojo 2024r4 */\n.XojoLink {\n align-items: center;\n}\n</style>
116+
WebHTMLHeader=<style>\n.lstDatabases th:nth-child(1)\x2C\n.lstDatabases th:nth-child(3)\x2C\n.lstDatabases th:nth-child(5) {\n text-align: center;\n}\n\n.lstGroups th:nth-child(2) {\n text-align: center;\n}\n\n.lstUsers th:nth-child(2) {\n text-align: center;\n}\n\n.lstClients th:nth-child(1) {\n text-align: center;\n}\n\n.lstSchedules th:nth-child(3) {\n text-align: center;\n}\n\n.form-check-input {\n cursor:pointer;\n}\n\n.btn-light {\n --bs-btn-bg: #E5E5E8;\n}\n\ndiv.dataTables_processing > div:last-child > div {\n background-color: #003264;\n}\n\n/* Workaround for Xojo 2024r4 */\n.XojoLink {\n align-items: center;\n}\n</style>
117117
WebHostingIdentifier=
118118
WebHostingAppName=cubeSQLWebAdmin
119119
WebHostingDomain=

webapp/containers/base/cntDatasourceBase.xojo_code

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Implements WebDataSource
160160
Finally
161161
ebNeedsLoadDatasource = False
162162

163+
me.TableDatasourceLoaded()
163164

164165
End Try
165166
End Sub
@@ -333,6 +334,12 @@ Implements WebDataSource
333334
End Function
334335
#tag EndMethod
335336

337+
#tag Method, Flags = &h1
338+
Protected Sub TableDatasourceLoaded()
339+
340+
End Sub
341+
#tag EndMethod
342+
336343
#tag Method, Flags = &h1
337344
Protected Sub TableInitColumns()
338345
Redim Me.Columns(-1)

webapp/containers/data/cntDatabases.xojo_code

Lines changed: 59 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Begin cntDatasourceBase cntDatabases
33
Compatibility = ""
44
ControlCount = 0
55
ControlID = ""
6+
CSSClasses = ""
67
Enabled = True
78
Height = 500
89
Indicator = 0
@@ -15,20 +16,27 @@ Begin cntDatasourceBase cntDatabases
1516
LockRight = False
1617
LockTop = True
1718
LockVertical = False
19+
PanelIndex = 0
1820
ScrollDirection = 0
1921
TabIndex = 0
2022
Top = 0
2123
Visible = True
2224
Width = 750
2325
_mDesignHeight = 0
2426
_mDesignWidth = 0
27+
_mName = ""
2528
_mPanelIndex = -1
2629
Begin WebListBox lstInfos
2730
ColumnCount = 1
2831
ColumnWidths = ""
2932
ControlID = ""
33+
CSSClasses = "lstDatabases"
34+
DefaultRowHeight= 49
3035
Enabled = True
36+
GridLineStyle = 3
37+
HasBorder = True
3138
HasHeader = True
39+
HeaderHeight = 0
3240
Height = 380
3341
HighlightSortedColumn= True
3442
Index = -2147483648
@@ -46,6 +54,7 @@ Begin cntDatasourceBase cntDatabases
4654
LockTop = True
4755
LockVertical = False
4856
NoRowsMessage = "No Databases"
57+
PanelIndex = 0
4958
ProcessingMessage= ""
5059
RowCount = 0
5160
RowSelectionType= 1
@@ -66,6 +75,7 @@ Begin cntDatasourceBase cntDatabases
6675
Cancel = False
6776
Caption = "Drop"
6877
ControlID = ""
78+
CSSClasses = ""
6979
Default = False
7080
Enabled = False
7181
Height = 38
@@ -79,6 +89,8 @@ Begin cntDatasourceBase cntDatabases
7989
LockRight = True
8090
LockTop = False
8191
LockVertical = False
92+
Outlined = False
93+
PanelIndex = 0
8294
Scope = 2
8395
TabIndex = 4
8496
TabStop = True
@@ -93,6 +105,7 @@ Begin cntDatasourceBase cntDatabases
93105
Cancel = False
94106
Caption = "Stop"
95107
ControlID = ""
108+
CSSClasses = ""
96109
Default = False
97110
Enabled = False
98111
Height = 38
@@ -106,7 +119,8 @@ Begin cntDatasourceBase cntDatabases
106119
LockRight = True
107120
LockTop = False
108121
LockVertical = False
109-
PanelIndex = "0"
122+
Outlined = False
123+
PanelIndex = 0
110124
Scope = 2
111125
TabIndex = 3
112126
TabStop = True
@@ -121,6 +135,7 @@ Begin cntDatasourceBase cntDatabases
121135
Cancel = False
122136
Caption = "Create"
123137
ControlID = ""
138+
CSSClasses = ""
124139
Default = False
125140
Enabled = True
126141
Height = 38
@@ -134,7 +149,8 @@ Begin cntDatasourceBase cntDatabases
134149
LockRight = False
135150
LockTop = False
136151
LockVertical = False
137-
PanelIndex = "0"
152+
Outlined = False
153+
PanelIndex = 0
138154
Scope = 2
139155
TabIndex = 1
140156
TabStop = True
@@ -149,6 +165,7 @@ Begin cntDatasourceBase cntDatabases
149165
Cancel = False
150166
Caption = "Start"
151167
ControlID = ""
168+
CSSClasses = ""
152169
Default = False
153170
Enabled = False
154171
Height = 38
@@ -162,7 +179,8 @@ Begin cntDatasourceBase cntDatabases
162179
LockRight = True
163180
LockTop = False
164181
LockVertical = False
165-
PanelIndex = "0"
182+
Outlined = False
183+
PanelIndex = 0
166184
Scope = 2
167185
TabIndex = 2
168186
TabStop = True
@@ -177,6 +195,7 @@ Begin cntDatasourceBase cntDatabases
177195
Cancel = False
178196
Caption = "Rename"
179197
ControlID = ""
198+
CSSClasses = ""
180199
Default = False
181200
Enabled = False
182201
Height = 38
@@ -190,7 +209,8 @@ Begin cntDatasourceBase cntDatabases
190209
LockRight = True
191210
LockTop = False
192211
LockVertical = False
193-
PanelIndex = "0"
212+
Outlined = False
213+
PanelIndex = 0
194214
Scope = 2
195215
TabIndex = 9
196216
TabStop = True
@@ -202,6 +222,7 @@ Begin cntDatasourceBase cntDatabases
202222
End
203223
Begin WebMessageDialog dlgDrop
204224
ControlID = ""
225+
CSSClasses = ""
205226
Enabled = True
206227
Explanation = ""
207228
Index = -2147483648
@@ -214,6 +235,7 @@ Begin cntDatasourceBase cntDatabases
214235
LockTop = True
215236
LockVertical = False
216237
Message = ""
238+
PanelIndex = 0
217239
Scope = 2
218240
Title = ""
219241
Tooltip = ""
@@ -224,6 +246,7 @@ Begin cntDatasourceBase cntDatabases
224246
Cancel = False
225247
Caption = "Download"
226248
ControlID = ""
249+
CSSClasses = ""
227250
Default = False
228251
Enabled = False
229252
Height = 38
@@ -237,7 +260,8 @@ Begin cntDatasourceBase cntDatabases
237260
LockRight = False
238261
LockTop = False
239262
LockVertical = False
240-
PanelIndex = "0"
263+
Outlined = False
264+
PanelIndex = 0
241265
Scope = 2
242266
TabIndex = 6
243267
TabStop = True
@@ -249,17 +273,20 @@ Begin cntDatasourceBase cntDatabases
249273
End
250274
Begin WebThread thrUpload
251275
DebugIdentifier = ""
276+
Enabled = True
252277
Index = -2147483648
253278
LockedInPosition= True
254279
Priority = 5
255280
Scope = 2
256281
StackSize = 0
257282
ThreadID = 0
258283
ThreadState = ""
284+
Type = ""
259285
End
260286
Begin WebProgressWheel pgrWheel
261287
Colorize = False
262288
ControlID = ""
289+
CSSClasses = ""
263290
Enabled = True
264291
Height = 32
265292
Index = -2147483648
@@ -272,7 +299,7 @@ Begin cntDatasourceBase cntDatabases
272299
LockRight = False
273300
LockTop = False
274301
LockVertical = False
275-
PanelIndex = "0"
302+
PanelIndex = 0
276303
Parent = "rctFilter"
277304
Scope = 2
278305
SVGColor = &c00000000
@@ -292,6 +319,7 @@ Begin cntDatasourceBase cntDatabases
292319
Index = -2147483648
293320
Location = 0
294321
LockedInPosition= True
322+
PanelIndex = 0
295323
Period = 500
296324
RunMode = 0
297325
Scope = 2
@@ -303,6 +331,7 @@ Begin cntDatasourceBase cntDatabases
303331
Index = -2147483648
304332
Location = 0
305333
LockedInPosition= True
334+
PanelIndex = 0
306335
Period = 500
307336
RunMode = 0
308337
Scope = 2
@@ -313,6 +342,7 @@ Begin cntDatasourceBase cntDatabases
313342
Cancel = False
314343
Caption = "Upload"
315344
ControlID = ""
345+
CSSClasses = ""
316346
Default = False
317347
Enabled = True
318348
Height = 38
@@ -326,7 +356,8 @@ Begin cntDatasourceBase cntDatabases
326356
LockRight = False
327357
LockTop = False
328358
LockVertical = False
329-
PanelIndex = "0"
359+
Outlined = False
360+
PanelIndex = 0
330361
Scope = 2
331362
TabIndex = 5
332363
TabStop = True
@@ -342,26 +373,30 @@ Begin cntDatasourceBase cntDatabases
342373
Index = -2147483648
343374
Location = 0
344375
LockedInPosition= True
376+
PanelIndex = 0
345377
Period = 500
346378
RunMode = 0
347379
Scope = 2
348380
_mPanelIndex = -1
349381
End
350382
Begin WebThread thrDownload
351383
DebugIdentifier = ""
384+
Enabled = True
352385
Index = -2147483648
353386
LockedInPosition= True
354387
Priority = 5
355388
Scope = 2
356389
StackSize = 0
357390
ThreadID = 0
358391
ThreadState = ""
392+
Type = ""
359393
End
360394
Begin WebButton btnEncryption
361395
AllowAutoDisable= False
362396
Cancel = False
363397
Caption = "Encryption"
364398
ControlID = ""
399+
CSSClasses = ""
365400
Default = False
366401
Enabled = False
367402
Height = 38
@@ -375,7 +410,8 @@ Begin cntDatasourceBase cntDatabases
375410
LockRight = True
376411
LockTop = False
377412
LockVertical = False
378-
PanelIndex = "0"
413+
Outlined = False
414+
PanelIndex = 0
379415
Scope = 2
380416
TabIndex = 8
381417
TabStop = True
@@ -387,6 +423,7 @@ Begin cntDatasourceBase cntDatabases
387423
End
388424
Begin WebMessageDialog dlgDecrypt
389425
ControlID = ""
426+
CSSClasses = ""
390427
Enabled = True
391428
Explanation = ""
392429
Index = -2147483648
@@ -399,7 +436,7 @@ Begin cntDatasourceBase cntDatabases
399436
LockTop = True
400437
LockVertical = False
401438
Message = ""
402-
PanelIndex = "0"
439+
PanelIndex = 0
403440
Scope = 2
404441
Title = ""
405442
Tooltip = ""
@@ -410,6 +447,7 @@ Begin cntDatasourceBase cntDatabases
410447
Cancel = False
411448
Caption = "Schedules"
412449
ControlID = ""
450+
CSSClasses = ""
413451
Default = False
414452
Enabled = False
415453
Height = 38
@@ -423,7 +461,8 @@ Begin cntDatasourceBase cntDatabases
423461
LockRight = True
424462
LockTop = False
425463
LockVertical = False
426-
PanelIndex = "0"
464+
Outlined = False
465+
PanelIndex = 0
427466
Scope = 2
428467
TabIndex = 7
429468
TabStop = True
@@ -435,6 +474,7 @@ Begin cntDatasourceBase cntDatabases
435474
End
436475
Begin WebMessageDialog dlgMessage
437476
ControlID = ""
477+
CSSClasses = ""
438478
Enabled = True
439479
Explanation = ""
440480
Index = -2147483648
@@ -447,6 +487,7 @@ Begin cntDatasourceBase cntDatabases
447487
LockTop = True
448488
LockVertical = False
449489
Message = ""
490+
PanelIndex = 0
450491
Scope = 2
451492
Title = ""
452493
Tooltip = ""
@@ -1186,12 +1227,6 @@ End
11861227
#tag EndWindowCode
11871228

11881229
#tag Events lstInfos
1189-
#tag Event
1190-
Sub Opening()
1191-
Me.ExecuteJavaScript("$('#" + Me.ControlID + "').addClass('listboxDbHeaderAlignment')")
1192-
1193-
End Sub
1194-
#tag EndEvent
11951230
#tag Event
11961231
Sub SelectionChanged(rows() As Integer)
11971232
#Pragma unused rows
@@ -1512,6 +1547,14 @@ End
15121547
#tag EndEvent
15131548
#tag EndEvents
15141549
#tag ViewBehavior
1550+
#tag ViewProperty
1551+
Name="PanelIndex"
1552+
Visible=false
1553+
Group="Behavior"
1554+
InitialValue=""
1555+
Type="Integer"
1556+
EditorType=""
1557+
#tag EndViewProperty
15151558
#tag ViewProperty
15161559
Name="Area"
15171560
Visible=false

0 commit comments

Comments
 (0)