Right-align table cells containing numerical values.

Commit
3d4dad4210f488a8f5e012985b6bec0a9426e12e
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
Changed files
src/MyFitnessTracker/MFTWeightsListPage.class.st
index 7780bf14..8bdc6cfe 100644..100644
@@ -110,14 +110,18 @@
110 110 html tableHead: [
111 111 html
112 112 tableHeading;
113 Removed: tableHeading: 'Date';
114 Removed: tableHeading: 'Value' ].
113 Added: tableHeading: 'Date'.
114 Added: html tableHeading
115 Added: style: 'text-align: right';
116 Added: with: 'Value' ].
115 117 weights doWithIndex: [ :weight :i |
116 118 html tableRow: [
117 119 html tableData: [
118 120 self renderWeightActionsButtonGroupOn: html at: i ].
119 121 html tableData: weight date yyyymmdd.
120 Removed: html tableData: weight value ] ] ]
122 Added: html tableData
123 Added: style: 'text-align: right';
124 Added: with: weight value ] ] ]
121 125 ]
122 126
123 127 { #category : #adding }
src/MyFitnessTracker/MFTWorkout.class.st
index 64c781a9..f0506b49 100644..100644
@@ -206,10 +206,14 @@
206 206 totalVolume := (exercises collect: #volume) sum.
207 207
208 208 html tableFoot: [
209 Removed: html
210 Removed: tableData: 'Total';
211 Removed: tableData: totalReps.
212 Removed: totalVolume ~~ 0 ifTrue: [ html tableData: totalVolume ] ]
209 Added: html tableData: 'Total'.
210 Added: html tableData
211 Added: style: 'text-align: right';
212 Added: with: totalReps.
213 Added: totalVolume ~~ 0 ifTrue: [
214 Added: html tableData
215 Added: style: 'text-align: right';
216 Added: with: totalVolume ] ]
213 217 ]
214 218
215 219 { #category : #rendering }
@@ -228,12 +232,18 @@
228 232 exercise sets
229 233 ifNotEmpty: [
230 234 html text: exercise repsBySet asCommaString.
231 Removed: html tableData: exercise repsBySet sum ]
235 Added: html tableData
236 Added: style: 'text-align: right';
237 Added: with: exercise repsBySet sum ]
232 238 ifEmpty: [
233 239 html text: 0.
234 Removed: html tableData: 0 ] ].
240 Added: html tableData
241 Added: style: 'text-align: right';
242 Added: with: 0 ] ].
235 243 (exercises anySatisfy: [ :ex | ex volume ~~ 0 ]) ifTrue: [
236 Removed: html tableData: exercise volume ] ] ].
244 Added: html tableData
245 Added: style: 'text-align: right';
246 Added: with: exercise volume ] ] ].
237 247 self renderExerciseTableFooterOn: html ]
238 248 ]
239 249
@@ -241,11 +251,15 @@
241 251 MFTWorkout >> renderTableHeaderOn: html [
242 252
243 253 html tableHead: [
244 Removed: html
245 Removed: tableHeading: 'Exercise';
246 Removed: tableHeading: 'Reps'.
254 Added: html tableHeading: 'Exercise'.
255 Added: html tableHeading
256 Added: style: 'text-align: right';
257 Added: with: 'Reps'.
247 258 (exercises anySatisfy: [ :exercise | exercise volume ~~ 0 ])
248 Removed: ifTrue: [ html tableHeading: 'Volume' ] ]
259 Added: ifTrue: [
260 Added: html tableHeading
261 Added: style: 'text-align: right';
262 Added: with: 'Volume' ] ]
249 263 ]
250 264
251 265 { #category : #'as yet unclassified' }