', {
+ class: 'o_date_value ' + this.$el.attr('class'),
+ text: hijri_value,
+ })
+ ]).appendTo($div);
this.datewidget.appendTo('
').then(function () {
self._replaceElement($div);
diff --git a/odex25_base/web_hijri_datepicker/static/src/scss/web_hijri_date.scss b/odex25_base/web_hijri_datepicker/static/src/scss/web_hijri_date.scss
index 6098df1e3..acf3d8c81 100644
--- a/odex25_base/web_hijri_datepicker/static/src/scss/web_hijri_date.scss
+++ b/odex25_base/web_hijri_datepicker/static/src/scss/web_hijri_date.scss
@@ -60,44 +60,34 @@
.o_datepicker {
.o_datepicker_button {
&.o_hijri_datepicker_button {
- position: absolute;
- right: 0;
- top: 50%;
- transform: translateY(-50%);
+ top: 30px;
}
}
- // Hijri field container
- .o_hijri_field_container {
- margin-top: 8px;
+ // New styles for date labels and sections
+ .o_date_section {
+ margin-bottom: 5px;
- .o_hijri_field_row {
+ .o_date_label {
+ display: block;
+ font-size: 11px;
+ font-weight: 600;
+ color: #6c757d;
+ margin-bottom: 2px;
+
+ &.o_gregorian_label {
+ color: #007bff;
+ }
+
+ &.o_hijri_label {
+ color: #28a745;
+ }
+ }
+
+ .o_date_input_container {
+ position: relative;
display: flex;
align-items: center;
-
- .o_hijri_label_container {
- min-width: 120px;
- padding-right: 8px;
- text-align: right;
-
- .o_hijri_label {
- font-size: 13px;
- font-weight: normal;
- color: #495057;
- margin-bottom: 0;
- white-space: nowrap;
- }
- }
-
- .o_hijri_input_container {
- flex: 1;
- position: relative;
-
- .o_hijri {
- width: 100%;
- padding-right: 30px; // مساحة للزرار
- }
- }
}
}
}
@@ -105,81 +95,30 @@
// Form view specific styles
.o_form_view {
.o_datepicker {
- .o_hijri_field_container {
- .o_hijri_field_row {
- .o_hijri_label_container {
- min-width: 140px; // عرض أكبر في الفورم
- }
+ .o_date_section {
+ .o_date_label {
+ font-size: 12px;
+ margin-bottom: 3px;
}
}
}
}
-// Readonly mode styles for hijri field
-.o_hijri_readonly_container {
- margin-top: 8px;
-
- .o_hijri_readonly_row {
- display: flex;
- align-items: center;
+// Read-only mode improvements
+.o_field_date.o_readonly_modifier {
+ .o_date_section {
+ margin-bottom: 8px;
- .o_hijri_readonly_label {
- min-width: 120px;
- padding-right: 8px;
- text-align: right;
- font-size: 13px;
- font-weight: normal;
- color: #495057;
- white-space: nowrap;
+ .o_date_label {
+ font-size: 11px;
+ font-weight: 600;
+ color: #6c757d;
+ margin-bottom: 2px;
}
- .o_hijri_readonly_value {
- flex: 1;
+ .o_date_value {
+ padding: 2px 0;
font-size: 13px;
}
}
-}
-
-// Form view readonly specific styles
-.o_form_view {
- .o_hijri_readonly_container {
- .o_hijri_readonly_row {
- .o_hijri_readonly_label {
- min-width: 140px;
- }
- }
- }
-}
-
-// Responsive adjustments
-@media (max-width: 768px) {
- .o_datepicker {
- .o_hijri_field_container {
- .o_hijri_field_row {
- flex-direction: column;
- align-items: stretch;
-
- .o_hijri_label_container {
- min-width: auto;
- text-align: right;
- padding-right: 0;
- margin-bottom: 4px;
- }
- }
- }
- }
-
- .o_hijri_readonly_container {
- .o_hijri_readonly_row {
- flex-direction: column;
- align-items: stretch;
-
- .o_hijri_readonly_label {
- min-width: auto;
- text-align: right;
- padding-right: 0;
- margin-bottom: 4px;
- }
- }
- }
}
\ No newline at end of file
diff --git a/odex25_base/web_hijri_datepicker/static/src/xml/web_hijri_date.xml b/odex25_base/web_hijri_datepicker/static/src/xml/web_hijri_date.xml
index 8047fc9a7..1d05a7bdc 100644
--- a/odex25_base/web_hijri_datepicker/static/src/xml/web_hijri_date.xml
+++ b/odex25_base/web_hijri_datepicker/static/src/xml/web_hijri_date.xml
@@ -3,29 +3,30 @@
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+