OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Minimal attempt for mobile optimisations of the datepicker
Henriette Darge11c942325c91
diff --git a/app/assets/stylesheets/content/_forms_mobile.sass b/app/assets/stylesheets/content/_forms_mobile.sassindex 603606bb0b9..db52755eb3b 100644--- a/app/assets/stylesheets/content/_forms_mobile.sass+++ b/app/assets/stylesheets/content/_forms_mobile.sass@@ -50,7 +50,7 @@max-width: 100%#tab-content-info form,- .op-modal--modal-body,+ .op-modal--modal-body form:not(.-vertical),form.-wide-labels .op-modal--modal-body.form--label,.form--field-containerdiff --git a/frontend/src/app/components/datepicker/datepicker.modal.ts b/frontend/src/app/components/datepicker/datepicker.modal.tsindex 94e5563d47b..51a8893cafb 100644--- a/frontend/src/app/components/datepicker/datepicker.modal.ts+++ b/frontend/src/app/components/datepicker/datepicker.modal.ts@@ -47,12 +47,13 @@ import {DatePicker} from "core-app/modules/common/op-date-picker/datepicker";import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service";import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset";import {DatePickerModalHelper} from "core-components/datepicker/datepicker.modal.helper";+import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service";export type DateKeys = 'date'|'start'|'end';@Component({templateUrl: './datepicker.modal.html',- styleUrls: ['./datepicker.modal.sass'],+ styleUrls: ['./datepicker.modal.sass', './datepicker_mobile.modal.sass'],changeDetection: ChangeDetectionStrategy.OnPush,encapsulation: ViewEncapsulation.None})@@ -61,6 +62,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit {@InjectField() timezoneService:TimezoneService;@InjectField() halEditing:HalResourceEditingService;@InjectField() datepickerHelper:DatePickerModalHelper;+ @InjectField() browserDetector:BrowserDetector;text = {save: this.I18n.t('js.button_save'),@@ -196,7 +198,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit {this.singleDate ? this.dates.date : [this.dates.start, this.dates.end],{mode: this.singleDate ? 'single' : 'multiple',- showMonths: 2,+ showMonths: this.browserDetector.isMobile ? 1 : 2,inline: true,onChange: (dates:Date[]) => {this.handleDatePickerChange(dates);diff --git a/frontend/src/app/components/datepicker/datepicker_mobile.modal.sass b/frontend/src/app/components/datepicker/datepicker_mobile.modal.sassnew file mode 100644index 00000000000..202d2c86acb--- /dev/null+++ b/frontend/src/app/components/datepicker/datepicker_mobile.modal.sass@@ -0,0 +1,7 @@+@media screen and (max-width: 679px)+ .datepicker-modal--dates-container+ grid-template-columns: 1fr 1fr+ grid-template-rows: 75px 40px++ .datepicker-modal--scheduling-action-container+ margin: 10px 0\ No newline at end of file