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
[#43684] migrated op-modal to spot-modal (#11172)
Eric Schubertc8f1e160052b
diff --git a/app/views/account/_footer.html.erb b/app/views/account/_footer.html.erbindex d3a42b3dba9..43240e86e76 100644--- a/app/views/account/_footer.html.erb+++ b/app/views/account/_footer.html.erb@@ -1,5 +1,8 @@-<% if footer = registration_footer %>- <div class="op-modal--footer">- <span class="registration-footer"><%= footer %></span>+<div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <% if footer = registration_footer %>+ <span><%= footer %></span>+ <% end %>+ <%= styled_button_tag t(:button_create), class: 'button_no-margin -highlight -with-icon icon-checkmark spot-action-bar--action' %></div>-<% end %>+</div>diff --git a/app/views/account/_register.html.erb b/app/views/account/_register.html.erbindex 919e43e6dab..e427430e2a5 100644--- a/app/views/account/_register.html.erb+++ b/app/views/account/_register.html.erb@@ -33,22 +33,11 @@ See COPYRIGHT and LICENSE files for more details.<%= back_url_hidden_field_tag %><%= error_messages_for :user %>- <div class="op-modal--header">- <%= op_icon 'icon-context icon-user' %>- <h1 class="op-modal--title">- <%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %>- </h1>- <button- type="button"- class="op-modal--close-button"- title="<%= t('js.close_popup_title') %>"- aria-label="<%= t('js.close_popup_title') %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %></div>-- <div class="op-modal--body">+ <div class="spot-divider"></div>+ <div class="spot-modal--body"><h2><%= t(:label_register) %></h2><section class="form--section"><% if @user.auth_source_id.nil? %>@@ -65,7 +54,7 @@ See COPYRIGHT and LICENSE files for more details.</div><div class="form--field -required -wide-label">- <%= f.text_field :lastname, required: true %>+ <%= f.text_field :lastname, required: true %></div><% if registration_show_email? %>@@ -94,7 +83,7 @@ See COPYRIGHT and LICENSE files for more details.<%= f.password_field :password_confirmation,required: true,size: 25,- autocomplete: 'off' %>+ autocomplete: 'off' %></div><% end %></section>@@ -104,8 +93,6 @@ See COPYRIGHT and LICENSE files for more details.<%= render partial: 'account/user_consent_check', locals: { consenting_user: @user } %><% end %>- <%= styled_button_tag t(:button_create), class: '-highlight -with-icon icon-checkmark' %>-<%= render partial: 'account/auth_providers', locals: { omniauth_title: I18n.t('account.signup_with_auth_provider'), wide: true } %></div>diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erbindex ecbf5f37272..7c487e9f037 100644--- a/app/views/layouts/base.html.erb+++ b/app/views/layouts/base.html.erb@@ -117,7 +117,7 @@ See COPYRIGHT and LICENSE files for more details.<% if show_onboarding_modal? %><section data-augmented-model-wrapperdata-modal-initialize-now="true"- data-modal-class-name="onboarding-modal op-modal_autoheight -highlight">+ data-modal-class-name="onboarding-modal"><%= render partial: '/onboarding/configuration_modal' %></section><% end %>diff --git a/app/views/onboarding/_configuration_modal.html.erb b/app/views/onboarding/_configuration_modal.html.erbindex 05dcf56190f..1d416c185bf 100644--- a/app/views/onboarding/_configuration_modal.html.erb+++ b/app/views/onboarding/_configuration_modal.html.erb@@ -29,22 +29,13 @@ See COPYRIGHT and LICENSE files for more details.<div class="modal-delivery-element"><%= labelled_tabular_form_for current_user, url: { action: 'user_settings', controller: 'onboarding' }, html: { id: 'user-form' } do |f| %>- <div class="op-modal--header op-modal--header_highlight">- <%= avatar(current_user) %>- <h1 class="op-modal--title">- <%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %>, <%= current_user.name %>- </h1>- <button- type="button"- class="op-modal--close-button"- title="<%= t('js.close_popup_title') %>"- aria-label="<%= t('js.close_popup_title') %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %>, <%= current_user.name %></div>- <div class="onboarding--main op-modal--body">+ <div class="spot-divider"></div>++ <div class="onboarding--main spot-modal--body"><b><%= I18n.t('onboarding.select_language') %></b><fieldset class="form--fieldset"><div class="form--field">@@ -53,8 +44,10 @@ See COPYRIGHT and LICENSE files for more details.</fieldset></div>- <div class="onboarding--footer op-modal--footer">- <%= styled_button_tag t(:button_save), class: '-highlight -with-icon icon-checkmark' %>+ <div class="onboarding--footer spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <%= styled_button_tag t(:button_save), class: 'button_no-margin -highlight -with-icon icon-checkmark spot-action-bar--action' %>+ </div></div><% end %></div>diff --git a/app/views/onboarding/_menu_item.html.erb b/app/views/onboarding/_menu_item.html.erbindex 9ae6e98547f..07e9e7b06b2 100644--- a/app/views/onboarding/_menu_item.html.erb+++ b/app/views/onboarding/_menu_item.html.erb@@ -31,7 +31,7 @@ See COPYRIGHT and LICENSE files for more details.data-augmented-model-wrapperdata-activation-selector=".onboarding-modal--activation-link"data-modal-iframe-url="<%= OpenProject::Configuration.onboarding_video_url %>"- data-modal-class-name="onboarding-modal op-modal_autoheight -highlight"+ data-modal-class-name="onboarding-modal"><%= link_to t(:label_introduction_video),'',diff --git a/app/views/onboarding/_onboarding_video_modal.html.erb b/app/views/onboarding/_onboarding_video_modal.html.erbindex 45ce1e09ae6..e920a8b257d 100644--- a/app/views/onboarding/_onboarding_video_modal.html.erb+++ b/app/views/onboarding/_onboarding_video_modal.html.erb@@ -28,22 +28,12 @@ See COPYRIGHT and LICENSE files for more details.++#%><div class="modal-delivery-element">- <div class="op-modal--header op-modal--header_highlight">- <%= op_icon 'icon-context icon-user' %>- <h1 class="op-modal--title">- <%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %>- </h1>- <button- type="button"- class="op-modal--close-button"- title="<%= t('js.close_popup_title') %>"- aria-label="<%= t('js.close_popup_title') %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <span class="spot-icon spot-icon_user"></span>+ <span><%= I18n.t('onboarding.welcome', app_title: Setting.app_title) %></span></div>-- <div class="onboarding--main op-modal--body">+ <div class="spot-divider"></div>+ <div class="onboarding--main spot-modal--body"><h2><%= I18n.t('onboarding.heading_getting_started') %></h2><div class="onboarding--video-block"><div class="onboarding--video-text">@@ -54,12 +44,14 @@ See COPYRIGHT and LICENSE files for more details.</div></div>- <div class="onboarding--footer op-modal--footer">- <span><em><%= I18n.t('onboarding.text_show_again') %></em></span>- <button- class="button -highlight"- dynamic-content-modal-close-button- title=<%= t(:button_close)%>- ><%= t(:button_close)%></button>+ <div class="onboarding--footer spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <span><em><%= I18n.t('onboarding.text_show_again') %></em></span>+ <button+ class="button button_no-margin -highlight spot-action-bar--action"+ dynamic-content-modal-close-button+ title=<%= t(:button_close) %>+ ><%= t(:button_close) %></button>+ </div></div></div>diff --git a/app/views/projects/_project_export_modal.html.erb b/app/views/projects/_project_export_modal.html.erbindex 5c7f269e174..4a5978b085a 100644--- a/app/views/projects/_project_export_modal.html.erb+++ b/app/views/projects/_project_export_modal.html.erb@@ -28,21 +28,12 @@ See COPYRIGHT and LICENSE files for more details.++#%><div class="modal-delivery-element">- <div class="op-modal--header">- <h1 class="op-modal--title">- <%= I18n.t('js.label_export') %>- </h1>- <button- type="button"- class="op-modal--close-button"- aria-label="<%= t('js.close_popup_title') %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <%= I18n.t('js.label_export') %></div>-- <div class="op-modal--body">- <ul class="op-export-options">+ <div class="spot-divider"></div>+ <div class="spot-modal--body">+ <ul class="spot-export-options"><% supported_export_formats.each do |key| %><li class="op-export-options--option"><% filter_params = safe_query_params ['filters', 'sortBy'] %>diff --git a/app/views/wiki/_wiki_export_modal.html.erb b/app/views/wiki/_wiki_export_modal.html.erbindex ac87ef95369..fec8be77b91 100644--- a/app/views/wiki/_wiki_export_modal.html.erb+++ b/app/views/wiki/_wiki_export_modal.html.erb@@ -28,42 +28,33 @@ See COPYRIGHT and LICENSE files for more details.++#%><div class="modal-delivery-element">- <div class="op-modal--header">- <h1 class="op-modal--title">- <%= I18n.t('js.label_export') %>- </h1>- <button- type="button"- class="op-modal--close-button"- aria-label="<%= t('js.close_popup_title') %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <%= I18n.t('js.label_export') %></div>-- <div class="op-modal--body">+ <div class="spot-divider"></div>+ <div class="spot-modal--body"><ul class="op-export-options"><li class="op-export-options--option"><%= link_to url_for(- controller: '/activities',- action: 'index',- show_wiki_edits: 1,- apply: true,- key: User.current.rss_key,- format: 'atom',- ), class: 'op-export-options--option-link' do %>- <%= op_icon('icon-big icon-export-atom') %>- <span class="op-export-options--option-label"><%= t('export.format.atom') %></span>+ controller: '/activities',+ action: 'index',+ show_wiki_edits: 1,+ apply: true,+ key: User.current.rss_key,+ format: 'atom',+ ), class: 'op-export-options--option-link' do %>+ <%= op_icon('icon-big icon-export-atom') %>+ <span class="op-export-options--option-label"><%= t('export.format.atom') %></span><% end %></li><li class="op-export-options--option"><%= link_to url_for(- version: @content.version,- id: @page,- format: 'markdown',- ), class: 'op-export-options--option-link' do %>- <%= op_icon('icon-big icon-ticket') %>- <span class="op-export-options--option-label"><%= t('text_formatting.markdown') %></span>+ version: @content.version,+ id: @page,+ format: 'markdown',+ ), class: 'op-export-options--option-link' do %>+ <%= op_icon('icon-big icon-ticket') %>+ <span class="op-export-options--option-label"><%= t('text_formatting.markdown') %></span><% end %></li></ul>@@ -71,5 +62,5 @@ See COPYRIGHT and LICENSE files for more details.</div><% content_for :header_tags do %>- <%= auto_discovery_link_tag(:atom, controller: '/activities', action: 'index', id: @project, show_wiki_edits: 1, format: 'atom', key: User.current.rss_key) %>+ <%= auto_discovery_link_tag(:atom, controller: '/activities', action: 'index', id: @project, show_wiki_edits: 1, format: 'atom', key: User.current.rss_key) %><% end %>diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.jsindex 1a210dc2ebc..7e9c2aebb7a 100644--- a/frontend/.eslintrc.js+++ b/frontend/.eslintrc.js@@ -68,6 +68,9 @@ module.exports = {// Who cares about line length"max-len": "off",+ // Allow short circuit evaluations+ "@typescript-eslint/no-unused-expressions": ["error", { "allowShortCircuit": true }],+// Force single quotes to align with rubyquotes: "off","@typescript-eslint/quotes": ["error", "single", { avoidEscape: true }],diff --git a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.tsindex b9c95df6e93..7f4b6d33a15 100644--- a/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts+++ b/frontend/src/app/core/setup/globals/onboarding/onboarding_tour_trigger.ts@@ -33,11 +33,14 @@ export function detectOnboardingTour():void {currentTourPart = '';sessionStorage.setItem(onboardingTourStorageKey, 'readyToStart');- waitForElement('.onboarding-modal .op-modal--close-button', 'body', () => {- // Start automatically when the language selection is closed- jQuery('.op-modal--close-button').click(() => {- tourCancelled = true;- void triggerTour('homescreen');+ // Start automatically when modal is closed by backdrop click+ waitForElement('.spot-modal-overlay_active', 'body', () => {+ const elementsByClassName = document.getElementsByClassName('spot-modal-overlay_active');+ Array.from(elementsByClassName).forEach((modalOverlay) => {+ modalOverlay.addEventListener('click', () => {+ tourCancelled = true;+ void triggerTour('homescreen');+ });});});diff --git a/frontend/src/app/core/state/is-not-null.ts b/frontend/src/app/core/state/is-not-null.tsnew file mode 100644index 00000000000..b32ee2c662f--- /dev/null+++ b/frontend/src/app/core/state/is-not-null.ts@@ -0,0 +1,31 @@+// -- copyright+// OpenProject is an open source project management software.+// Copyright (C) 2012-2022 the OpenProject GmbH+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License version 3.+//+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+// Copyright (C) 2006-2013 Jean-Philippe Lang+// Copyright (C) 2010-2013 the ChiliProject Team+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License+// as published by the Free Software Foundation; either version 2+// of the License, or (at your option) any later version.+//+// This program is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+// GNU General Public License for more details.+//+// You should have received a copy of the GNU General Public License+// along with this program; if not, write to the Free Software+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+//+// See COPYRIGHT and LICENSE files for more details.+//++++export default function isNotNull<T>(entity:T|null):entity is T {+ return entity !== null;+}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.htmlindex a881c4abc76..e7ee7bc8077 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@@ -1,10 +1,12 @@<div- class="op-modal op-modal_autoheight confirm-form-submit--modal loading-indicator--location"+ class="spot-modal spot-modal_autoheight confirm-form-submit--modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><div *ngIf="showWarning && warningText"class="op-toast -warning"><div class="op-toast--content">@@ -12,50 +14,52 @@</div></div>- <div class="form--field">- <div class="form--field-container">- <div class="form--select-container">- <label class="form--label" [textContent]="actionService.label"></label>- <op-autocompleter- #select- classes="new-list--action-select"- appendTo="body"- [resource]="autocompleterOptions.resource"- [openDirectly]="true"- [fetchDataDirectly]="true"- [getOptionsFn]=autocompleterOptions.getOptionsFn- (change)="onModelChange($event)"- >- <ng-template op-autocompleter-footer-tmp *ngIf="autocompleterOptions.resource=='version'" let-search>- <button- class="op-select-footer--label"- type="button"- (click)="onNewActionCreated()">+ <div class="form--field">+ <div class="form--field-container">+ <div class="form--select-container">+ <label class="form--label" [textContent]="actionService.label"></label>+ <op-autocompleter+ #select+ classes="new-list--action-select"+ appendTo="body"+ [resource]="autocompleterOptions.resource"+ [openDirectly]="true"+ [fetchDataDirectly]="true"+ [getOptionsFn]=autocompleterOptions.getOptionsFn+ (change)="onModelChange($event)"+ >+ <ng-template op-autocompleter-footer-tmp *ngIf="autocompleterOptions.resource=='version'" let-search>+ <button+ class="op-select-footer--label"+ type="button"+ (click)="onNewActionCreated()"><span class="icon-context"><op-icon icon-classes="icon-plus icon-context"></op-icon>{{text.button_create}} {{ngSelectComponent.ngSelectInstance.searchTerm}}</span>- </button>+ </button>- </ng-template>- </op-autocompleter>- </div>+ </ng-template>+ </op-autocompleter></div></div>+ </div></div>- <div class="op-modal--footer">- <button- class="confirm-form-submit--cancel button"- (click)="closeMe($event)"- [textContent]="text.button_cancel"- [attr.title]="text.button_cancel"- ></button>- <button- class="confirm-form-submit--submit button -highlight"- (click)="create()"- [disabled]="!this.selectedAttribute || inFlight"- [textContent]="text.button_add"- [attr.title]="text.button_add"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="confirm-form-submit--cancel button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ [textContent]="text.button_cancel"+ [attr.title]="text.button_cancel"+ ></button>+ <button+ class="confirm-form-submit--submit button button_no-margin -highlight spot-action-bar--action"+ (click)="create()"+ [disabled]="!this.selectedAttribute || inFlight"+ [textContent]="text.button_add"+ [attr.title]="text.button_add"+ ></button>+ </div></div></div>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.htmlindex b75ef6490c4..6e6066f7be8 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@@ -1,23 +1,27 @@<div- class="op-modal wp-table--configuration-modal loading-indicator--location"- data-indicator-name="modal"+ class="spot-modal wp-table--configuration-modal loading-indicator--location"+ data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><div class="tab-content" #tabContentOutlet></div></div>- <div class="op-modal--footer">- <button- class="button"- [textContent]="text.cancelButton"- (click)="closeMe($event)"- ></button>- <button- class="button -highlight"- [textContent]="text.applyButton"- (click)="saveChanges()"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="button button_no-margin spot-action-bar--action"+ [textContent]="text.cancelButton"+ (click)="closeMe($event)"+ ></button>+ <button+ class="button button_no-margin -highlight spot-action-bar--action"+ [textContent]="text.applyButton"+ (click)="saveChanges()"+ ></button>+ </div></div></div>diff --git a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html b/frontend/src/app/features/boards/new-board-modal/new-board-modal.htmlindex 5f61b4b44ce..5739fab3c1b 100644--- a/frontend/src/app/features/boards/new-board-modal/new-board-modal.html+++ b/frontend/src/app/features/boards/new-board-modal/new-board-modal.html@@ -1,10 +1,12 @@<div- class="op-modal op-modal_wide confirm-form-submit--modal loading-indicator--location"+ class="spot-modal spot-modal_wide confirm-form-submit--modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.board_type}}</op-modal-header>+ <div class="spot-modal--header">{{text.board_type}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><p*ngIf="eeShowBanners">diff --git a/frontend/src/app/features/enterprise/enterprise-modal/enterprise-trial.modal.html b/frontend/src/app/features/enterprise/enterprise-modal/enterprise-trial.modal.htmlindex e336479358b..28bec3909b9 100644--- a/frontend/src/app/features/enterprise/enterprise-modal/enterprise-trial.modal.html+++ b/frontend/src/app/features/enterprise/enterprise-modal/enterprise-trial.modal.html@@ -1,7 +1,9 @@-<div class="op-modal op-enterprise-modal">- <op-modal-header (close)="closeModal($event)">{{headerText()}}</op-modal-header>+<div class="spot-modal op-enterprise-modal">+ <div class="spot-modal--header">{{headerText()}}</div>- <div [ngSwitch]="openWindow()" class="op-modal--body">+ <div class="spot-divider"></div>++ <div [ngSwitch]="openWindow()" class="spot-modal--body"><!-- first modal window --><div *ngSwitchCase="1"><enterprise-trial-form></enterprise-trial-form>@@ -28,39 +30,44 @@</div></div>- <div class="op-modal--footer">- <div *ngIf="!eeTrialService.status || eeTrialService.cancelled; else mailSubmitted">- <button- class="confirm-form-submit--cancel button"- (click)="closeModal($event)"- [textContent]="text.button_cancel"- [attr.title]="text.button_cancel"- ></button>- <button- class="confirm-form-submit--continue button -highlight"- (click)="onSubmit()"- [disabled]="!trialForm || trialForm.invalid"- [textContent]="text.button_submit"- [attr.title]="text.button_submit"- [hidden]="eeTrialService.mailSubmitted && !eeTrialService.cancelled"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <div *ngIf="!eeTrialService.status || eeTrialService.cancelled; else mailSubmitted"+ class="spot-action-bar--right">+ <button+ class="confirm-form-submit--cancel button button_no-margin spot-action-bar--action"+ (click)="closeModal($event)"+ [textContent]="text.button_cancel"+ [attr.title]="text.button_cancel"+ ></button>+ <button+ class="confirm-form-submit--continue button button_no-margin -highlight spot-action-bar--action"+ (click)="onSubmit()"+ [disabled]="!trialForm || trialForm.invalid"+ [textContent]="text.button_submit"+ [attr.title]="text.button_submit"+ [hidden]="eeTrialService.mailSubmitted && !eeTrialService.cancelled"+ ></button>+ </div>+ <ng-template #mailSubmitted>+ <div class="spot-action-bar--right">+ <button+ class="confirm-form-submit--continue button button_no-margin -highlight spot-action-bar--action"+ (click)="startEnterpriseTrial()"+ [textContent]="text.button_continue"+ [attr.title]="text.button_continue"+ [disabled]="!eeTrialService.confirmed"+ [hidden]="eeTrialService.trialStarted"+ ></button>+ <button+ *ngIf="eeTrialService.trialStarted"+ class="confirm-form-submit--continue button button_no-margin -highlight spot-action-bar--action"+ (click)="closeModal($event)"+ [textContent]="text.button_continue"+ [attr.title]="text.button_continue"+ ></button>+ </div>+ </ng-template></div>- <ng-template #mailSubmitted>- <button- class="confirm-form-submit--continue button -highlight"- (click)="startEnterpriseTrial()"- [textContent]="text.button_continue"- [attr.title]="text.button_continue"- [disabled]="!eeTrialService.confirmed"- [hidden]="eeTrialService.trialStarted"- ></button>- <button- *ngIf="eeTrialService.trialStarted"- class="confirm-form-submit--continue button -highlight"- (click)="closeModal($event)"- [textContent]="text.button_continue"- [attr.title]="text.button_continue"- ></button>- </ng-template></div>-</div>\ No newline at end of file+</div>diff --git a/frontend/src/app/features/invite-user-modal/invite-user.component.html b/frontend/src/app/features/invite-user-modal/invite-user.component.htmlindex 807d11eb7c7..ce7ecc4c38b 100644--- a/frontend/src/app/features/invite-user-modal/invite-user.component.html+++ b/frontend/src/app/features/invite-user-modal/invite-user.component.html@@ -1,10 +1,10 @@<div- class="op-modal"+ class="spot-modal"*ngIf="loading"></div><op-ium-project-selection*ngIf="!loading && step === Steps.ProjectSelection"- class="op-modal"+ class="spot-modal"[project]="project"[type]="type"(save)="onProjectSelectionSave($event)"@@ -13,7 +13,7 @@<op-ium-principal*ngIf="!loading && step === Steps.Principal"- class="op-modal"+ class="spot-modal"[project]="project"[principalData]="principalData"[type]="type"@@ -24,7 +24,7 @@<op-ium-role*ngIf="!loading && step === Steps.Role"- class="op-modal"+ class="spot-modal"[role]="role"[principal]="principalData.principal"[project]="project"@@ -36,7 +36,7 @@<op-ium-message*ngIf="!loading && step === Steps.Message"- class="op-modal"+ class="spot-modal"[message]="message"[principal]="principalData.principal"[project]="project"@@ -47,7 +47,7 @@<op-ium-summary*ngIf="!loading && step === Steps.Summary"- class="op-modal"+ class="spot-modal"[project]="project"[principalData]="principalData"[type]="type"@@ -64,6 +64,6 @@[type]="type"[createdNewPrincipal]="createdNewPrincipal"*ngIf="!loading && step === Steps.Success"- class="op-modal"+ class="spot-modal"(close)="closeWithPrincipal()"></op-ium-success>diff --git a/frontend/src/app/features/invite-user-modal/message/message.component.html b/frontend/src/app/features/invite-user-modal/message/message.component.htmlindex b705200de35..1c590537e6e 100644--- a/frontend/src/app/features/invite-user-modal/message/message.component.html+++ b/frontend/src/app/features/invite-user-modal/message/message.component.html@@ -2,9 +2,11 @@[formGroup]="messageForm"(ngSubmit)="onSubmit($event)">- <op-modal-header (close)="close.emit()">{{ text.title() }}</op-modal-header>+ <div class="spot-modal--header">{{text.title()}}</div>- <div class="op-modal--body op-form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body op-form"><op-form-field [label]="text.label"><p class="op-form-field--description" slot="description">{{ text.description() }}@@ -19,12 +21,14 @@</op-form-field></div>- <div class="op-modal--footer">- <button- type="button"- class="button"- (click)="back.emit()"- >{{ text.backButton }}</button>- <button class="button -highlight">{{ text.nextButton }}</button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ type="button"+ class="button button_no-margin spot-action-bar--action"+ (click)="back.emit()"+ >{{ text.backButton }}</button>+ <button class="button button_no-margin -highlight spot-action-bar--action">{{ text.nextButton }}</button>+ </div></div></form>diff --git a/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html b/frontend/src/app/features/invite-user-modal/principal/principal-search.component.htmlindex 06cf43d7110..43b1dc53dff 100644--- a/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html+++ b/frontend/src/app/features/invite-user-modal/principal/principal-search.component.html@@ -1,5 +1,5 @@<ng-select- appendTo=".op-modal-overlay"+ appendTo=".spot-modal-overlay"[formControl]="principalControl"[addTag]="showAddTag ? createNewFromInput.bind(this) : false"[typeahead]="input$"diff --git a/frontend/src/app/features/invite-user-modal/principal/principal.component.html b/frontend/src/app/features/invite-user-modal/principal/principal.component.htmlindex 08b0b9a010f..df6c9fd0e58 100644--- a/frontend/src/app/features/invite-user-modal/principal/principal.component.html+++ b/frontend/src/app/features/invite-user-modal/principal/principal.component.html@@ -2,9 +2,11 @@[formGroup]="principalForm"(ngSubmit)="onSubmit($event)">- <op-modal-header (close)="close.emit()">{{ text.title() }}</op-modal-header>+ <div class="spot-modal--header">{{text.title()}}</div>- <div class="op-modal--body op-form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body op-form"><op-form-field[label]="textLabel"required@@ -27,7 +29,7 @@type="button"class="spot-link"(click)="principalControl?.setValue(null)"- >{{ text.change }}</button>+ >{{ text.change }}</button></p><p@@ -60,12 +62,14 @@></op-dynamic-form></div>- <div class="op-modal--footer">- <button- type="button"- class="button"- (click)="back.emit()"+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ type="button"+ class="button button_no-margin spot-action-bar--action"+ (click)="back.emit()">{{ text.backButton }}</button>- <button class="button -highlight">{{ text.nextButton }}</button>+ <button class="button button_no-margin -highlight spot-action-bar--action">{{ text.nextButton }}</button>+ </div></div></form>diff --git a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.htmlindex 0a7e7f7408c..48b1f0c0e72 100644--- a/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html+++ b/frontend/src/app/features/invite-user-modal/project-selection/project-selection.component.html@@ -2,9 +2,11 @@[formGroup]="projectAndTypeForm"(ngSubmit)="onSubmit($event)">- <op-modal-header (close)="close.emit()">{{ text.title }}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body op-form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body op-form"><op-form-field[label]="text.project.label"required@@ -14,7 +16,7 @@formControlName="project"[apiFilters]="APIFiltersForProjects"[mapResultsFn]="projectFilterFn.bind(this)"- appendTo=".op-modal-overlay"+ appendTo=".spot-modal-overlay"></op-project-autocompleter><div@@ -60,7 +62,9 @@</op-form-field></div>- <div class="op-modal--footer">- <button class="button -highlight">{{ text.nextButton }}</button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button class="button button_no-margin -highlight spot-action-bar--action">{{ text.nextButton }}</button>+ </div></div></form>diff --git a/frontend/src/app/features/invite-user-modal/role/role-search.component.html b/frontend/src/app/features/invite-user-modal/role/role-search.component.htmlindex 45e3b83b61a..34272bcdc82 100644--- a/frontend/src/app/features/invite-user-modal/role/role-search.component.html+++ b/frontend/src/app/features/invite-user-modal/role/role-search.component.html@@ -1,5 +1,5 @@<ng-select- appendTo=".op-modal-overlay"+ appendTo=".spot-modal-overlay"[formControl]="roleControl"[typeahead]="input$"[items]="items$ | async"diff --git a/frontend/src/app/features/invite-user-modal/role/role.component.html b/frontend/src/app/features/invite-user-modal/role/role.component.htmlindex 7794050d258..6c7daa7db4e 100644--- a/frontend/src/app/features/invite-user-modal/role/role.component.html+++ b/frontend/src/app/features/invite-user-modal/role/role.component.html@@ -2,9 +2,11 @@[formGroup]="roleForm"(ngSubmit)="onSubmit($event)">- <op-modal-header (close)="close.emit()">{{ text.title() }}</op-modal-header>+ <div class="spot-modal--header">{{text.title()}}</div>- <div class="op-modal--body op-form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body op-form"><op-form-field[label]="text.label()"required@@ -29,12 +31,14 @@</op-form-field></div>- <div class="op-modal--footer">- <button- type="button"- class="button"- (click)="back.emit()"+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ type="button"+ class="button button_no-margin spot-action-bar--action"+ (click)="back.emit()">{{ text.backButton }}</button>- <button class="button -highlight">{{ text.nextButton }}</button>+ <button class="button button_no-margin -highlight spot-action-bar--action">{{ text.nextButton }}</button>+ </div></div></form>diff --git a/frontend/src/app/features/invite-user-modal/success/success.component.html b/frontend/src/app/features/invite-user-modal/success/success.component.htmlindex e3009e28dee..36992d53327 100644--- a/frontend/src/app/features/invite-user-modal/success/success.component.html+++ b/frontend/src/app/features/invite-user-modal/success/success.component.html@@ -1,5 +1,5 @@<div class="op-ium-success">- <div class="op-modal--body op-modal--body_center">+ <div class="spot-modal--body op-ium-success--content"><img [src]="type === PrincipalType.Placeholder ? placeholder_image : user_image" /><h1 [textContent]="text.title()"></h1>diff --git a/frontend/src/app/features/invite-user-modal/success/success.component.sass b/frontend/src/app/features/invite-user-modal/success/success.component.sassindex 33cb1b3b8cd..59dd0724fa1 100644--- a/frontend/src/app/features/invite-user-modal/success/success.component.sass+++ b/frontend/src/app/features/invite-user-modal/success/success.component.sass@@ -2,3 +2,8 @@flex-grow: 1display: flexflex-direction: column++ &--content+ justify-content: center+ align-items: center+ text-align: centerdiff --git a/frontend/src/app/features/invite-user-modal/summary/summary.component.html b/frontend/src/app/features/invite-user-modal/summary/summary.component.htmlindex 5dd331bbd48..9ba3d854955 100644--- a/frontend/src/app/features/invite-user-modal/summary/summary.component.html+++ b/frontend/src/app/features/invite-user-modal/summary/summary.component.html@@ -3,9 +3,11 @@(submit)="onSubmit($event)"class="op-ium-summary">- <op-modal-header (close)="close.emit()">{{ text.title() }}</op-modal-header>+ <div class="spot-modal--header">{{text.title()}}</div>- <div class="op-modal--body op-form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body op-form"><op-form-field [label]="text.projectLabel"><p slot="input">{{ project.name }}</p></op-form-field>@@ -25,14 +27,16 @@</op-form-field></div>- <div class="op-modal--footer">- <button- type="button"- class="button"- (click)="back.emit()"- >{{ text.backButton }}</button>- <button- class="button -highlight"- >{{ text.nextButton() }}</button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ type="button"+ class="button button_no-margin spot-action-bar--action"+ (click)="back.emit()"+ >{{ text.backButton }}</button>+ <button+ class="button button_no-margin -highlight spot-action-bar--action"+ >{{ text.nextButton() }}</button>+ </div></div></form>diff --git a/frontend/src/app/features/job-status/job-status-modal/job-status.modal.html b/frontend/src/app/features/job-status/job-status-modal/job-status.modal.htmlindex aa2693f0afb..d4618545903 100644--- a/frontend/src/app/features/job-status/job-status-modal/job-status.modal.html+++ b/frontend/src/app/features/job-status/job-status-modal/job-status.modal.html@@ -1,9 +1,14 @@<div- class="op-modal op-modal_wide-fixed job-status--modal"+ class="spot-modal job-status--modal">- <op-modal-header (close)="closeMe($event)">{{ title }}</op-modal-header>+ <div+ class="spot-modal--header"+ data-qa-selector="job-status--header"+ >{{ title }}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><div class="loading-indicator--location"data-indicator-name="modal"><div class="status-icon-wrapper" *ngIf="!isLoading && statusIcon">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.htmlindex 90d4a414ac9..fa9e13f117e 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@@ -1,38 +1,42 @@<div- class="op-modal op-modal_wide wp-table--configuration-modal loading-indicator--location"- data-indicator-name="modal"+ class="spot-modal spot-modal_wide wp-table--configuration-modal loading-indicator--location"+ data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><ng-container *ngIf="!!prependModalComponent"><ng-container *ngComponentOutlet="prependModalComponent; injector: injector"></ng-container></ng-container><op-scrollable-tabs- *ngIf="tabPortalHost"- [tabs]="availableTabs"- [currentTabId]="tabPortalHost.currentTab?.id"- (tabSelected)="switchTo($event)"- >+ *ngIf="tabPortalHost"+ [tabs]="availableTabs"+ [currentTabId]="tabPortalHost.currentTab?.id"+ (tabSelected)="switchTo($event)"+ ></op-scrollable-tabs><div class="tab-content" #tabContentOutlet></div></div>- <div class="op-modal--footer">- <button- class="button -highlight"- data-qa-selector="op-modal-wp-table-configuration-save-button"+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="button button_no-margin -highlight spot-action-bar--action"+ data-qa-selector="spot-modal-wp-table-configuration-save-button"[textContent]="text.applyButton"(click)="saveChanges()"- >- </button>- <button- class="button"+ >+ </button>+ <button+ class="button button_no-margin spot-action-bar--action"[textContent]="text.cancelButton"(click)="closeMe($event)"- >- </button>+ >+ </button>+ </div></div></div>diff --git a/frontend/src/app/shared/components/attribute-help-texts/help-text.modal.html b/frontend/src/app/shared/components/attribute-help-texts/help-text.modal.htmlindex 0fb8f48c36c..d5195a96fbf 100644--- a/frontend/src/app/shared/components/attribute-help-texts/help-text.modal.html+++ b/frontend/src/app/shared/components/attribute-help-texts/help-text.modal.html@@ -1,13 +1,18 @@<div- class="op-modal op-modal_autoheight attribute-help-text--modal loading-indicator--location"+ class="spot-modal attribute-help-text--modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">- <span class="icon-context icon-help1"></span>+ <div+ class="spot-modal--header"+ data-qa-selector="attribute-help-text--header"+ >+ <span class="spot-icon spot-icon_help1"></span><span [textContent]="helpText.attributeCaption"></span>- </op-modal-header>+ </div>++ <div class="spot-divider"></div>- <div class="op-modal--body op-modal--body_limited-height">+ <div class="spot-modal--body"><divclass="op-uc-container op-uc-container__no-permalinks"[innerHtml]="helpText.helpText.html"@@ -19,15 +24,17 @@></attachments></div>- <div class="op-modal--footer">- <a- class="help-text--edit-button button"- *ngIf="helpText.editText"- [attr.href]="helpTextLink"- [attr.title]="text.edit"- >- <op-icon icon-classes="button--icon icon-edit"></op-icon>- <span class="button--text" [textContent]="text.edit"></span>- </a>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <a+ class="help-text--edit-button button button_no-margin spot-action-bar--action"+ *ngIf="helpText.editText"+ [attr.href]="helpTextLink"+ [attr.title]="text.edit"+ >+ <op-icon icon-classes="button--icon icon-edit"></op-icon>+ <span class="button--text" [textContent]="text.edit"></span>+ </a>+ </div></div></div>diff --git a/frontend/src/app/shared/components/datepicker/datepicker.modal.html b/frontend/src/app/shared/components/datepicker/datepicker.modal.htmlindex 9a8a47dc84e..19897da91bf 100644--- a/frontend/src/app/shared/components/datepicker/datepicker.modal.html+++ b/frontend/src/app/shared/components/datepicker/datepicker.modal.html@@ -1,5 +1,5 @@<form- class="op-modal op-datepicker-modal loading-indicator--location"+ class="spot-modal op-datepicker-modal loading-indicator--location"data-qa-selector="op-datepicker-modal"[attr.id]="htmlId"#modalContainer@@ -7,7 +7,7 @@(submit)="save($event)"><op-datepicker-banner [scheduleManually]="scheduleManually"></op-datepicker-banner>- <div class="op-modal--body form -vertical">+ <div class="spot-modal--body form -vertical"><div class="form--field op-datepicker-modal--scheduling-action-container"><div class="form--field-container"><label class="form--label-with-check-box">@@ -115,17 +115,19 @@hidden></div>- <div class="op-modal--footer">+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right"><button(click)="cancel()"- class="op-datepicker-modal--action button"+ class="op-datepicker-modal--action button button_no-margin spot-action-bar--action"data-qa-selector="op-datepicker-modal--action"[textContent]="text.cancel"></button><button- class="op-datepicker-modal--action button -highlight"+ class="op-datepicker-modal--action button button_no-margin -highlight spot-action-bar--action"data-qa-selector="op-datepicker-modal--action"[textContent]="text.save"></button></div>+ </div></form>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.htmlindex 4949963d9fd..e6e3fd22fbf 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@@ -1,10 +1,12 @@<div- class="op-modal loading-indicator--location"+ class="spot-modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="ngdialog-body op-modal--body">+ <div class="spot-divider"></div>++ <div class="ngdialog-body spot-modal--body"><op-enterprise-banner*ngIf="eeShowBanners"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.htmlindex d7919401739..a78a59c910a 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@@ -1,10 +1,12 @@-<div class="op-modal"+<div class="spot-modal"data-indicator-name="modal"tabindex="0">- <op-modal-header (close)="closeMe($event)">{{text.displayedDays}}</op-modal-header>+ <div class="spot-modal--header">{{text.displayedDays}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><div class="form--field -trailing-label" *ngFor="let day of days; let index = index"><label class="form--label" [textContent]="day.weekDay" [htmlFor]="'day_' + index"></label><span class="form--field-container">@@ -15,16 +17,18 @@</div></div>- <div class="op-modal--footer">- <button- class="button"- [textContent]="text.cancelButton"- (click)="closeMe($event)"- ></button>- <button- class="button -highlight"- [textContent]="text.applyButton"- (click)="saveChanges()"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="button button_no-margin spot-action-bar--action"+ [textContent]="text.cancelButton"+ (click)="closeMe($event)"+ ></button>+ <button+ class="button button_no-margin -highlight spot-action-bar--action"+ [textContent]="text.applyButton"+ (click)="saveChanges()"+ ></button>+ </div></div></div>diff --git a/frontend/src/app/shared/components/modal/modal-delivery-element.sass b/frontend/src/app/shared/components/modal/modal-delivery-element.sassdeleted file mode 100644index b915dc74c29..00000000000--- a/frontend/src/app/shared/components/modal/modal-delivery-element.sass+++ /dev/null@@ -1,2 +0,0 @@-.modal-delivery-element- display: nonediff --git a/frontend/src/app/shared/components/modal/modal-header.component.html b/frontend/src/app/shared/components/modal/modal-header.component.htmldeleted file mode 100644index c74d7c9d410..00000000000--- a/frontend/src/app/shared/components/modal/modal-header.component.html+++ /dev/null@@ -1,16 +0,0 @@-<op-icon- *ngIf="icon"- icon-classes="{{ icon }} icon-context"-></op-icon>-<h1 class="op-modal--title">- <ng-content></ng-content>-</h1>-<button- class="op-modal--close-button"- type="button"- data-qa-selector="op-modal-close"- (click)="close.emit()"- [attr.aria-label]="text.closePopup"->- <op-icon icon-classes="icon-close"></op-icon>-</button>diff --git a/frontend/src/app/shared/components/modal/modal-header.component.ts b/frontend/src/app/shared/components/modal/modal-header.component.tsdeleted file mode 100644index a98c8655c18..00000000000--- a/frontend/src/app/shared/components/modal/modal-header.component.ts+++ /dev/null@@ -1,24 +0,0 @@-import {- Component, EventEmitter, HostBinding, Input, Output,-} from '@angular/core';-import { I18nService } from 'core-app/core/i18n/i18n.service';--@Component({- selector: 'op-modal-header',- templateUrl: './modal-header.component.html',-})-export class OpModalHeaderComponent {- @HostBinding('class.op-modal--header') className = true;-- @Input() icon = '';-- @Output('close') close = new EventEmitter<void>();-- public text = {- closePopup: this.I18n.t('js.close_popup_title'),- };-- constructor(- readonly I18n:I18nService,- ) {}-}diff --git a/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.html b/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.htmldeleted file mode 100644index 7338c9ea9c9..00000000000--- a/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.html+++ /dev/null@@ -1,11 +0,0 @@-<h3>- <ng-content></ng-content>-</h3>-<button- class="op-modal--close-button"- type="button"- (click)="close.emit()"- [attr.aria-label]="text.closePopup"->- <span class="icon-close"></span>-</button>diff --git a/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.ts b/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.tsdeleted file mode 100644index 8d3c56744a5..00000000000--- a/frontend/src/app/shared/components/modal/modal-header/modal-heading.component.ts+++ /dev/null@@ -1,22 +0,0 @@-import {- Component, EventEmitter, HostBinding, Output,-} from '@angular/core';-import { I18nService } from 'core-app/core/i18n/i18n.service';--@Component({- selector: 'op-modal-heading',- templateUrl: './modal-heading.component.html',-})-export class OpModalHeadingComponent {- @HostBinding('class.op-modal--heading') className = true;-- @Output('close') close = new EventEmitter<void>();-- public text = {- closePopup: this.I18n.t('js.close_popup_title'),- };-- constructor(- readonly I18n:I18nService,- ) {}-}diff --git a/frontend/src/app/shared/components/modal/modal.component.ts b/frontend/src/app/shared/components/modal/modal.component.tsindex 12c37f600dd..921003ef866 100644--- a/frontend/src/app/shared/components/modal/modal.component.ts+++ b/frontend/src/app/shared/components/modal/modal.component.ts@@ -53,7 +53,7 @@ export abstract class OpModalComponent extends UntilDestroyedMixin implements Onreturn true;}- public closeMe(evt?:JQuery.TriggeredEvent) {+ public closeMe(evt?:Event):void {this.service.close();if (evt) {@@ -62,7 +62,7 @@ export abstract class OpModalComponent extends UntilDestroyedMixin implements On}}- public onOpen(modalElement:JQuery) {+ public onOpen():void {this.openingEvent.emit();this.cdRef.detectChanges();}diff --git a/frontend/src/app/shared/components/modal/modal.module.sass b/frontend/src/app/shared/components/modal/modal.module.sassdeleted file mode 100644index b208339222b..00000000000--- a/frontend/src/app/shared/components/modal/modal.module.sass+++ /dev/null@@ -1,5 +0,0 @@-@import 'modal-overrides'-@import 'modal-overlay'-@import 'modal-delivery-element'-@import 'modal'-diff --git a/frontend/src/app/shared/components/modal/modal.module.ts b/frontend/src/app/shared/components/modal/modal.module.tsindex 2f3d7392bd1..839d21c0f66 100644--- a/frontend/src/app/shared/components/modal/modal.module.ts+++ b/frontend/src/app/shared/components/modal/modal.module.ts@@ -4,7 +4,6 @@ import { FocusModule } from 'core-app/shared/directives/focus/focus.module';import { IconModule } from 'core-app/shared/components/icon/icon.module';import { OpModalService } from './modal.service';import { OpModalWrapperAugmentService } from './modal-wrapper-augment.service';-import { OpModalHeaderComponent } from './modal-header.component';import { OpModalBannerComponent } from 'core-app/shared/components/modal/modal-banner/modal-banner.component';@NgModule({@@ -14,7 +13,6 @@ import { OpModalBannerComponent } from 'core-app/shared/components/modal/modal-bIconModule,],exports: [- OpModalHeaderComponent,OpModalBannerComponent,],providers: [@@ -22,9 +20,7 @@ import { OpModalBannerComponent } from 'core-app/shared/components/modal/modal-bOpModalWrapperAugmentService,],declarations: [- OpModalHeaderComponent,OpModalBannerComponent,-],})export class OpenprojectModalModule { }diff --git a/frontend/src/app/shared/components/modal/modal.sass b/frontend/src/app/shared/components/modal/modal.sassdeleted file mode 100644index 0d86dc01f67..00000000000--- a/frontend/src/app/shared/components/modal/modal.sass+++ /dev/null@@ -1,107 +0,0 @@-// TODO: Check out -danger-zone and modal-close-button patterns-.op-modal- --modal-padding: 1rem-- position: relative- display: flex- flex-direction: column- align-items: stretch- background: white- pointer-events: all-- width: 40rem- min-height: 500px-- max-width: 100vw- max-height: 100vh-- overflow-y: auto- @include styled-scroll-bar-- @media (max-width: 680px), (max-height: 500px)- height: 100vh- width: 100vw- min-height: unset-- &_wide- width: 70rem- min-height: 40vh-- &_fullscreen- width: 100vw- height: 100vh-- &_autoheight- min-height: initial-- &--header- display: flex- padding: calc(0.5 * var(--modal-padding)) var(--modal-padding) calc(0.5 * var(--modal-padding)) var(--modal-padding)- position: relative- border-bottom: 1px solid #eee- align-items: center-- &_highlight- background-color: var(--header-bg-color)- border-bottom-width: var(--header-border-bottom-width)- border-bottom-color: var(--header-border-bottom-color)-- *- color: var(--header-item-font-color)-- &--body- display: flex- flex-direction: column- padding: var(--modal-padding)- flex-grow: 1- flex-shrink: 1- overflow-y: auto-- &:focus- outline-style: none-- &_limited-height- max-height: 50vh-- &_center- justify-content: center- align-items: center- text-align: center-- &--title- font-size: 1.3rem- padding: 0- margin: 0- margin-right: auto-- &--footer- display: flex- justify-content: flex-end- padding: calc(0.5 * var(--modal-padding)) var(--modal-padding) var(--modal-padding) var(--modal-padding)- width: 100%-- &_split-actions- justify-content: space-between-- .button- margin-bottom: 0-- @media (max-width: 680px), (max-height: 500px)- padding: var(--modal-padding)-- &--close-button- height: 100%- width: 3rem- padding: 0.45rem 0- margin: 0 -1rem- display: flex- justify-content: center- align-items: center- cursor: pointer- color: var(--body-font-color)- background: transparent- border: 0-- &:hover- text-decoration: none- color: var(--content-link-color)diff --git a/frontend/src/app/shared/components/modal/modal.service.ts b/frontend/src/app/shared/components/modal/modal.service.tsindex 59beec128ce..843fab968ce 100644--- a/frontend/src/app/shared/components/modal/modal.service.ts+++ b/frontend/src/app/shared/components/modal/modal.service.ts@@ -1,3 +1,31 @@+// -- copyright+// OpenProject is an open source project management software.+// Copyright (C) 2012-2022 the OpenProject GmbH+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License version 3.+//+// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+// Copyright (C) 2006-2013 Jean-Philippe Lang+// Copyright (C) 2010-2013 the ChiliProject Team+//+// This program is free software; you can redistribute it and/or+// modify it under the terms of the GNU General Public License+// as published by the Free Software Foundation; either version 2+// of the License, or (at your option) any later version.+//+// This program is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+// GNU General Public License for more details.+//+// You should have received a copy of the GNU General Public License+// along with this program; if not, write to the Free Software+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+//+// See COPYRIGHT and LICENSE files for more details.+//+++import {ApplicationRef,ComponentFactoryResolver,@@ -7,12 +35,14 @@ import {Injector,} from '@angular/core';import {- ComponentPortal, ComponentType, DomPortalOutlet, PortalInjector,+ ComponentPortal,+ ComponentType,+ DomPortalOutlet,+ PortalInjector,} from '@angular/cdk/portal';import { TransitionService } from '@uirouter/core';+import { OpModalComponent } from 'core-app/shared/components/modal/modal.component';-import { FocusHelperService } from 'core-app/shared/directives/focus/focus-helper';-import { KeyCodes } from 'core-app/shared/helpers/keyCodes.enum';export const OpModalLocalsToken = new InjectionToken<any>('OP_MODAL_LOCALS');@@ -21,7 +51,7 @@ export class OpModalService {public active:OpModalComponent|null = null;// Hold a reference to the DOM node we're using as a host- private portalHostElement:HTMLElement;+ private readonly portalHostElement:HTMLElement;// And a reference to the actual portal host interface on top of the elementprivate bodyPortalHost:DomPortalOutlet;@@ -29,30 +59,40 @@ export class OpModalService {// Remember when we're opening a new modal to avoid the outside click bubbling up.private opening = false;- constructor(private componentFactoryResolver:ComponentFactoryResolver,- readonly FocusHelper:FocusHelperService,- private appRef:ApplicationRef,- private $transitions:TransitionService,- private injector:Injector) {- const hostElement = this.portalHostElement = document.createElement('div');- hostElement.classList.add('op-modal-overlay');+ constructor(+ private readonly componentFactoryResolver:ComponentFactoryResolver,+ private readonly appRef:ApplicationRef,+ private readonly $transitions:TransitionService,+ private readonly injector:Injector,+ ) {+ const hostElement = document.createElement('div');+ hostElement.classList.add('spot-modal-overlay');document.body.appendChild(hostElement);- // Listen to keyups on window to close context menus- jQuery(window).on('keydown', (evt:JQuery.TriggeredEvent) => {- if (this.active && this.active.closeOnEscape && evt.which === KeyCodes.ESCAPE) {- this.active.closeOnEscapeFunction(evt);- }+ const closeButton = document.createElement('button');+ closeButton.classList.add('spot-button', 'spot-modal-close-button');+ closeButton.innerHTML = '<span class="spot-icon spot-icon_close"></span>';+ hostElement.appendChild(closeButton);+ // Listen to keystrokes on window to close context menus+ window.addEventListener('keydown', (evt:KeyboardEvent) => {+ if (this.active && this.active.closeOnEscape && evt.key === 'Escape') {+ this.active.closeOnEscapeFunction();+ }return true;});- // Listen to any click when should close outside modal- jQuery(window).on('click', (evt:JQuery.TriggeredEvent) => {+ // Listen to any click on the modal overlay (backdrop click)+ hostElement.addEventListener('click', (evt:MouseEvent) => {if (this.active&& !this.opening- && this.active.closeOnOutsideClick- && this.activeModal[0] === evt.target as Element) {+ && this.portalHostElement === evt.target as Element) {+ this.close();+ }+ });++ closeButton.addEventListener('click', () => {+ if (this.active && !this.opening) {this.close();}});@@ -63,6 +103,8 @@ export class OpModalService {this.appRef,this.injector,);++ this.portalHostElement = hostElement;}/**@@ -93,16 +135,15 @@ export class OpModalService {// Create a portal for the given component class and render itconst portal = new ComponentPortal(modal, null, this.injectorFor(injector, locals));const ref:ComponentRef<OpModalComponent> = this.bodyPortalHost.attach(portal) as ComponentRef<OpModalComponent>;- const instance = ref.instance as T;- this.active = instance;- this.portalHostElement.classList.add('op-modal-overlay_active');+ this.active = ref.instance as T;+ this.portalHostElement.classList.add('spot-modal-overlay_active');if (notFullScreen) {- this.portalHostElement.classList.add('op-modal-overlay_not-full-screen');+ this.portalHostElement.classList.add('spot-modal-overlay_not-full-screen');}setTimeout(() => {// Focus on the first element- this.active && this.active.onOpen(this.activeModal);+ this.active && this.active.onOpen();// Mark that we've opened the modal nowthis.opening = false;@@ -114,33 +155,28 @@ export class OpModalService {return this.active as T;}- public isActive(modal:OpModalComponent) {- return this.active && this.active === modal;+ public isActive(modal:OpModalComponent):boolean {+ return this.active !== null && this.active === modal;}/*** Closes currently open modal window*/- public close() {+ public close():void {// Detach any component currently in the portalif (this.active && this.active.onClose()) {this.active.closingEvent.emit(this.active);this.bodyPortalHost.detach();- this.portalHostElement.classList.remove('op-modal-overlay_active');- this.portalHostElement.classList.remove('op-modal-overlay_not-full-screen');+ this.portalHostElement.classList.remove('spot-modal-overlay_active');+ this.portalHostElement.classList.remove('spot-modal-overlay_not-full-screen');this.active = null;}}- public get activeModal():JQuery {- return jQuery(this.portalHostElement).find('.op-modal');- }-/*** Create an augmented injector that is equal to this service's injector + the additional data* passed into +show+.* This allows callers to pass data into the newly created modal.- **/private injectorFor(injector:Injector, data:Record<string, unknown>) {const injectorTokens = new WeakMap();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.htmlindex 5012231c231..cdd1103824d 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@@ -1,11 +1,13 @@<div- class="op-modal op-modal_autoheight confirm-form-submit--modal loading-indicator--location"- [ngClass]="{'-highlight -danger-zone' : dangerHighlighting }"+ class="spot-modal confirm-form-submit--modal loading-indicator--location"+ [ngClass]="{'-highlight' : dangerHighlighting }"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><p><span [textContent]="text.text"></span><br/>@@ -16,15 +18,17 @@</p></div>- <div class="op-modal--footer">- <button class="confirm-form-submit--continue button"- [ngClass]="dangerHighlighting ? '-danger': '-highlight'"- (click)="confirmAndClose($event)"- [textContent]="text.button_continue"- ></button>- <button class="confirm-form-submit--cancel button"- (click)="closeMe($event)"- [textContent]="text.button_cancel"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button class="confirm-form-submit--continue button button_no-margin spot-action-bar--action"+ [ngClass]="dangerHighlighting ? '-danger': '-highlight'"+ (click)="confirmAndClose($event)"+ [textContent]="text.button_continue"+ ></button>+ <button class="confirm-form-submit--cancel button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ [textContent]="text.button_cancel"+ ></button>+ </div></div></div>diff --git a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.ts b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.tsindex a7ea5c6a0e4..5927060f22e 100644--- a/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.ts+++ b/frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.ts@@ -86,7 +86,7 @@ export class ConfirmDialogModalComponent extends OpModalComponent {this.text = _.defaults(this.options.text, this.text);}- public confirmAndClose(evt:JQuery.TriggeredEvent) {+ public confirmAndClose(evt:Event):void {this.confirmed = true;this.closeMe(evt);}diff --git a/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.html b/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.htmlindex 3bec8b2e78b..ebb47fd34ee 100644--- a/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.html+++ b/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.html@@ -1,30 +1,32 @@<form- class="op-modal "+ class="spot-modal "(submit)="applyAndClose($event)">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body form"><fieldset class="form--fieldset"><legend [textContent]="text.page"></legend><div class="form--field"><label- for="selected-page"- [textContent]="text.page"- class="form--label hidden-for-sighted">+ for="selected-page"+ [textContent]="text.page"+ class="form--label hidden-for-sighted"></label><div class="form--field-container"><div class="form--select-container"><input- #selectedPageInput- tabindex="2"- type="text"- id="selected-page"- name="selected-page"- [value]="selectedPage"- (change)="selectedPage = $event.target.value"- class="form--select"- placeholder="my-project:my-page" />+ #selectedPageInput+ tabindex="2"+ type="text"+ id="selected-page"+ name="selected-page"+ [value]="selectedPage"+ (change)="selectedPage = $event.target.value"+ class="form--select"+ placeholder="my-project:my-page"/></div></div></div>@@ -33,14 +35,14 @@<label class="form--label-with-check-box"><div class="form--check-box-container"><input- #parentIncludedInput- tabindex="3"- type="checkbox"- id="include-parent"- name="include-parent"- [ngModel]="selectedIncludeParent"- (ngModelChange)="updateIncludeParent($event)"- class="form--check-box" />+ #parentIncludedInput+ tabindex="3"+ type="checkbox"+ id="include-parent"+ name="include-parent"+ [ngModel]="selectedIncludeParent"+ (ngModelChange)="updateIncludeParent($event)"+ class="form--check-box"/></div>{{ text.include_parent }}</label>@@ -49,18 +51,20 @@<p [textContent]="text.hint"></p></fieldset></div>- <div class="op-modal--footer">- <button- class="op-modal--cancel-button button"- (click)="closeMe($event)"- type="button"- tabindex="4"- [textContent]="text.button_cancel"- ></button>- <button- class="op-modal--submit-button button -highlight"- tabindex="3"- [textContent]="text.button_save"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="spot-modal--cancel-button button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ type="button"+ tabindex="4"+ [textContent]="text.button_cancel"+ ></button>+ <button+ class="spot-modal--submit-button button button_no-margin -highlight spot-action-bar--action"+ tabindex="3"+ [textContent]="text.button_save"+ ></button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts b/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.tsindex 1e2da28e53f..3028c8fe600 100644--- a/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts+++ b/frontend/src/app/shared/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts@@ -77,18 +77,18 @@ export class ChildPagesMacroModalComponent extends OpModalComponent implements A// We could provide an autocompleter here to get correct page names}- public applyAndClose(evt:JQuery.TriggeredEvent) {+ public applyAndClose(evt:Event):void {this.changed = true;this.page = this.selectedPage;this.includeParent = this.selectedIncludeParent;this.closeMe(evt);}- ngAfterViewInit() {+ ngAfterViewInit():void {this.selectedPageInput.nativeElement.focus();}- updateIncludeParent(val:boolean) {+ updateIncludeParent(val:boolean):void {this.selectedIncludeParent = val;}}diff --git a/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.html b/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.htmlindex 4cc7e985901..e83b6383055 100644--- a/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.html+++ b/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.html@@ -1,10 +1,12 @@<form- class="op-modal "+ class="spot-modal "(submit)="applyAndClose($event)">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><textarea name="codemirror-element"id="codemirror-element"[ngModel]="content"@@ -12,39 +14,41 @@<hr/><div class="form--field"><label- for="selected-language"- [textContent]="text.language"- class="form--label hidden-for-sighted">+ for="selected-language"+ [textContent]="text.language"+ class="form--label hidden-for-sighted"></label><div class="form--field-container"><div class="form--select-container"><input- #selectedLanguage- tabindex="2"- type="text"- id="selected-language"- name="selected-language"- [ngModel]="language"- (ngModelChange)="updateLanguage($event)"- class="form--select" />+ #selectedLanguage+ tabindex="2"+ type="text"+ id="selected-language"+ name="selected-language"+ [ngModel]="language"+ (ngModelChange)="updateLanguage($event)"+ class="form--select"/></div></div><p [textContent]="text.language_hint"></p></div></div>- <div class="op-modal--footer">- <button- class="op-modal--cancel-button button"- (click)="closeMe($event)"- tabindex="4"- type="button"- [textContent]="text.button_cancel"- ></button>- <button- class="op-modal--submit-button button -highlight"- tabindex="3"- [textContent]="text.button_save"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="spot-modal--cancel-button button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ tabindex="4"+ type="button"+ [textContent]="text.button_cancel"+ ></button>+ <button+ class="spot-modal--submit-button button button_no-margin -highlight spot-action-bar--action"+ tabindex="3"+ [textContent]="text.button_save"+ ></button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts b/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.tsindex 7b19b314edf..34986f0dace 100644--- a/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts+++ b/frontend/src/app/shared/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts@@ -86,7 +86,7 @@ export class CodeBlockMacroModalComponent extends OpModalComponent implements Af}}- public applyAndClose(evt:JQuery.TriggeredEvent) {+ public applyAndClose(evt:Event):void {this.content = this.codeMirrorInstance.getValue();const lang = this.language || 'text';this.languageClass = `language-${lang}`;@@ -95,7 +95,7 @@ export class CodeBlockMacroModalComponent extends OpModalComponent implements Afthis.closeMe(evt);}- ngAfterViewInit() {+ ngAfterViewInit():void {import('codemirror').then((imported:any) => {const CodeMirror = imported.default;this.codeMirrorInstance = CodeMirror.fromTextArea(diff --git a/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.html b/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.htmlindex b845bdede28..98bee8a1f19 100644--- a/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.html+++ b/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.html@@ -1,29 +1,31 @@<form- class="op-modal"+ class="spot-modal"(submit)="applyAndClose($event)">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><fieldset class="form--fieldset"><legend [textContent]="text.page"></legend><div class="form--field"><label- for="selected-page"- [textContent]="text.page"- class="form--label hidden-for-sighted">+ for="selected-page"+ [textContent]="text.page"+ class="form--label hidden-for-sighted"></label><div class="form--field-container"><div class="form--select-container"><input- #selectedPageInput- tabindex="2"- type="text"- id="selected-page"- name="selected-page"- [value]="selectedPage"- (change)="selectedPage = $event.target.value"- class="form--select" />+ #selectedPageInput+ tabindex="2"+ type="text"+ id="selected-page"+ name="selected-page"+ [value]="selectedPage"+ (change)="selectedPage = $event.target.value"+ class="form--select"/></div></div><p [textContent]="text.hint"></p>@@ -31,20 +33,22 @@</div></fieldset></div>- <div class="op-modal--footer">- <button- class="op-modal--cancel-button button"- (click)="closeMe($event)"- tabindex="4"- [textContent]="text.button_cancel"- [attr.title]="text.button_cancel"- ></button>- <button- class="op-modal--submit-button button -highlight"- (click)="applyAndClose($event)"- tabindex="3"- [textContent]="text.button_save"- [attr.title]="text.button_save"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="spot-modal--cancel-button button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ tabindex="4"+ [textContent]="text.button_cancel"+ [attr.title]="text.button_cancel"+ ></button>+ <button+ class="spot-modal--submit-button button button_no-margin -highlight spot-action-bar--action"+ (click)="applyAndClose($event)"+ tabindex="3"+ [textContent]="text.button_save"+ [attr.title]="text.button_save"+ ></button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts b/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.tsindex c990b6b87a4..dde0a3c583a 100644--- a/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts+++ b/frontend/src/app/shared/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts@@ -71,13 +71,13 @@ export class WikiIncludePageMacroModalComponent extends OpModalComponent impleme// We could provide an autocompleter here to get correct page names}- public applyAndClose(evt:JQuery.TriggeredEvent) {+ public applyAndClose(evt:Event):void {this.changed = true;this.page = this.selectedPage;this.closeMe(evt);}- ngAfterViewInit() {+ ngAfterViewInit():void {this.selectedPageInput.nativeElement.focus();}}diff --git a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.htmlindex 476a07bfac8..d3cea449767 100644--- a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html+++ b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.html@@ -1,28 +1,30 @@<form- class="op-modal op-modal_autoheight loading-indicator--location"+ class="spot-modal spot-modal_autoheight loading-indicator--location"(submit)="applyAndClose($event)"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body form"><fieldset class="form--fieldset"><legend [textContent]="text.selected_type"></legend><div class="form--field"><label- for="selected-type"- [textContent]="text.selected_type"- class="form--label hidden-for-sighted">+ for="selected-type"+ [textContent]="text.selected_type"+ class="form--label hidden-for-sighted"></label><div class="form--field-container"><div class="form--select-container"><select- #typeSelect- id="selected-type"- tabindex="1"- name="selected-type"- (change)="selectedType = $event.target.value"- class="form--select">+ #typeSelect+ id="selected-type"+ tabindex="1"+ name="selected-type"+ (change)="selectedType = $event.target.value"+ class="form--select"><option [textContent]="text.none"[selected]="!selectedType"[value]=""></option>@@ -56,18 +58,20 @@<p [textContent]="text.button_style_hint"></p></div>- <div class="op-modal--footer">- <button- class="op-modal--cancel-button button"- (click)="closeMe($event)"- tabindex="4"- type="button"- [textContent]="text.button_cancel"- ></button>- <button- class="op-modal--submit-button button -highlight"- tabindex="3"- [textContent]="text.button_save"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="spot-modal--cancel-button button button_no-margin spot-action-bar--action"+ (click)="closeMe($event)"+ tabindex="4"+ type="button"+ [textContent]="text.button_cancel"+ ></button>+ <button+ class="spot-modal--submit-button button button_no-margin -highlight spot-action-bar--action"+ tabindex="3"+ [textContent]="text.button_save"+ ></button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.tsindex dd84ca871a9..cd06823dbb5 100644--- a/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts+++ b/frontend/src/app/shared/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts@@ -95,14 +95,14 @@ export class WpButtonMacroModalComponent extends OpModalComponent implements Aft});}- public applyAndClose(evt:JQuery.TriggeredEvent) {+ public applyAndClose(evt:Event):void {this.changed = true;this.classes = this.buttonStyle ? 'button' : '';this.type = this.selectedType;this.closeMe(evt);}- ngAfterViewInit() {+ ngAfterViewInit():void {this.typeSelect.nativeElement.focus();}}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.htmlindex d326f18b2fa..c12da90b26d 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@@ -1,7 +1,10 @@-<div class="op-modal op-modal_wide wp-table--configuration-modal op-wp-table-export">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+<div class="spot-modal spot-modal_wide wp-table--configuration-modal op-wp-table-export">- <div class="op-modal--body">+ <div class="spot-modal--header">{{text.title}}</div>++ <div class="spot-divider"></div>++ <div class="spot-modal--body"><ul *ngIf="exportOptions" class="op-export-options" [ngClass]="{'-hidden': isLoading}"><li*ngFor="let option of exportOptions"diff --git a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.htmlindex 8ff25011a30..0841ea9e823 100644--- a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html+++ b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.html@@ -1,4 +1,4 @@<div- class="op-modal dynamic-content-modal--wrapper loading-indicator--location"+ class="spot-modal dynamic-content-modal--wrapper loading-indicator--location"data-indicator-name="modal"></div>diff --git a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.tsindex 8e6c9cdcf05..c2b41e42628 100644--- a/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts+++ b/frontend/src/app/shared/components/modals/modal-wrapper/dynamic-content.modal.ts@@ -50,7 +50,7 @@ export class DynamicContentModalComponent extends OpModalComponent implements Onsuper(locals, cdRef, elementRef);}- ngOnInit() {+ ngOnInit():void {super.ngOnInit();// Append the dynamic body@@ -58,20 +58,9 @@ export class DynamicContentModalComponent extends OpModalComponent implements On.find('.dynamic-content-modal--wrapper').addClass(this.locals.modalClassName).append(this.locals.modalBody);-- // Register click listeners- // This registers both on the close button in the modal header, as well as on any- // other elements you have added the dynamic-content-modal--close-button class.- jQuery(document.body)- .on('click.opdynamicmodal',- '.op-modal--close-button, [dynamic-content-modal-close-button]',- (evt:JQuery.TriggeredEvent) => {- this.closeMe(evt);- });}- ngOnDestroy() {- jQuery(document.body).off('click.opdynamicmodal');+ ngOnDestroy():void {super.ngOnDestroy();}}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.htmlindex 59235a0fd1b..b789c17a732 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@@ -1,13 +1,13 @@<form- class="op-modal op-modal_autoheight form -vertical confirm-form-submit--modal password-confirm-dialog--modal loading-indicator--location"+ class="spot-modal form -vertical confirm-form-submit--modal password-confirm-dialog--modal loading-indicator--location"data-indicator-name="modal"(submit)="confirmAndClose($event)">- <op-modal-header (close)="closeMe($event)">- {{text.title}}- </op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body request-for-confirmation--form form">+ <div class="spot-divider"></div>++ <div class="spot-modal--body request-for-confirmation--form form"><div class="form--field -required"><label class="form--label"for="request_for_confirmation_password"@@ -28,11 +28,14 @@</div></div>- <div class="op-modal--footer">- <button- class="confirm-form-submit--continue button -highlight"- [textContent]="text.confirm_button"- [disabled]="!passwordValuePresent()">- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="confirm-form-submit--continue button button_no-margin -highlight spot-action-bar--action"+ [textContent]="text.confirm_button"+ [disabled]="!passwordValuePresent()">+ >+ </button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.ts b/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.tsindex 008ec51922f..b5fa5588b4b 100644--- a/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.ts+++ b/frontend/src/app/shared/components/modals/request-for-confirmation/password-confirmation.modal.ts@@ -39,7 +39,7 @@ export class PasswordConfirmationModalComponent extends ConfirmDialogModalCompon@ViewChild('passwordConfirmationField', { static: true }) passwordConfirmationField:ElementRef;- public ngOnInit() {+ public ngOnInit():void {super.ngOnInit();this.text.title = I18n.t('js.password_confirmation.title');@@ -52,18 +52,18 @@ export class PasswordConfirmationModalComponent extends ConfirmDialogModalComponthis.showClose = false;}- public confirmAndClose(evt:JQuery.TriggeredEvent) {+ public confirmAndClose(evt:Event):void {if (this.passwordValuePresent()) {super.confirmAndClose(evt);}}- public onOpen(modalElement:JQuery) {- super.onOpen(modalElement);+ public onOpen():void {+ super.onOpen();this.passwordConfirmationField.nativeElement.focus();}- public passwordValuePresent() {+ public passwordValuePresent():boolean {return this.password_confirmation !== null && this.password_confirmation.length > 0;}}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.htmlindex e8b87375536..170c75eb357 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@@ -1,28 +1,30 @@<form- class="op-modal wp-table--configuration-modal loading-indicator--location"+ class="spot-modal wp-table--configuration-modal loading-indicator--location"data-indicator-name="modal"name="modalSaveForm"(submit)="saveQueryAs($event)">- <op-modal-header (close)="closeMe($event)">{{text.save_as}}</op-modal-header>+ <div class="spot-modal--header">{{text.save_as}}</div>++ <div class="spot-divider"></div><divname="modalSaveForm"- class="op-modal--body form"+ class="spot-modal--body form"><div class="form--field -required"><label class="form--label" for="save-query-name" [textContent]="text.label_name"></label><div class="form--field-container"><div class="form--text-field-container"><input- class="form--text-field"- type="text"- name="save-query-name"- id="save-query-name"- #queryNameField- [(ngModel)]="queryName"- required- />+ class="form--text-field"+ type="text"+ name="save-query-name"+ id="save-query-name"+ #queryNameField+ [(ngModel)]="queryName"+ required+ /></div></div></div>@@ -30,25 +32,27 @@<section class="form--section"><h3 [textContent]="text.label_visibility_settings"></h3><query-sharing-form- [isSave]="true"- (onChange)="setValues($event)"- [isStarred]="isStarred"- [isPublic]="isPublic">+ [isSave]="true"+ (onChange)="setValues($event)"+ [isStarred]="isStarred"+ [isPublic]="isPublic"></query-sharing-form></section></div>- <div class="op-modal--footer">- <button- type="button"- class="button -with-icon icon-cancel"- [textContent]="text.button_cancel"- (click)="closeMe($event)"- ></button>- <button- class="button -highlight -with-icon icon-checkmark"- [textContent]="text.button_save"- [disabled]="isBusy || !queryName"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ type="button"+ class="button button_no-margin -with-icon icon-cancel spot-action-bar--action"+ [textContent]="text.button_cancel"+ (click)="closeMe($event)"+ ></button>+ <button+ class="button button_no-margin -highlight -with-icon icon-checkmark spot-action-bar--action"+ [textContent]="text.button_save"+ [disabled]="isBusy || !queryName"+ ></button>+ </div></div></form>diff --git a/frontend/src/app/shared/components/modals/save-modal/save-query.modal.ts b/frontend/src/app/shared/components/modals/save-modal/save-query.modal.tsindex eb3215d593f..5475f6f87bf 100644--- a/frontend/src/app/shared/components/modals/save-modal/save-query.modal.ts+++ b/frontend/src/app/shared/components/modals/save-modal/save-query.modal.ts@@ -91,7 +91,7 @@ export class SaveQueryModalComponent extends OpModalComponent {return jQuery('#work-packages-settings-button');}- public saveQueryAs($event:JQuery.TriggeredEvent) {+ public saveQueryAs($event:Event):void {$event.preventDefault();if (this.isBusy || !this.queryName) {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.htmlindex 2047c31091b..41b340696c8 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@@ -1,26 +1,30 @@<div- class="op-modal wp-table--configuration-modal loading-indicator--location"+ class="spot-modal wp-table--configuration-modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header (close)="closeMe($event)">{{text.label_visibility_settings}}</op-modal-header>+ <div class="spot-modal--header">{{text.label_visibility_settings}}</div>++ <div class="spot-divider"></div><query-sharing-form- class="op-modal--body"- [isSave]="false"- (onChange)="setValues($event)"- [isStarred]="isStarred"- [isPublic]="isPublic">+ class="spot-modal--body"+ [isSave]="false"+ (onChange)="setValues($event)"+ [isStarred]="isStarred"+ [isPublic]="isPublic"></query-sharing-form>- <div class="op-modal--footer">- <button class="button -highlight -with-icon icon-checkmark"- (click)="saveQuery($event)"- [textContent]="text.button_save">- </button>- <button class="button -with-icon icon-cancel"- [textContent]="text.button_cancel"- [disabled]="isBusy"- (click)="closeMe($event)">- </button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button class="button button_no-margin -highlight -with-icon icon-checkmark spot-action-bar--action"+ (click)="saveQuery($event)"+ [textContent]="text.button_save">+ </button>+ <button class="button button_no-margin -with-icon icon-cancel spot-action-bar--action"+ [textContent]="text.button_cancel"+ [disabled]="isBusy"+ (click)="closeMe($event)">+ </button>+ </div></div></div>diff --git a/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.ts b/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.tsindex c4054885a94..4609d7b089b 100644--- a/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.ts+++ b/frontend/src/app/shared/components/modals/share-modal/query-sharing.modal.ts@@ -94,7 +94,7 @@ export class QuerySharingModalComponent extends OpModalComponent implements OnInreturn jQuery('#work-packages-settings-button');}- public saveQuery($event:JQuery.TriggeredEvent) {+ public saveQuery($event:Event):void {if (this.isBusy) {return;}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.htmlindex e45fe8c5ad1..c2c1ab2ddd6 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@@ -1,11 +1,13 @@<div- class="op-modal op-modal_autoheight wp-table--configuration-modal -danger-zone loading-indicator--location"+ class="spot-modal wp-table--configuration-modal loading-indicator--location"data-indicator-name="modal"id="wp_destroy_modal">- <op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>+ <div class="spot-modal--header">{{text.title}}</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>++ <div class="spot-modal--body"><ng-container *ngIf="singleWorkPackage"><p><span [textContent]="text.text"></span>@@ -56,24 +58,26 @@name="confirm-children-deletion"id="confirm-children-deletion"[(ngModel)]="childrenDeletionConfirmed"- class="form--check-box" />+ class="form--check-box"/></div>{{ text.label_confirm_children_deletion }}</label></div></div>- <div class="op-modal--footer">- <button- class="button"- [textContent]="text.cancel"- (click)="closeMe($event)"- ></button>- <button- class="button -danger"- [textContent]="text.confirm"- [attr.disabled]="busy || blockedDueToUnconfirmedChildren || undefined"- (click)="confirmDeletion($event)"- ></button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="button button_no-margin spot-action-bar--action"+ [textContent]="text.cancel"+ (click)="closeMe($event)"+ ></button>+ <button+ class="button button_no-margin -danger spot-action-bar--action"+ [textContent]="text.confirm"+ [attr.disabled]="busy || blockedDueToUnconfirmedChildren || undefined"+ (click)="confirmDeletion($event)"+ ></button>+ </div></div></div>diff --git a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.ts b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.tsindex 5f7c6cbd41a..0403e3807c1 100644--- a/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.ts+++ b/frontend/src/app/shared/components/modals/wp-destroy-modal/wp-destroy.modal.ts@@ -35,12 +35,17 @@ import { OpModalComponent } from 'core-app/shared/components/modal/modal.componeimport { OpModalLocalsToken } from 'core-app/shared/components/modal/modal.service';import { OpModalLocalsMap } from 'core-app/shared/components/modal/modal.types';import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';-import { WorkPackageViewFocusService } from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-focus.service';+import {+ WorkPackageViewFocusService,+} from 'core-app/features/work-packages/routing/wp-view-base/view-services/wp-view-focus.service';import { StateService } from '@uirouter/core';import { I18nService } from 'core-app/core/i18n/i18n.service';import { BackRoutingService } from 'core-app/features/work-packages/components/back-routing/back-routing.service';-import { WorkPackageNotificationService } from 'core-app/features/work-packages/services/notifications/work-package-notification.service';+import {+ WorkPackageNotificationService,+} from 'core-app/features/work-packages/services/notifications/work-package-notification.service';import { WorkPackageService } from 'core-app/features/work-packages/services/work-package.service';+import isNotNull from 'core-app/core/state/is-not-null';@Component({templateUrl: './wp-destroy.modal.html',@@ -61,7 +66,7 @@ export class WpDestroyModalComponent extends OpModalComponent implements OnInit// Need to confirm deletion when children are involvedpublic childrenDeletionConfirmed = false;- public text:any = {+ public text = {label_visibility_settings: this.I18n.t('js.label_visibility_settings'),button_save: this.I18n.t('js.modals.button_save'),confirm: this.I18n.t('js.button_confirm'),@@ -69,10 +74,17 @@ export class WpDestroyModalComponent extends OpModalComponent implements OnInitcancel: this.I18n.t('js.button_cancel'),close: this.I18n.t('js.close_popup_title'),label_confirm_children_deletion: this.I18n.t('js.modals.destroy_work_package.confirm_deletion_children'),+ title: '',+ text: '',+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars+ childCount: (wp:WorkPackageResource):string => '',+ // eslint-disable-next-line no-unused-vars,@typescript-eslint/no-unused-vars+ hasChildren: (wp:WorkPackageResource):string => '',+ deletesChildren: '',};constructor(readonly elementRef:ElementRef,- readonly WorkPackageService:WorkPackageService,+ readonly workPackageService:WorkPackageService,@Inject(OpModalLocalsToken) public locals:OpModalLocalsMap,readonly I18n:I18nService,readonly cdRef:ChangeDetectorRef,@@ -85,7 +97,7 @@ export class WpDestroyModalComponent extends OpModalComponent implements OnInitsuper(locals, cdRef, elementRef);}- ngOnInit() {+ ngOnInit():void {super.ngOnInit();this.workPackages = this.locals.workPackages;@@ -97,7 +109,7 @@ export class WpDestroyModalComponent extends OpModalComponent implements OnInitthis.singleWorkPackageChildren = this.singleWorkPackage.children;}- this.text.title = this.I18n.t('js.modals.destroy_work_package.title', { label: this.workPackageLabel }),+ this.text.title = this.I18n.t('js.modals.destroy_work_package.title', { label: this.workPackageLabel });this.text.text = this.I18n.t('js.modals.destroy_work_package.text', {label: this.workPackageLabel,count: this.workPackages.length,@@ -108,32 +120,37 @@ export class WpDestroyModalComponent extends OpModalComponent implements OnInitreturn this.I18n.t('js.units.child_work_packages', { count });};- this.text.hasChildren = (wp:WorkPackageResource) => this.I18n.t('js.modals.destroy_work_package.has_children', { childUnits: this.text.childCount(wp) }),-+ this.text.hasChildren = (wp:WorkPackageResource) => {+ const childUnits = this.text.childCount(wp);+ return this.I18n.t('js.modals.destroy_work_package.has_children', { childUnits });+ };this.text.deletesChildren = this.I18n.t('js.modals.destroy_work_package.deletes_children');}- public get blockedDueToUnconfirmedChildren() {+ public get blockedDueToUnconfirmedChildren():boolean {return this.mustConfirmChildren && !this.childrenDeletionConfirmed;}- public get mustConfirmChildren() {- const result = false;+ public get mustConfirmChildren():boolean {+ let result = false;if (this.singleWorkPackage && this.singleWorkPackageChildren) {- const result = this.singleWorkPackageChildren.length > 0;+ result = this.singleWorkPackageChildren.length > 0;}return result || !!_.find(this.workPackages, (wp) => wp.children && wp.children.length > 0);}- public confirmDeletion($event:JQuery.TriggeredEvent) {+ public confirmDeletion($event:Event):boolean {if (this.busy || this.blockedDueToUnconfirmedChildren) {return false;}this.busy = true;- this.WorkPackageService.performBulkDelete(this.workPackages.map((el) => el.id!), true)+ const ids = this.workPackages+ .map((el) => el.id)+ .filter(isNotNull);+ this.workPackageService.performBulkDelete(ids, true).then(() => {this.busy = false;this.closeMe($event);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.htmlindex c93bf3e8c64..27f1bb387bf 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@@ -1,14 +1,15 @@<div- class="op-modal op-modal_autoheight loading-indicator--location"+ class="spot-modal loading-indicator--location"data-indicator-name="modal">- <op-modal-header- icon="icon-log_time"- (close)="closeMe($event)">- {{text.title}}- </op-modal-header>+ <div class="spot-modal--header">+ <span class="spot-icon spot-icon_time"></span>+ <span [textContent]="text.title"></span>+ </div>++ <div class="spot-divider"></div>- <div class="ngdialog-body op-modal--body">+ <div class="ngdialog-body spot-modal--body"><te-form #editForm[changeset]="changeset"[showWorkPackageField]="showWorkPackageField"@@ -17,23 +18,23 @@</te-form></div>- <div class="op-modal--footer op-modal--footer_split-actions">- <div>- <button class="button -danger"+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--left">+ <button class="button button_no-margin -danger spot-action-bar--action"*ngIf="deleteAllowed"(click)="destroy()"[textContent]="text.delete"[attr.title]="text.delete"></button></div>- <div>- <button class="button"+ <div class="spot-action-bar--right">+ <button class="button button_no-margin spot-action-bar--action"*ngIf="saveAllowed"(click)="closeMe($event)"[textContent]="text.cancel"[attr.title]="text.cancel"></button>- <button class="button -highlight button_no-margin"+ <button class="button -highlight button_no-margin spot-action-bar--action"*ngIf="saveAllowed"(click)="saveEntry()"[attr.title]="text.save"diff --git a/frontend/src/app/spot/spot-docs.component.html b/frontend/src/app/spot/spot-docs.component.htmlindex 6cb86de62fd..4e50f9b69d5 100644--- a/frontend/src/app/spot/spot-docs.component.html+++ b/frontend/src/app/spot/spot-docs.component.html@@ -89,22 +89,26 @@ Currently selected value is {{ toggleValue }}<h1>Checkbox</h1><label>- <spot-checkbox></spot-checkbox> Unchecked+ <spot-checkbox></spot-checkbox>+ Unchecked</label><label>- <spot-checkbox [checked]="true"></spot-checkbox> Checked+ <spot-checkbox [checked]="true"></spot-checkbox>+ Checked</label><label>- <spot-checkbox [disabled]="true"></spot-checkbox> Disabled+ <spot-checkbox [disabled]="true"></spot-checkbox>+ Disabled</label><label><spot-checkbox[checked]="true"[disabled]="true"- ></spot-checkbox> Disabled checked+ ></spot-checkbox>+ Disabled checked</label><label>@@ -454,7 +458,8 @@ Currently selected value is {{ toggleValue }}type="button"class="spot-button spot-button_main"(click)="dropModalOpen = !dropModalOpen"- >Open Modal</button>+ >Open Modal+ </button><ng-container slot="body"><div class="spot-container"><h1 class="spot-header-small">Test</h1>@@ -520,20 +525,58 @@ Currently selected value is {{ toggleValue }}<div class="spot-action-bar"><div class="spot-action-bar--left">- <button class="spot-button spot-button_outlined spot-button_main">+ <button class="spot-button spot-button_outlined spot-button_main spot-action-bar--action">Independent action</button></div><div class="spot-action-bar--right">- <button class="spot-button spot-button_outlined spot-button_main">+ <button class="spot-button spot-button_outlined spot-button_main spot-action-bar--action">Some Action</button>- <button class="spot-button spot-button_main">+ <button class="spot-button spot-button_main spot-action-bar--action">Another Action</button></div></div>+<h1>Modals</h1>++<div class="spot-modal">+ <div class="spot-modal--header">Default size modal</div>+ <div class="spot-modal--body">Here is some text in the body. Additionally this is a destructive action.</div>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button class="spot-button spot-button_outlined spot-button_main spot-action-bar--action">+ Cancel+ </button>+ <button class="spot-button spot-button_danger spot-action-bar--action">+ <span class="spot-icon spot-icon_delete"></span>+ <span>Delete</span>+ </button>+ </div>+ </div>+</div>++<div class="spot-modal spot-modal_wide">+ <div class="spot-modal--header">+ <span class="spot-icon spot-icon_help1"></span>+ <span>Wide modal</span>+ </div>+ <div class="spot-divider"></div>+ <div class="spot-modal--body">+ <p>Here is some text in the body.</p>+ <p>But this modal has a mininmal height!</p>+ </div>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <span>Some explanatory text.</span>+ <button class="spot-button spot-button_main spot-action-bar--action">+ OK+ </button>+ </div>+ </div>+</div>+<style>#content-wrapper {background-color: #eee;diff --git a/frontend/src/app/spot/styles/sass/components/action-bar.sass b/frontend/src/app/spot/styles/sass/components/action-bar.sassindex 235f957b711..0509235d51b 100644--- a/frontend/src/app/spot/styles/sass/components/action-bar.sass+++ b/frontend/src/app/spot/styles/sass/components/action-bar.sass@@ -1,7 +1,7 @@.spot-action-bardisplay: gridgrid-template-columns: 1fr- padding: $spot-spacing-0-75+ padding: $spot-spacing-1background-color: $spot-color-basic-gray-6&--left,@@ -13,11 +13,11 @@justify-content: flex-end> .spot-action-bar--action- margin-left: $spot-spacing-0_5+ margin-left: $spot-spacing-1&--left> .spot-action-bar--action- margin-bottom: $spot-spacing-0_5+ margin-bottom: $spot-spacing-1@media #{$spot-mq-action-bar-change}grid-template-columns: 1fr autodiff --git a/frontend/src/app/spot/styles/sass/components/divider.sass b/frontend/src/app/spot/styles/sass/components/divider.sassnew file mode 100644index 00000000000..9b1aa097732--- /dev/null+++ b/frontend/src/app/spot/styles/sass/components/divider.sass@@ -0,0 +1,5 @@+.spot-divider+ border-bottom: 1px solid $spot-color-basic-gray-5++ &_strong+ border-bottom: 1px solid $spot-color-basic-gray-4diff --git a/frontend/src/app/spot/styles/sass/components/index.sass b/frontend/src/app/spot/styles/sass/components/index.sassindex afd751e1241..778eada86c6 100644--- a/frontend/src/app/spot/styles/sass/components/index.sass+++ b/frontend/src/app/spot/styles/sass/components/index.sass@@ -1,6 +1,7 @@// This directory will hold files that implement the styles for specific blocks and components// Import them here@import './button'+@import './divider'@import './link'@import './toggle'@import './checkbox'@@ -8,5 +9,6 @@@import './filter-chip'@import './drop-modal'@import './list'+@import './modal'@import './action-bar'@import './tooltip'diff --git a/frontend/src/app/spot/styles/sass/components/modal-close-button.sass b/frontend/src/app/spot/styles/sass/components/modal-close-button.sassnew file mode 100644index 00000000000..a024bd60aa9--- /dev/null+++ b/frontend/src/app/spot/styles/sass/components/modal-close-button.sass@@ -0,0 +1,9 @@+.spot-modal-close-button+ display: block+ margin: 1rem++ @media (min-width: 680px)+ display: none++ @media (max-height: 480px)+ align-self: enddiff --git a/frontend/src/app/shared/components/modal/modal-overlay.sass b/frontend/src/app/spot/styles/sass/components/modal-overlay.sasssimilarity index 51%rename from frontend/src/app/shared/components/modal/modal-overlay.sassrename to frontend/src/app/spot/styles/sass/components/modal-overlay.sassindex 72893e5e827..aff8382a2e0 100644--- a/frontend/src/app/shared/components/modal/modal-overlay.sass+++ b/frontend/src/app/spot/styles/sass/components/modal-overlay.sass@@ -1,4 +1,4 @@-.op-modal-overlay+.spot-modal-overlayposition: fixedtop: 0left: 0@@ -12,9 +12,17 @@&_activedisplay: flex+ flex-direction: column-reverse++ @media (max-width: 680px)+ justify-content: end++ @media (max-height: 480px)+ // reorder elements to be displayed in row on very small heights+ flex-direction: row-reverse&_not-full-screenbackground: transparentright: unsetbottom: unset- top: initial\ No newline at end of file+ top: initialdiff --git a/frontend/src/app/shared/components/modal/modal-overrides.sass b/frontend/src/app/spot/styles/sass/components/modal-overrides.sasssimilarity index 78%rename from frontend/src/app/shared/components/modal/modal-overrides.sassrename to frontend/src/app/spot/styles/sass/components/modal-overrides.sassindex d95312cbf97..7bcb16016d1 100644--- a/frontend/src/app/shared/components/modal/modal-overrides.sass+++ b/frontend/src/app/spot/styles/sass/components/modal-overrides.sass@@ -1,7 +1,10 @@// Some backend modals come wrapped once extra. Because of the way// augmented modals are loaded, this is not so easy to change.// TODO: When refactoring the modal service, this should be removed-.op-modal > .form:only-child+.spot-modal > .form:only-childdisplay: flexflex-direction: columnmax-height: 100vh++.modal-delivery-element+ display: nonediff --git a/frontend/src/app/spot/styles/sass/components/modal.sass b/frontend/src/app/spot/styles/sass/components/modal.sassnew file mode 100644index 00000000000..6f390faaa49--- /dev/null+++ b/frontend/src/app/spot/styles/sass/components/modal.sass@@ -0,0 +1,68 @@+@import './modal-close-button'+@import './modal-overlay'+@import './modal-overrides'++.spot-modal+ position: relative+ display: flex+ flex-direction: column+ align-items: stretch+ background: white+ pointer-events: all++ border-radius: $spot-spacing-0-25+ width: 40rem++ max-width: calc(100vw - 2rem)+ max-height: calc(100vh - 2rem)++ overflow-y: auto++ @media (max-width: 680px)+ width: calc(100vw - 2rem)+ max-height: calc(100vh - 5rem)++ @media (max-height: 480px)+ max-height: calc(100vh - 2rem)+ max-width: calc(100vw - 6rem)++ &_wide+ width: 70rem+ min-height: 40vh++ &--header+ @include spot-subheader-big++ display: flex+ padding: $spot-spacing-1+ position: relative+ align-items: center++ .spot-icon+ width: $spot-spacing-1-5+ height: $spot-spacing-1-5+ margin-right: $spot-spacing-0-5++ &_highlight+ background-color: var(--header-bg-color)+ border-bottom-width: var(--header-border-bottom-width)+ border-bottom-color: var(--header-border-bottom-color)++ *+ color: var(--header-item-font-color)++ &--body+ @include styled-scroll-bar++ display: flex+ flex-direction: column+ padding: 1rem+ flex-grow: 1+ flex-shrink: 1+ overflow-y: auto++ &:focus+ outline-style: none++ &--footer+ width: 100%diff --git a/frontend/src/app/spot/styles/tokens/dist/tokens.sass b/frontend/src/app/spot/styles/tokens/dist/tokens.sassindex 9d3478b4d86..218f92c9fa0 100644--- a/frontend/src/app/spot/styles/tokens/dist/tokens.sass+++ b/frontend/src/app/spot/styles/tokens/dist/tokens.sass@@ -56,4 +56,4 @@ $spot-shadow-hard-mid: 4px 4px 10px rgba(0, 0, 0, 0.25)$spot-shadow-hard-high: 6px 6px 20px rgba(0, 0, 0, 0.25)$spot-mq-landscape: '(orientation: landscape)'$spot-mq-drop-modal-in-context: '(min-width: 1000px) and (min-height: 500px)'-$spot-mq-action-bar-change: '(min-width: 768px)'+$spot-mq-action-bar-change: '(min-width: 600px)'diff --git a/frontend/src/global_styles/content/_forms_mobile.sass b/frontend/src/global_styles/content/_forms_mobile.sassindex 1cc70f881c2..0be2b684528 100644--- a/frontend/src/global_styles/content/_forms_mobile.sass+++ b/frontend/src/global_styles/content/_forms_mobile.sass@@ -50,8 +50,6 @@max-width: 100%#tab-content-info form,- .op-modal--body form:not(.-vertical),- form.-wide-labels .op-modal--body.form--label,.form--field-containerflex-basis: 100% !importantdiff --git a/frontend/src/global_styles/content/_modal.lsg b/frontend/src/global_styles/content/_modal.lsgindex e93d71276f4..8db33863916 100644--- a/frontend/src/global_styles/content/_modal.lsg+++ b/frontend/src/global_styles/content/_modal.lsg@@ -3,14 +3,12 @@## Modals: Standard style```-<div class="op-modal">- <div class="op-modal--header">- <h3>Export</h3>- <a class="op-modal--close-button">- <i class="icon-close" title="Close popup"></i>- </a>+<div class="spot-modal">+ <div class="spot-modal--header">+ Export</div>- <div class="op-modal--body">+ <div class="spot-divider"></div>+ <div class="spot-modal--body"><ul class="export-options"><li><a>@@ -50,60 +48,33 @@</li></ul></div>-</div>--```--## Modals: Highlighted and with footer--```-<div class="op-modal -highlight">- <div class="op-modal--header">- <h2>Welcome to OpenProject</h2>- <a class="op-modal--close-button" title="Close popup">- <i class="icon-close"></i>- </a>- </div>- <div class="op-modal--body">- <b>Please select your language</b>- <fieldset class="form--fieldset">- <div class="form--field">- <label class="form--label" title="Language" for="user_language">Language</label>- <span class="form--field-container">- <span class="form--select-container -slim">- <select class="form--select">- <option value="de">Deutsch</option>- <option selected="selected" value="en">English</option>- <option value="fr">Français</option>- </select>- </span>- </span>- </div>- </fieldset>- </div>- <div class="op-modal--footer">- <button name="button" type="submit" class="button -highlight">Save</button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button name="button" type="submit" class="button button_no-margin spot-action-bar--action">Close</button>+ </div></div></div>+```-## Modals: Danger zone highlighting+## Modals: Danger zone (highlighted buttons)```-<div class="op-modal -highlight -danger-zone">- <div class="op-modal--header">- <h3 class="icon-context icon-warning">Confirm deletion of Work Package</h3>- <a class="op-modal--close-button" title="Close popup">- <i class="icon-close"></i>- </a>+<div class="spot-modal">+ <div class="spot-modal--header">+ <span class="spot-icon spot-icon_warning"></span>+ <span>Confirm deletion of Work Package</span></div>- <div class="op-modal--body">+ <div class="spot-divider"></div>+ <div class="spot-modal--body"><p>Are you sure you want to delete the following work package?<p><p> ... </p></div>- <div class="op-modal--footer">- <button name="button" type="submit" class="button -danger">Continue</button>- <button name="button" type="submit" class="button">Cancel</button>+ <div class="spot-modal--footer 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="submit" class="button button_no-margin -danger spot-action-bar--action">Continue</button>+ </div></div></div>```diff --git a/frontend/src/global_styles/content/modules/_auth_plugins.sass b/frontend/src/global_styles/content/modules/_auth_plugins.sassindex d53415f8223..dcb7488a4e9 100644--- a/frontend/src/global_styles/content/modules/_auth_plugins.sass+++ b/frontend/src/global_styles/content/modules/_auth_plugins.sass@@ -19,7 +19,6 @@.op-app-header #nav-login-content,#content,-.op-modal,.login-auth-providers a.auth-providerbackground-repeat: no-repeatbackground-size: 18px 18pxdiff --git a/frontend/src/global_styles/content/user-content/_typography.sass b/frontend/src/global_styles/content/user-content/_typography.sassindex d0d76879eb5..0018742feb0 100644--- a/frontend/src/global_styles/content/user-content/_typography.sass+++ b/frontend/src/global_styles/content/user-content/_typography.sass@@ -43,6 +43,7 @@margin: 0line-height: 1.6emcolor: inherit+ word-break: break-all.op-uc-blockquotedisplay: blockdiff --git a/frontend/src/global_styles/openproject.sass b/frontend/src/global_styles/openproject.sassindex 4c2b06deed6..76b8accdc37 100644--- a/frontend/src/global_styles/openproject.sass+++ b/frontend/src/global_styles/openproject.sass@@ -8,7 +8,6 @@@import "content/_index.sass"@import "./common/openproject-common.module"-@import "../app/shared/components/modal/modal.module"@import "../app/shared/directives/search-highlight.directive"// Dynamically linked plugin styles from Rails pluginsdiff --git a/modules/auth_plugins/app/views/hooks/login/_providers_css.html.erb b/modules/auth_plugins/app/views/hooks/login/_providers_css.html.erbindex 8f1aa2a30ff..b995e0d1158 100644--- a/modules/auth_plugins/app/views/hooks/login/_providers_css.html.erb+++ b/modules/auth_plugins/app/views/hooks/login/_providers_css.html.erb@@ -36,7 +36,7 @@ See COPYRIGHT and LICENSE files for more details..op-app-header #nav-login-content .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {background-image: url('<%= asset_path(pro[:icon]) %>') ;}- .op-modal .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {+ .login-auth-providers a.auth-provider.auth-provider-<%= pro[:name] %> {background-image: url('<%= asset_path(pro[:icon]) %>') ;}</style>diff --git a/modules/bim/spec/features/bcf/export_spec.rb b/modules/bim/spec/features/bcf/export_spec.rbindex 16e99615495..dc598db6f5f 100644--- a/modules/bim/spec/features/bcf/export_spec.rb+++ b/modules/bim/spec/features/bcf/export_spec.rb@@ -88,7 +88,7 @@ describe 'bcf export',expect(page).to have_text("completed successfully")# Close the modal- page.find('.op-modal--close-button').click+ page.find('.spot-modal-overlay').click@download_list.refresh_from(page)diff --git a/modules/boards/spec/features/support/board_page.rb b/modules/boards/spec/features/support/board_page.rbindex b2ece1cb4ac..a167c6c7448 100644--- a/modules/boards/spec/features/support/board_page.rb+++ b/modules/boards/spec/features/support/board_page.rb@@ -341,7 +341,7 @@ module Pagesdef open_and_fill_add_list_modal(name)open_add_list_modalsleep(0.1)- page.find('.op-modal .new-list--action-select input').set(name)+ page.find('.spot-modal .new-list--action-select input').set(name)enddef open_add_list_modal@@ -350,7 +350,7 @@ module Pagesenddef add_list_modal_shows_warning(value, with_link: false)- within page.find('.op-modal') do+ within page.find('.spot-modal') dowarning = '.op-toast.-warning'link = '.op-toast--content a'diff --git a/modules/dashboards/spec/features/custom_text_spec.rb b/modules/dashboards/spec/features/custom_text_spec.rbindex b1b86b8c317..5c6f45ebdce 100644--- a/modules/dashboards/spec/features/custom_text_spec.rb+++ b/modules/dashboards/spec/features/custom_text_spec.rb@@ -79,9 +79,9 @@ describe 'Project description widget on dashboard', type: :feature, js: true doeditor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')select 'Task', from: 'selected-type'- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').clickfield.save!diff --git a/modules/dashboards/spec/features/project_description_spec.rb b/modules/dashboards/spec/features/project_description_spec.rbindex 25987c5e7b3..31d02fa83d1 100644--- a/modules/dashboards/spec/features/project_description_spec.rb+++ b/modules/dashboards/spec/features/project_description_spec.rb@@ -137,9 +137,9 @@ describe 'Project description widget on dashboard', type: :feature, js: true doeditor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')select 'Task', from: 'selected-type'- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').clickfield.save!diff --git a/modules/grids/spec/support/pages/grid.rb b/modules/grids/spec/support/pages/grid.rbindex 276ad3e5df1..07b033d0419 100644--- a/modules/grids/spec/support/pages/grid.rb+++ b/modules/grids/spec/support/pages/grid.rb@@ -83,7 +83,7 @@ module Pagesarea.hoverarea.find('.grid--widget-add', visible: :all).click- within('.op-modal', &)+ within('.spot-modal', &)enddef expect_widget_adding_prohibited_generally(row_number = 1, column_number = 1)diff --git a/modules/webhooks/app/cells/views/response_body.erb b/modules/webhooks/app/cells/views/response_body.erbindex cbdfed4c792..e06f6f1ca5c 100644--- a/modules/webhooks/app/cells/views/response_body.erb+++ b/modules/webhooks/app/cells/views/response_body.erb@@ -7,35 +7,29 @@<%= t(:button_show) %></a><div class="modal-delivery-element">- <div class="op-modal--header">- <h1 class="op-modal--title">- <%= log_entry.class.human_attribute_name('response_body') %>- </h1>- <button- type="button"- class="op-modal--close-button"- aria-label="<%= t(:button_close) %>"- >- <%= op_icon('icon-close') %>- </button>+ <div class="spot-modal--header">+ <%= log_entry.class.human_attribute_name('response_body') %></div>- <div class="op-modal--body">+ <div class="spot-divider"></div>+ <div class="spot-modal--body"><h2>Headers</h2>- <pre class="webhooks--response-headers" ><%- log_entry.response_headers.each do |k,v| -%><strong><%= k -%></strong>: <span><%= v -%></span><br/><%- end -%></pre>+ <pre class="webhooks--response-headers"><%- log_entry.response_headers.each do |k, v| -%><strong><%= k -%></strong>: <span><%= v -%></span><br/><%- end -%></pre><hr/><h2>Response body</h2><pre class="webhooks--response-body"><%= log_entry.response_body %></pre></div>- <div class="op-modal--footer">- <button- class="button"- title="<%= t(:button_close) %>"- dynamic-content-modal-close-button- >- <%= t(:button_close)%>- </button>+ <div class="spot-modal--footer spot-action-bar">+ <div class="spot-action-bar--right">+ <button+ class="button button_no-margin spot-action-bar--action"+ title="<%= t(:button_close) %>"+ dynamic-content-modal-close-button+ >+ <%= t(:button_close) %>+ </button>+ </div></div></div>-</section>\ No newline at end of file+</section>diff --git a/modules/webhooks/spec/features/manage_webhooks_spec.rb b/modules/webhooks/spec/features/manage_webhooks_spec.rbindex 89957d181f4..84e95679b8c 100644--- a/modules/webhooks/spec/features/manage_webhooks_spec.rb+++ b/modules/webhooks/spec/features/manage_webhooks_spec.rb@@ -98,7 +98,7 @@ describe 'Manage webhooks through UI', type: :feature, js: true doSeleniumHubWaiter.waitfind('td.response_body a', text: 'Show').click- page.within('.op-modal') do+ page.within('.spot-modal') doexpect(page).to have_selector('.webhooks--response-headers strong', text: 'test')expect(page).to have_selector('.webhooks--response-body', text: log.response_body)enddiff --git a/spec/features/admin/enterprise/enterprise_trial_spec.rb b/spec/features/admin/enterprise/enterprise_trial_spec.rbindex a173fcab740..91b9171728e 100644--- a/spec/features/admin/enterprise/enterprise_trial_spec.rb+++ b/spec/features/admin/enterprise/enterprise_trial_spec.rb@@ -257,7 +257,7 @@ describe 'Enterprise trial management',endit 'can confirm that trial regularly' do- find('.op-modal--body [data-qa-selector="op-ee-trial-waiting-resend-link"]', text: 'Resend').click+ find('.spot-modal--body [data-qa-selector="op-ee-trial-waiting-resend-link"]', text: 'Resend').clickexpect(page).to have_selector('.op-toast.-success', text: 'Email has been resent.', wait: 20)expect(page).to have_text '[email protected]'diff --git a/spec/features/onboarding/onboarding_tour_spec.rb b/spec/features/onboarding/onboarding_tour_spec.rbindex 408fed763d0..1e2d35504df 100644--- a/spec/features/onboarding/onboarding_tour_spec.rb+++ b/spec/features/onboarding/onboarding_tour_spec.rb@@ -97,7 +97,7 @@ describe 'onboarding tour for new users', js: true doexpect(page).to have_text 'Please select your language'# Cancel language selection- click_button('Close popup')+ page.find('.spot-modal-overlay').click# The tutorial appearsexpect(page).to have_text sanitize_string(I18n.t('js.onboarding.steps.welcome')), normalize_ws: truediff --git a/spec/features/support/components/attribute_help_text_modal.rb b/spec/features/support/components/attribute_help_text_modal.rbindex d033cff55fe..3123ff1da22 100644--- a/spec/features/support/components/attribute_help_text_modal.rb+++ b/spec/features/support/components/attribute_help_text_modal.rb@@ -53,14 +53,15 @@ module Componentsdef open!SeleniumHubWaiter.waitcontainer.find("[data-qa-help-text-for='#{help_text.attribute_name}']").click- expect(page).to have_selector('.attribute-help-text--modal h1', text: help_text.attribute_caption)+ expect(page).to have_selector('[data-qa-selector="attribute-help-text--header"]', text: help_text.attribute_caption)enddef close!- within modal_container do- page.find('.icon-close').click+ # make backdrop click an the pixel x:10,y:10+ page.find('.spot-modal-overlay').tap do |element|+ element.click(x: -((element.native.size.width / 2) - 10), y: -((element.native.size.height / 2) - 10))end- expect(page).to have_no_selector('.attribute-help-text--modal h1', text: help_text.attribute_caption)+ expect(page).to have_no_selector('[data-qa-selector="attribute-help-text--header"]', text: help_text.attribute_caption)enddef expect_edit(admin:)diff --git a/spec/features/support/components/time_logging_modal.rb b/spec/features/support/components/time_logging_modal.rbindex 7455a99f015..e1f9a05c704 100644--- a/spec/features/support/components/time_logging_modal.rb+++ b/spec/features/support/components/time_logging_modal.rb@@ -54,7 +54,7 @@ module Components.to have_text(I18n.t('js.button_log_time'))endelse- expect(page).to have_no_selector '.op-modal'+ expect(page).to have_no_selector '.spot-modal'endend@@ -131,7 +131,7 @@ module Componentsenddef modal_container- page.find('.op-modal')+ page.find('.spot-modal')endendenddiff --git a/spec/features/users/invitation_spec.rb b/spec/features/users/invitation_spec.rbindex 8410bb6c504..1faceafb668 100644--- a/spec/features/users/invitation_spec.rb+++ b/spec/features/users/invitation_spec.rb@@ -50,7 +50,7 @@ describe 'invitation spec', type: :feature, js: true do# Visit invitation link with correct tokenvisit account_activate_path(token: Token::Invitation.last.value)- expect(page).to have_selector('.op-modal--header', text: 'Welcome to OpenProject')+ expect(page).to have_selector('.spot-modal--header', text: 'Welcome to OpenProject')endcontext 'as admin' dodiff --git a/spec/features/work_packages/details/date_editor_spec.rb b/spec/features/work_packages/details/date_editor_spec.rbindex 15d7621f931..e1752efaa1b 100644--- a/spec/features/work_packages/details/date_editor_spec.rb+++ b/spec/features/work_packages/details/date_editor_spec.rb@@ -232,7 +232,7 @@ describe 'date inplace editor',work_packages_page.accept_alert_dialog! if work_packages_page.has_alert_dialog?# Ensure no modal survives- expect(page).to have_no_selector('.op-modal')+ expect(page).to have_no_selector('.spot-modal')endcontext 'with a date custom field' dodiff --git a/spec/features/work_packages/export_spec.rb b/spec/features/work_packages/export_spec.rbindex 1d6b8fb21b9..cb0b26605cb 100644--- a/spec/features/work_packages/export_spec.rb+++ b/spec/features/work_packages/export_spec.rb@@ -73,7 +73,7 @@ describe 'work package export', type: :feature dowait: 10# Expect title- expect(page).to have_selector 'h1', text: I18n.t('export.your_work_packages_export')+ expect(page).to have_selector '[data-qa-selector="job-status--header"]', text: I18n.t('export.your_work_packages_export')beginperform_enqueued_jobsdiff --git a/spec/features/wysiwyg/macros/child_pages_spec.rb b/spec/features/wysiwyg/macros/child_pages_spec.rbindex 68fd5c11d84..f3d97ea2ee6 100644--- a/spec/features/wysiwyg/macros/child_pages_spec.rb+++ b/spec/features/wysiwyg/macros/child_pages_spec.rb@@ -95,18 +95,18 @@ describe 'Wysiwyg child pages spec',# Edit widget and cancel againplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')expect(page).to have_field('selected-page', with: '')- find('.op-modal--cancel-button').click+ find('.spot-modal--cancel-button').click# Edit widget and saveplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')fill_in 'selected-page', with: 'parent-page'# Save widget- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').click# Placeholder states `parent-page` and no `Include parent`expect(placeholder).to have_text('parent-page')@@ -135,11 +135,11 @@ describe 'Wysiwyg child pages spec',# Edit widget and saveplaceholder.clickpage.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').click- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')page.check 'include-parent'# Save widget- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').click# Placeholder states `parent-page` and `Include parent`expect(placeholder).to have_text('parent-page')diff --git a/spec/features/wysiwyg/macros/code_block_macro_spec.rb b/spec/features/wysiwyg/macros/code_block_macro_spec.rbindex d25c0f5a6d4..c788c5b6c72 100644--- a/spec/features/wysiwyg/macros/code_block_macro_spec.rb+++ b/spec/features/wysiwyg/macros/code_block_macro_spec.rb@@ -98,12 +98,12 @@ describe 'Wysiwyg code block macro',editor.in_editor do |container,|editor.click_toolbar_button 'Insert code snippet'- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')# CM wraps an accessor to the editor instance on the outer containercm = page.find('.CodeMirror')page.execute_script('arguments[0].CodeMirror.setValue(arguments[1]);', cm.native, 'asdf')- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').clickexpect(container).to have_selector('.op-uc-code-block', text: 'asdf')@@ -133,7 +133,7 @@ describe 'Wysiwyg code block macro',editor.in_editor do |container,|editor.click_toolbar_button 'Insert code snippet'- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')# CM wraps an accessor to the editor instance on the outer containercm = page.find('.CodeMirror')@@ -145,7 +145,7 @@ describe 'Wysiwyg code block macro',expect(page).to have_selector('.cm-keyword', text: 'def')expect(page).to have_selector('.cm-def', text: 'foobar')- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').click# Expect macro saved to editorexpect(container).to have_selector('.op-uc-code-block', text: snippet)@@ -176,7 +176,7 @@ describe 'Wysiwyg code block macro',widget = container.find('.op-uc-code-block')page.driver.browser.action.double_click(widget.native).perform- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')expect(page).to have_selector('.op-uc-code-block--language', text: 'ruby')expect(page).to have_selector('.cm-keyword', text: 'def')diff --git a/spec/features/wysiwyg/macros/work_package_button_spec.rb b/spec/features/wysiwyg/macros/work_package_button_spec.rbindex 6b6316759c1..5569ab43af3 100644--- a/spec/features/wysiwyg/macros/work_package_button_spec.rb+++ b/spec/features/wysiwyg/macros/work_package_button_spec.rb@@ -58,11 +58,11 @@ describe 'Wysiwyg work package button spec',editor.in_editor do |_container, editable|editor.insert_macro 'Insert create work package button'- expect(page).to have_selector('.op-modal')+ expect(page).to have_selector('.spot-modal')select 'MyTaskName', from: 'selected-type'# Cancel editing- find('.op-modal--cancel-button').click+ find('.spot-modal--cancel-button').clickexpect(editable).to have_no_selector('.macro.-create_work_package_link')editor.insert_macro 'Insert create work package button'@@ -70,7 +70,7 @@ describe 'Wysiwyg work package button spec',check 'button_style'# Save widget- find('.op-modal--submit-button').click+ find('.spot-modal--submit-button').click# Find widget, click to show toolbarmodal = find('.button.op-uc-placeholder', text: 'Create work package')@@ -80,7 +80,7 @@ describe 'Wysiwyg work package button spec',page.find('.ck-balloon-panel .ck-button', visible: :all, text: 'Edit').clickexpect(page).to have_checked_field('wp_button_macro_style')expect(page).to have_select('selected-type', selected: 'MyTaskName')- find('.op-modal--cancel-button').click+ find('.spot-modal--cancel-button').clickend# Save wiki pagediff --git a/spec/support/components/common/modal.rb b/spec/support/components/common/modal.rbindex f82103dc57c..a56c24a853a 100644--- a/spec/support/components/common/modal.rb+++ b/spec/support/components/common/modal.rb@@ -36,7 +36,7 @@ module Componentsdef expect_title(text)within_modal do- expect(page).to have_selector('.op-modal--title', text:)+ expect(page).to have_selector('.spot-modal--header', text:)endend@@ -69,7 +69,7 @@ module Componentsenddef selector- '.op-modal'+ '.spot-modal'endendenddiff --git a/spec/support/components/confirmation_dialog.rb b/spec/support/components/confirmation_dialog.rbindex a34eeba76e2..a9abaa8e28f 100644--- a/spec/support/components/confirmation_dialog.rb+++ b/spec/support/components/confirmation_dialog.rb@@ -34,7 +34,7 @@ module Componentsdef initialize; enddef container- '.op-modal'+ '.spot-modal'enddef expect_opendiff --git a/spec/support/components/timelines/configuration_modal.rb b/spec/support/components/timelines/configuration_modal.rbindex 0dd745ce43d..e15ffac1556 100644--- a/spec/support/components/timelines/configuration_modal.rb+++ b/spec/support/components/timelines/configuration_modal.rb@@ -57,7 +57,7 @@ module Componentsget_select(:right).find('option', text: right).select_optionget_select(:farRight).find('option', text: farRight).select_option- page.within '.op-modal' do+ page.within '.spot-modal' doclick_on 'Apply'endenddiff --git a/spec/support/components/work_packages/settings_menu.rb b/spec/support/components/work_packages/settings_menu.rbindex 5cae6e9b18a..cc1344f5793 100644--- a/spec/support/components/work_packages/settings_menu.rb+++ b/spec/support/components/work_packages/settings_menu.rb@@ -35,7 +35,7 @@ module Componentsdef open_and_save_query(name)open!find("#{selector} .menu-item", text: 'Save', match: :prefer_exact).click- page.within('.op-modal') do+ page.within('.spot-modal') dofind('#save-query-name').set nameclick_on 'Save'enddiff --git a/spec/support/components/work_packages/sort_by.rb b/spec/support/components/work_packages/sort_by.rbindex d16501e64ca..e24c147b304 100644--- a/spec/support/components/work_packages/sort_by.rb+++ b/spec/support/components/work_packages/sort_by.rb@@ -97,13 +97,13 @@ module Componentsenddef cancel_changes- page.within('.op-modal') do+ page.within('.spot-modal') doclick_on 'Cancel'endenddef apply_changes- page.within('.op-modal') do+ page.within('.spot-modal') doclick_on 'Apply'endenddiff --git a/spec/support/components/work_packages/table_configuration_modal.rb b/spec/support/components/work_packages/table_configuration_modal.rbindex 0fe68b31e96..18d744800d9 100644--- a/spec/support/components/work_packages/table_configuration_modal.rb+++ b/spec/support/components/work_packages/table_configuration_modal.rb@@ -73,7 +73,7 @@ module Componentsenddef save- find('[data-qa-selector="op-modal-wp-table-configuration-save-button"]').click+ find('[data-qa-selector="spot-modal-wp-table-configuration-save-button"]').clickenddef cancel@@ -109,7 +109,7 @@ module Componentsenddef selector- '.op-modal'+ '.spot-modal'endprivate