Skip to content

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

Hide cancel button and empty action bars on mobile

Oliver Günther981053e5a6c5
diff --git a/app/views/projects/_project_export_modal.html.erb b/app/views/projects/_project_export_modal.html.erb
index 458383ba30d..c9386bbab3e 100644
--- a/app/views/projects/_project_export_modal.html.erb
+++ b/app/views/projects/_project_export_modal.html.erb
@@ -46,10 +46,10 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
</ul>
</div>
- <div class="spot-action-bar">
+ <div class="spot-action-bar hidden-for-mobile">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
dynamic-content-modal-close-button
title=<%= t(:button_cancel) %>
><%= t(:button_cancel) %></button>
diff --git a/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html b/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
index a77a47c7066..3b1cff9062b 100644
--- a/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
+++ b/frontend/src/app/features/boards/board/add-list-modal/add-list-modal.html
@@ -48,7 +48,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
data-qa-selector="confirmation-modal--cancel"
(click)="closeMe($event)"
[textContent]="text.button_cancel"
diff --git a/frontend/src/app/features/boards/board/configuration-modal/board-configuration.modal.html b/frontend/src/app/features/boards/board/configuration-modal/board-configuration.modal.html
index c4a56778a43..4a5dbf708f7 100644
--- a/frontend/src/app/features/boards/board/configuration-modal/board-configuration.modal.html
+++ b/frontend/src/app/features/boards/board/configuration-modal/board-configuration.modal.html
@@ -13,7 +13,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.cancelButton"
(click)="closeMe($event)"
></button>
diff --git a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
index b5c45797cf4..e10b0133370 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
+++ b/frontend/src/app/features/work-packages/components/wp-table/configuration-modal/wp-table-configuration.modal.html
@@ -25,7 +25,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.cancelButton"
(click)="closeMe($event)"
>
diff --git a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
index 8eda9f3598b..d25dd18d89d 100644
--- a/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
+++ b/frontend/src/app/shared/components/datepicker/multi-date-modal/multi-date.modal.html
@@ -117,7 +117,7 @@
<button
type="button"
(click)="cancel()"
- class="op-datepicker-modal--action button button_no-margin spot-action-bar--action"
+ class="op-datepicker-modal--action spot-modal--cancel-button button button_no-margin spot-action-bar--action"
data-qa-selector="op-datepicker-modal--action"
[textContent]="text.cancel"
></button>
diff --git a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
index 4442a33715b..bd7f246e9dd 100644
--- a/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
+++ b/frontend/src/app/shared/components/datepicker/single-date-modal/single-date.modal.html
@@ -61,7 +61,7 @@
<button
type="button"
(click)="cancel()"
- class="op-datepicker-modal--action button button_no-margin spot-action-bar--action"
+ class="op-datepicker-modal--action spot-modal--cancel-button button button_no-margin spot-action-bar--action"
data-qa-selector="op-datepicker-modal--action"
[textContent]="text.cancel"
></button>
diff --git a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
index 1fbccc47cb9..6f7848e3d60 100644
--- a/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
+++ b/frontend/src/app/shared/components/grids/widgets/add/add.modal.html
@@ -37,11 +37,11 @@
</ul>
</div>
- <div class="spot-action-bar">
+ <div class="spot-action-bar hidden-for-mobile">
<div class="spot-action-bar--right">
<button
type="button"
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
(click)="closeMe()"
>
{{ text.cancel_button }}
diff --git a/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html b/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
index c44713238ce..15cddfadb92 100644
--- a/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
+++ b/frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
@@ -20,7 +20,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.cancelButton"
(click)="closeMe($event)"
></button>
diff --git a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
index ac51ffb8631..34257f6bbe9 100644
--- a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
+++ b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
@@ -27,7 +27,7 @@
<div class="spot-action-bar--right">
<button
type="button"
- class="button spot-action-bar--action"
+ class="button spot-modal--cancel-button spot-action-bar--action"
data-qa-selector="confirmation-modal--cancel"
(click)="closeMe($event)"
>
diff --git a/frontend/src/app/shared/components/modals/export-modal/wp-table-export.modal.html b/frontend/src/app/shared/components/modals/export-modal/wp-table-export.modal.html
index 9fa9a37bbb2..b3428bec82e 100644
--- a/frontend/src/app/shared/components/modals/export-modal/wp-table-export.modal.html
+++ b/frontend/src/app/shared/components/modals/export-modal/wp-table-export.modal.html
@@ -22,11 +22,11 @@
</li>
</ul>
</div>
- <div class="spot-action-bar">
+ <div class="spot-action-bar hidden-for-mobile">
<div class="spot-action-bar--right">
<button
type="button"
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
(click)="closeMe()"
>
{{ text.cancelButton }}
diff --git a/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.html b/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.html
index b0af7fe636f..8d18ccac94c 100644
--- a/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.html
+++ b/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.html
@@ -31,7 +31,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="additionalText.cancel_button"
(click)="closeMe()"
>
diff --git a/frontend/src/app/shared/components/modals/save-modal/save-query.modal.html b/frontend/src/app/shared/components/modals/save-modal/save-query.modal.html
index a02d4eaf8b4..a87080362c1 100644
--- a/frontend/src/app/shared/components/modals/save-modal/save-query.modal.html
+++ b/frontend/src/app/shared/components/modals/save-modal/save-query.modal.html
@@ -44,7 +44,7 @@
<div class="spot-action-bar--right">
<button
type="button"
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.button_cancel"
(click)="closeMe($event)"
></button>
diff --git a/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.html b/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.html
index fcc3ead7504..edffc9ecfe6 100644
--- a/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.html
+++ b/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.html
@@ -16,7 +16,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
- <button class="button button_no-margin spot-action-bar--action"
+ <button class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.button_cancel"
[disabled]="isBusy"
(click)="closeMe($event)">
diff --git a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
index 2e2d256b018..fb178b62cc6 100644
--- a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
+++ b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.html
@@ -62,7 +62,7 @@
<div class="spot-action-bar">
<div class="spot-action-bar--right">
<button
- class="button button_no-margin spot-action-bar--action"
+ class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
[textContent]="text.cancel"
(click)="closeMe($event)"
></button>
diff --git a/frontend/src/app/shared/components/time_entries/shared/modal/base.modal.html b/frontend/src/app/shared/components/time_entries/shared/modal/base.modal.html
index 59e40197d6e..d235c28cd81 100644
--- a/frontend/src/app/shared/components/time_entries/shared/modal/base.modal.html
+++ b/frontend/src/app/shared/components/time_entries/shared/modal/base.modal.html
@@ -28,7 +28,7 @@
</button>
</div>
<div class="spot-action-bar--right">
- <button class="button button_no-margin spot-action-bar--action"
+ <button class="button button_no-margin spot-modal--cancel-button spot-action-bar--action"
*ngIf="saveAllowed"
(click)="closeMe($event)"
[textContent]="text.cancel"
diff --git a/frontend/src/app/spot/styles/sass/components/modal.sass b/frontend/src/app/spot/styles/sass/components/modal.sass
index dd4ba5540ec..882b713162c 100644
--- a/frontend/src/app/spot/styles/sass/components/modal.sass
+++ b/frontend/src/app/spot/styles/sass/components/modal.sass
@@ -66,3 +66,7 @@
&:focus
outline-style: none
+
+ &--cancel-button
+ @media (max-width: 680px)
+ display: none
diff --git a/frontend/src/global_styles/content/_modal.lsg b/frontend/src/global_styles/content/_modal.lsg
index 02451d69de3..b1fd8bf7f9e 100644
--- a/frontend/src/global_styles/content/_modal.lsg
+++ b/frontend/src/global_styles/content/_modal.lsg
@@ -50,6 +50,10 @@
</div>
<div class="spot-action-bar">
<div class="spot-action-bar--right">
+ <button
+ type="button"
+ class="spot-modal--cancel-button button button_no-margin spot-action-bar--action"
+ >Cancel</button>
<button name="button" type="submit" class="button button_no-margin spot-action-bar--action">Close</button>
</div>
</div>
@@ -72,7 +76,7 @@
</div>
<div class="spot-action-bar">
<div class="spot-action-bar--right">
- <button name="button" type="submit" class="button button_no-margin spot-action-bar--action">Cancel</button>
+ <button name="button" type="button" class="button button_no-margin spot-action-bar--action">Cancel</button>
<button name="button" type="submit" class="button button_no-margin -danger spot-action-bar--action">Continue</button>
</div>
</div>