Skip to content

Commit b792094

Browse files
Improvement: Get rid of legacy code for moodleversionminfourtwo CSS stylings.
1 parent c0022f4 commit b792094

4 files changed

Lines changed: 4 additions & 22 deletions

File tree

classes/output/table.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,6 @@ public function return_as_list() {
807807
$data['shoppingcartisavailable'] = true;
808808
}
809809

810-
// We need a param to check in the css if the version is minimum 4.2.
811-
if ($CFG->version >= 2023042400) {
812-
$data['moodleversionminfourtwo'] = 'moodleversionminfourtwo';
813-
}
814-
815810
// Make sure switchtemplates array is not passed, if it's empty.
816811
if (empty($this->switchtemplates)) {
817812
$data['switchtemplates'] = null;

styles.css

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -167,28 +167,15 @@
167167
.wunderbyte-table-table th[data-sortable]::before {
168168
content: "\f0de";
169169
font-size: 14px;
170-
font-family: 'FontAwesome', 'Font Awesome 6 Free';
171-
top: 35%;
172-
right: 0;
173-
}
174-
175-
.wunderbyte-table-table th[data-sortable]::after {
176-
content: "\f0d7";
177-
font-size: 14px;
178-
font-family: 'FontAwesome', 'Font Awesome 6 Free';
179-
top: 40%;
180-
}
181-
182-
.wunderbyte-table-table.moodleversionminfourtwo th[data-sortable]::before {
183-
content: "\f0de";
184170
font: var(--fa-font-solid);
185171
font-family: 'FontAwesome', 'Font Awesome 6 Free';
186172
top: 35%;
187173
right: 0;
188174
}
189175

190-
.wunderbyte-table-table.moodleversionminfourtwo th[data-sortable]::after {
176+
.wunderbyte-table-table th[data-sortable]::after {
191177
content: "\f0dd";
178+
font-size: 14px;
192179
font: var(--fa-font-solid);
193180
font-family: 'FontAwesome', 'Font Awesome 6 Free';
194181
top: 40%;

templates/twtable_cards.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<div class="float-end">{{> local_wunderbyte_table/component_selectrows }}</div>
9292
</div>
9393
{{/displayelementsontop}}
94-
<div class="wunderbyte-table-table {{moodleversionminfourtwo}}">
94+
<div class="wunderbyte-table-table">
9595
{{> local_wunderbyte_table/component_countlabel }}
9696
{{#table}}
9797
<div class="wunderbyte-table-grid no-overflow rows-container">

templates/twtable_list.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
<div class="float-end">{{> local_wunderbyte_table/component_selectrows }}</div>
9292
</div>
9393
{{/displayelementsontop}}
94-
<div class="wunderbyte-table-table {{moodleversionminfourtwo}}">
94+
<div class="wunderbyte-table-table">
9595
{{> local_wunderbyte_table/component_countlabel }}
9696
<div {{#stickyheader}} class="scroll-y" {{#tableheight}}
9797
style="height: {{tableheight}}px;" {{/tableheight}}{{/stickyheader}}>

0 commit comments

Comments
 (0)