diff --git a/app/assets/stylesheets/openproject/_generic.sass b/app/assets/stylesheets/openproject/_generic.sass index b6ee00a3f0..28b4d80c4c 100644 --- a/app/assets/stylesheets/openproject/_generic.sass +++ b/app/assets/stylesheets/openproject/_generic.sass @@ -118,4 +118,4 @@ z-index: 0 !important .-error - color: $content-form-error-color + color: $content-form-error-color !important diff --git a/frontend/src/app/components/resizer/wp-resizer.component.ts b/frontend/src/app/components/resizer/wp-resizer.component.ts index d24cdad6a2..9c02a73295 100644 --- a/frontend/src/app/components/resizer/wp-resizer.component.ts +++ b/frontend/src/app/components/resizer/wp-resizer.component.ts @@ -146,9 +146,7 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A const event = new Event(this.resizeEvent); window.dispatchEvent(event); - if (this.resizer.classList.contains('-error')) { - this.resizer.classList.remove('-error'); - } + this.manageErrorClass(false); } resizeMove(deltas:ResizeDelta) { @@ -164,15 +162,11 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A newValue = this.elementMinWidth; // Show the resizer red when it reaches its limit (min-width) - if (!this.resizer.classList.contains('-error')) { - this.resizer.classList.add('-error'); - } + this.manageErrorClass(true); } else { newValue = this.elementWidth; - if (this.resizer.classList.contains('-error')) { - this.resizer.classList.remove('-error'); - } + this.manageErrorClass(false); } // Store item in local storage @@ -218,4 +212,14 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A let fullScreenLeftView = jQuery('.work-packages-full-view--split-left')[0]; this.toggleColumns(fullScreenLeftView); } + + private manageErrorClass(shouldBePresent:boolean) { +   if (shouldBePresent && !this.resizer.classList.contains('-error')) { +    this.resizer.classList.add('-error'); +   } + + if (!shouldBePresent && this.resizer.classList.contains('-error')) { + this.resizer.classList.remove('-error'); + } + } } diff --git a/modules/bim/app/assets/stylesheets/bim/ifc_viewer/generic.sass b/modules/bim/app/assets/stylesheets/bim/ifc_viewer/generic.sass index a1b9774bce..c9a3621827 100644 --- a/modules/bim/app/assets/stylesheets/bim/ifc_viewer/generic.sass +++ b/modules/bim/app/assets/stylesheets/bim/ifc_viewer/generic.sass @@ -1,7 +1,6 @@ // -------------------------- GENERIC -------------------------- @import "openproject/variables" @import "openproject/mixins" -@import "openproject/generic" @import "fonts/openproject_icon_definitions" @import "fonts/openproject_icon_font"