* Update modal class and remove old/obsolete styles (#9438)

* Fix appearance of time entry configuration modal
pull/9445/head
Henriette Darge 3 years ago committed by GitHub
parent 2a6bc3d495
commit daebe0e9e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 62
      frontend/src/app/features/boards/board/board-video-teaser-modal/board-video-teaser-modal.component.ts
  2. 2
      frontend/src/app/features/enterprise/enterprise-modal/enterprise-trial.modal.html
  3. 2
      frontend/src/app/features/invite-user-modal/success/success.component.html
  4. 5
      frontend/src/app/features/invite-user-modal/success/success.component.sass
  5. 2
      frontend/src/app/shared/components/attribute-help-texts/help-text.modal.html
  6. 32
      frontend/src/app/shared/components/datepicker/datepicker.modal.html
  7. 4
      frontend/src/app/shared/components/datepicker/datepicker.modal.sass
  8. 45
      frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.html
  9. 3
      frontend/src/app/shared/components/grids/widgets/time-entries/current-user/configuration-modal/configuration.modal.ts
  10. 11
      frontend/src/app/shared/components/modal/modal.sass
  11. 4
      frontend/src/app/shared/components/modals/confirm-dialog/confirm-dialog.modal.html
  12. 1
      frontend/src/app/shared/components/time_entries/create/create.modal.ts
  13. 1
      frontend/src/app/shared/components/time_entries/edit/edit.modal.ts
  14. 7
      frontend/src/app/shared/components/time_entries/shared/modal/base.modal.sass
  15. 2
      frontend/src/app/shared/shared.module.ts
  16. 4
      frontend/src/global_styles/content/_forms_mobile.sass
  17. 12
      frontend/src/global_styles/content/_help_texts.sass
  18. 28
      frontend/src/global_styles/content/_modal.lsg
  19. 10
      frontend/src/global_styles/content/_request_for_confirmation.sass
  20. 3
      frontend/src/global_styles/content/work_packages/_table_configuration_modal.sass
  21. 2
      spec/features/admin/enterprise/enterprise_trial_spec.rb
  22. 2
      spec/features/work_packages/details/date_editor_spec.rb

@ -1,62 +0,0 @@
import {
ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit,
} from '@angular/core';
import { OpModalLocalsMap } from 'core-app/shared/components/modal/modal.types';
import { OpModalComponent } from 'core-app/shared/components/modal/modal.component';
import { OpModalLocalsToken } from 'core-app/shared/components/modal/modal.service';
import { I18nService } from 'core-app/core/i18n/i18n.service';
import { boardTeaserVideoURL } from 'core-app/features/boards/board-constants.const';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
template: `
<div class="op-modal--portal">
<div class="op-modal--modal-container"
data-indicator-name="modal"
tabindex="0">
<div class="op-modal--modal-header">
<h3 [textContent]="text.title"></h3>
<a class="op-modal--modal-close-button">
<i
class="icon-close"
(click)="closeMe($event)"
[attr.title]="text.closePopup">
</i>
</a>
</div>
<iframe [src]="teaserVideoUrl"
width="800"
height="500"
class="boards--teaser-video"
frameborder="0"
allow="autoplay; fullscreen"
allowfullscreen>
</iframe>
</div>
</div>
`,
})
export class BoardVideoTeaserModalComponent extends OpModalComponent implements OnInit, OnDestroy {
/* Close on escape? */
public closeOnEscape = false;
/* Close on outside click? */
public closeOnOutsideClick = false;
public text:any = {
title: this.I18n.t('js.label_board_plural'),
};
public teaserVideoUrl = this.domSanitizer.bypassSecurityTrustResourceUrl(boardTeaserVideoURL);
constructor(readonly elementRef:ElementRef,
@Inject(OpModalLocalsToken) public locals:OpModalLocalsMap,
readonly cdRef:ChangeDetectorRef,
readonly I18n:I18nService,
readonly domSanitizer:DomSanitizer) {
super(locals, cdRef, elementRef);
}
}

@ -1,7 +1,7 @@
<div class="op-modal">
<op-modal-header (close)="closeMe($event)">{{headerText()}}</op-modal-header>
<div [ngSwitch]="openWindow()" class="op-modal--modal-body">
<div [ngSwitch]="openWindow()" class="op-modal--body">
<!-- first modal window -->
<div *ngSwitchCase="1">
<enterprise-trial-form></enterprise-trial-form>

@ -1,5 +1,5 @@
<div class="op-ium-success">
<div class="op-modal--body">
<div class="op-modal--body op-modal--body_center">
<img [src]="type === PrincipalType.Placeholder ? placeholder_image : user_image" />
<h1 [textContent]="text.title()"></h1>

