Skip to content

Commit 898f066

Browse files
authored
Merge branch '5.4-dev' into 5.4-dev-update-browserlist-2026-02-17
2 parents 6804471 + 805f3f8 commit 898f066

File tree

6 files changed

+26
-248
lines changed

6 files changed

+26
-248
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ You are welcome to submit a contribution for review and possible inclusion in th
1212

1313
* Report security issues to the Joomla! Security Strike Team (JSST) at security@joomla.org or use the [JSST contact form](https://developer.joomla.org/contact-security-team.html). Please do not use the public tracker for security issues. Find [here](https://github.com/joomla/joomla-cms?tab=security-ov-file#readme) more information about the [Security Policies and Procedures](https://github.com/joomla/joomla-cms?tab=security-ov-file#readme).
1414

15+
* Please follow our [Generative AI policy](https://developer.joomla.org/generative-ai-policy.html) when using AI to contribute to the Joomla! project
16+
1517
Please be patient as not all items will be viewed or tested immediately (remember, all bug testing for the Joomla! CMS is done by volunteers) and be receptive to feedback about your code.
1618

1719
#### Branches

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Pull Request resolves # .
22

3+
- [ ] I read the [Generative AI policy](https://developer.joomla.org/generative-ai-policy.html) and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.
4+
35
### Summary of Changes
46

57

build/media_source/system/css/fields/calendar-rtl.css

Lines changed: 0 additions & 227 deletions
This file was deleted.

build/media_source/system/joomla.asset.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,6 @@
254254
"type": "style",
255255
"uri": "system/fields/calendar.css"
256256
},
257-
{
258-
"name": "field.calendar-rtl",
259-
"type": "style",
260-
"uri": "system/fields/calendar-rtl.css"
261-
},
262257
{
263258
"name": "field.calendar.helper",
264259
"type": "script",

build/media_source/system/js/fields/calendar.es5.js

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@
297297
if (window.innerHeight < containerTmp.getBoundingClientRect().bottom + 20) {
298298
containerTmp.style.marginTop = - (containerTmp.getBoundingClientRect().height + this.inputField.getBoundingClientRect().height) + "px";
299299
} else {
300-
containerTmp.style.marginTop = 'initial';
301-
}
300+
containerTmp.style.marginTop = 'initial';
301+
}
302302

303303
this.processCalendar();
304304
};
@@ -653,10 +653,10 @@
653653
}
654654
this.firstdayname = (this.params.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
655655

656-
// Check if the direction is 'rtl' and reverse the shortDays array if true
657-
if (this.params.direction === 'rtl') {
658-
this.strings.shortDays.reverse();
659-
}
656+
// Check if the direction is 'rtl' and reverse the shortDays array if true
657+
if (this.params.direction === 'rtl') {
658+
this.strings.shortDays.reverse();
659+
}
660660

661661
var fdow = this.params.firstDayOfWeek,
662662
cell = this.firstdayname,
@@ -697,20 +697,26 @@
697697
if (this.params.showsTime) {
698698
row = createElement("tr", tbody);
699699
row.className = "time";
700+
row.classList.add('calendar-time-row'); // New: mark row for LTR
700701

701702
var cell = createElement("td", row);
702703
cell.className = "time time-title";
703704
cell.colSpan = 1;
704705
cell.style.verticalAlign = 'middle';
705706
cell.innerHTML = " ";
706707

707-
var cell1 = createElement("td", row);
708-
cell1.className = "time hours-select";
709-
cell1.colSpan = self.params.time24 ? 3 : 2;
708+
var hoursCell = createElement("td", row);
709+
hoursCell.className = "time hours-select";
710+
hoursCell.colSpan = self.params.time24 ? 3 : 2;
710711

711-
var cell2 = createElement("td", row);
712-
cell2.className = "time minutes-select";
713-
cell2.colSpan = self.params.time24 ? 3 : 2;
712+
var minutesCell = createElement("td", row);
713+
minutesCell.className = "time minutes-select";
714+
minutesCell.colSpan = self.params.time24 ? 3 : 2;
715+
716+
// Swap DOM order in RTL so visual order remains Hours | Minutes
717+
if (this.params.direction === 'rtl') {
718+
row.insertBefore(minutesCell, hoursCell);
719+
}
714720

715721
(function () {
716722
function makeTimePart(className, selected, range_start, range_end, cellTml) {
@@ -746,8 +752,8 @@
746752
hrs -= 12;
747753
}
748754

749-
var H = makeTimePart("time time-hours form-control form-select", hrs, t12 ? 1 : 0, t12 ? 12 : 23, cell1),
750-
M = makeTimePart("time time-minutes form-control form-select", mins, 0, 59, cell2),
755+
var H = makeTimePart("time time-hours form-control form-select", hrs, t12 ? 1 : 0, t12 ? 12 : 23, hoursCell),
756+
M = makeTimePart("time time-minutes form-control form-select", mins, 0, 59, minutesCell),
751757
AP = null;
752758

753759

@@ -1113,7 +1119,7 @@
11131119

11141120
for (var i = 0; i < elements.length; i++) {
11151121
var element = elements[i],
1116-
instance = element._joomlaCalendar;
1122+
instance = element._joomlaCalendar;
11171123

11181124
if (instance) {
11191125
instance.setAltValue();

layouts/joomla/form/field/calendar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
// Redefine locale/helper assets to use correct path, and load calendar assets
143143
$document->getWebAssetManager()
144144
->registerAndUseScript('field.calendar.helper', $helperPath, [], ['defer' => true])
145-
->useStyle('field.calendar' . ($direction === 'rtl' ? '-rtl' : ''))
145+
->useStyle('field.calendar')
146146
->useScript('field.calendar');
147147

148148
?>

0 commit comments

Comments
 (0)