@ -2,8 +2,3 @@
flex-grow: 1
display: flex
flex-direction: column
.op-modal--body
justify-content: center
align-items: center
text-align: center

@ -7,7 +7,7 @@
<span [textContent]="helpText.attributeCaption"></span>
</op-modal-header>
<div class="op-modal--body">
<div class="op-modal--body op-modal--body_limited-height">
<div
class="op-uc-container op-uc-container__no-permalinks"
[innerHtml]="helpText.helpText.html"

@ -111,24 +111,24 @@
</div>
</div>
</div>
</div>
<ng-container *ngIf="!isSchedulable">
<div class="notification-box -info">
<div class="notification-box--content">
<ng-container *ngIf="isParent">
<p [textContent]="text.isParent"></p>
</ng-container>
<ng-container *ngIf="isSwitchedFromManualToAutomatic && !isParent">
<p [textContent]="text.isSwitchedFromManualToAutomatic"></p>
</ng-container>
<ng-container *ngIf="!isSchedulable">
<div class="notification-box -info">
<div class="notification-box--content">
<ng-container *ngIf="isParent">
<p [textContent]="text.isParent"></p>
</ng-container>
<ng-container *ngIf="isSwitchedFromManualToAutomatic && !isParent">
<p [textContent]="text.isSwitchedFromManualToAutomatic"></p>
</ng-container>
</div>
</div>
</div>
</ng-container>
<ng-container *ngIf="isSchedulable">
<input id="flatpickr-input"
hidden>
</ng-container>
</ng-container>
<ng-container *ngIf="isSchedulable">
<input id="flatpickr-input"
hidden>
</ng-container>
</div>
<div class="op-modal--footer">
<button

@ -8,10 +8,6 @@
box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.25)
padding: 5px 0 0 0
.op-modal--modal-body
overflow: hidden
margin-bottom: 0
.grid-block
align-items: center

@ -1,18 +1,10 @@
<div class="op-modal--portal ">
<div class="op-modal--modal-container"
data-indicator-name="modal"
tabindex="0">
<div class="op-modal--modal-header">
<a class="op-modal--modal-close-button">
<i
class="icon-close"
(click)="closeMe($event)"
[attr.title]="text.closePopup">
</i>
</a>
<h3 [textContent]="text.displayedDays"></h3>
</div>
<div class="op-modal"
data-indicator-name="modal"
tabindex="0">
<op-modal-header (close)="closeMe($event)">{{text.displayedDays}}</op-modal-header>
<div class="op-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">
@ -21,19 +13,18 @@
</span>
</span>
</div>
</div>
<div class="tab-content"></div>
<div class="modal--form-actions">
<button
class="button"
[textContent]="text.cancelButton"
(click)="closeMe($event)"
></button>
<button
class="button -highlight"
[textContent]="text.applyButton"
(click)="saveChanges()"
></button>
</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>
</div>

@ -53,7 +53,8 @@ export class TimeEntriesCurrentUserConfigurationModalComponent extends OpModalCo
}
ngOnInit() {
this.daysOriginalCheckedValues = this.locals.options.days || Array.from({ length: 7 }, () => true);
let localDayOptions = this.locals.options.days
this.daysOriginalCheckedValues = localDayOptions.length > 0 ? localDayOptions : Array.from({ length: 7 }, () => true);
this.days = this.timeEntriesCurrentUserConfigurationModalService.getOrderedDaysData(this.daysOriginalCheckedValues);
}

@ -58,6 +58,17 @@
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

@ -1,11 +1,11 @@
<div
class="op-modal confirm-form-submit--modal loading-indicator--location"
class="op-modal op-modal_autoheight confirm-form-submit--modal loading-indicator--location"
[ngClass]="{'-highlight -danger-zone' : dangerHighlighting }"
data-indicator-name="modal"
>
<op-modal-header (close)="closeMe($event)">{{text.title}}</op-modal-header>
<div class="op-modal--modal-body">
<div class="op-modal--body">
<p>
<span [textContent]="text.text"></span>
<br/>

@ -6,7 +6,6 @@ import { TimeEntryBaseModal } from '../shared/modal/base.modal';
@Component({
templateUrl: '../shared/modal/base.modal.html',
styleUrls: ['../shared/modal/base.modal.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [
HalResourceEditingService,

@ -6,7 +6,6 @@ import { TimeEntryBaseModal } from 'core-app/shared/components/time_entries/shar
@Component({
templateUrl: '../shared/modal/base.modal.html',
styleUrls: ['../shared/modal/base.modal.sass'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [
HalResourceEditingService,

@ -1,7 +0,0 @@
.op-modal--modal-container
max-width: 90vw
width: 800px
.icon-log_time
&:before
padding-right: 6px

@ -44,7 +44,6 @@ import { CurrentProjectService } from 'core-app/core/current-project/current-pro
import { SortHeaderDirective } from 'core-app/features/work-packages/components/wp-table/sort-header/sort-header.directive';
import { ZenModeButtonComponent } from 'core-app/features/work-packages/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component';
import { OPContextMenuComponent } from 'core-app/shared/components/op-context-menu/op-context-menu.component';
import { BoardVideoTeaserModalComponent } from 'core-app/features/boards/board/board-video-teaser-modal/board-video-teaser-modal.component';
import { OpenprojectPrincipalRenderingModule } from 'core-app/shared/components/principal/principal-rendering.module';
import { DatePickerModule } from 'core-app/shared/components/op-date-picker/date-picker.module';
import { FocusModule } from 'core-app/shared/directives/focus/focus.module';
@ -223,7 +222,6 @@ export function bootstrapModule(injector:Injector) {
EnterpriseBannerBootstrapComponent,
HomescreenNewFeaturesBlockComponent,
BoardVideoTeaserModalComponent,
// filter
SlideToggleComponent,

@ -50,8 +50,8 @@
max-width: 100%
#tab-content-info form,
.op-modal--modal-body form:not(.-vertical),
form.-wide-labels .op-modal--modal-body
.op-modal--body form:not(.-vertical),
form.-wide-labels .op-modal--body
.form--label,
.form--field-container
flex-basis: 100% !important

@ -27,18 +27,6 @@
//++
.attribute-help-text--modal
// Set max width of the attribute heading
.op-modal--modal-header > h2
width: calc(100% - 80px)
// Set max height of the modal body
.op-modal--modal-body
max-height: 50vh
overflow-y: auto
&:focus
outline-style: none
// Avoid large right margin for conditional button
.help-text--edit-button
margin-right: 0

@ -3,14 +3,14 @@
## Modals: Standard style
```
<div class="op-modal--modal-container">
<div class="op-modal--modal-header">
<div class="op-modal">
<div class="op-modal--header">
<h3>Export</h3>
<a class="op-modal--modal-close-button">
<a class="op-modal--close-button">
<i class="icon-close" title="Close popup"></i>
</a>
</div>
<div class="op-modal--modal-body">
<div class="op-modal--body">
<ul class="export-options">
<li>
<a>
@ -57,14 +57,14 @@
## Modals: Highlighted and with footer
```
<div class="op-modal--modal-container -highlight">
<div class="op-modal--modal-header">
<div class="op-modal -highlight">
<div class="op-modal--header">
<h2>Welcome to OpenProject</h2>
<a class="op-modal--modal-close-button" title="Close popup">
<a class="op-modal--close-button" title="Close popup">
<i class="icon-close"></i>
</a>
</div>
<div class="op-modal--modal-body">
<div class="op-modal--body">
<b>Please select your language</b>
<fieldset class="form--fieldset">
<div class="form--field">
@ -81,7 +81,7 @@
</div>
</fieldset>
</div>
<div class="op-modal--modal-footer">
<div class="op-modal--footer">
<button name="button" type="submit" class="button -highlight">Save</button>
</div>
</div>
@ -90,18 +90,18 @@
## Modals: Danger zone highlighting
```
<div class="op-modal--modal-container -highlight -danger-zone">
<div class="op-modal--modal-header">
<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--modal-close-button" title="Close popup">
<a class="op-modal--close-button" title="Close popup">
<i class="icon-close"></i>
</a>
</div>
<div class="op-modal--modal-body">
<div class="op-modal--body">
<p>Are you sure you want to delete the following work package?<p>
<p> ... </p>
</div>
<div class="op-modal--modal-footer">
<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>

@ -26,16 +26,6 @@
// See docs/COPYRIGHT.rdoc for more details.
//++
.request-for-confirmation--modal
.icon-context
color: var(--font-color-on-primary)
.op-modal--modal-footer
text-align: right
.request-for-confirmation--submit-button
margin: 0
.request-for-confirmation--form
padding: 10px 0 20px 0

@ -13,9 +13,6 @@
input
margin-top: 0px
.modal--form-actions
@extend .op-modal--modal-footer
.advanced-filters--filter,
.advanced-filters--add-filter
max-width: 100%

@ -257,7 +257,7 @@ describe 'Enterprise trial management',
end
it 'can confirm that trial regularly' do
find('.op-modal--modal-body #resend-link', text: 'Resend').click
find('.op-modal--body #resend-link', text: 'Resend').click
expect(page).to have_selector('.notification-box.-success', text: 'Email has been resent.', wait: 20)
expect(page).to have_text 'foo@foocorp.example'

@ -125,7 +125,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--modal-container')
expect(page).to have_no_selector('.op-modal')
end
context 'with a date custom field' do

Loading…
Cancel
Save