Skip to content

Commit

Permalink
Merge pull request #3617 from cisagov/bug/CSET-2462
Browse files Browse the repository at this point in the history
Fix Footer Defaulting to Open
  • Loading branch information
randywoods authored Nov 2, 2023
2 parents f38211e + 3698bf9 commit d020e27
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 113 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
Expand All @@ -41,7 +41,7 @@ import { SetBuilderService } from './../../services/set-builder.service';
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100 h-100' }
})
export class AcetLayoutMainComponent implements OnInit, AfterViewInit {
export class AcetLayoutMainComponent {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;
Expand All @@ -59,15 +59,6 @@ export class AcetLayoutMainComponent implements OnInit, AfterViewInit {
public router: Router
) { }


ngOnInit() { }

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -31,7 +31,6 @@ import { SetBuilderService } from './../../services/set-builder.service';
import { ConfigService } from '../../services/config.service';
import { FileUploadClientService } from '../../services/file-client.service';
import { LayoutService } from '../../services/layout.service';
import { FooterService } from '../../services/footer.service';

@Component({
selector: 'cf-layout-main',
Expand All @@ -41,7 +40,7 @@ import { FooterService } from '../../services/footer.service';
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100 h-100' },
})
export class CfLayoutMainComponent implements OnInit, AfterViewInit {
export class CfLayoutMainComponent {

docUrl: string;
dialogRef: MatDialogRef<any>;
Expand All @@ -57,22 +56,9 @@ export class CfLayoutMainComponent implements OnInit, AfterViewInit {
public fileSvc: FileUploadClientService,
public setBuilderSvc: SetBuilderService,
public dialog: MatDialog,
public router: Router,
private footerSvc: FooterService
public router: Router,
) { }

ngOnInit() {
if (this.configSvc.installationMode === 'RRA') {

}
}

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down
4 changes: 2 additions & 2 deletions CSETWebNg/src/app/layout/iod-layout/iod-layout.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@ label[required]::after {
.accordion-header {
padding-top: 0.2em;
margin-bottom: 0;
background-color: $primary-750;
background-color: $primary-color;
}

.footer .bg-primary {
background-color: $primary-900 !important;
background-color: $primary-color !important;
}

.footer .card-header:first-child {
Expand Down
14 changes: 2 additions & 12 deletions CSETWebNg/src/app/layout/iod-layout/iod-layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -43,7 +43,7 @@ import { LayoutService } from '../../services/layout.service';
host: { class: 'd-flex flex-column flex-11a w-100 h-100' },

})
export class IodLayoutComponent implements OnInit, AfterViewInit {
export class IodLayoutComponent {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;
Expand All @@ -61,16 +61,6 @@ export class IodLayoutComponent implements OnInit, AfterViewInit {
public router: Router
) { }

ngOnInit() {

}

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down
16 changes: 3 additions & 13 deletions CSETWebNg/src/app/layout/layout-main/layout-main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -43,12 +43,12 @@ import { LayoutService } from '../../services/layout.service';
host: { class: 'd-flex flex-column flex-11a w-100 h-100' },

})
export class LayoutMainComponent implements OnInit, AfterViewInit {
export class LayoutMainComponent {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;
footerClosed: boolean = true;

constructor(
public auth: AuthenticationService,
public assessSvc: AssessmentService,
Expand All @@ -61,16 +61,6 @@ export class LayoutMainComponent implements OnInit, AfterViewInit {
public router: Router
) { }

ngOnInit() {
if (this.configSvc.installationMode === 'RRA') {

}
}

ngAfterViewInit() {

}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -42,7 +42,7 @@ import { OnlineDisclaimerComponent } from '../../dialogs/online-disclaimer/onlin
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100 h-100' }
})
export class RenewLayoutMainComponent implements OnInit, AfterViewInit {
export class RenewLayoutMainComponent {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;
Expand All @@ -60,15 +60,6 @@ export class RenewLayoutMainComponent implements OnInit, AfterViewInit {
public router: Router
) { }


ngOnInit() { }

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -40,7 +40,7 @@ import { LayoutService } from '../../services/layout.service';
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100 h-100' }
})
export class RraLayoutMainComponent implements OnInit, AfterViewInit {
export class RraLayoutMainComponent {

docUrl: string;
dialogRef: MatDialogRef<any>;
Expand All @@ -57,14 +57,6 @@ export class RraLayoutMainComponent implements OnInit, AfterViewInit {
public router: Router
) { }

ngOnInit() { }

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
* TODO: Hard-coded paths could be replaced by asking the BreadcrumbComponent
Expand Down
49 changes: 26 additions & 23 deletions CSETWebNg/src/app/layout/styles-rra.scss
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
/*
/*
Copyright 2023 Battelle Energy Alliance, LLC
Copyright 2023 Battelle Energy Alliance, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

Expand All @@ -39,7 +39,7 @@ $header-bg: $black;
$header-bg-hover: #555;
$footer-bg: #091d27;
$nav-bg: $gray1; // #4a6066;
$drawer-bg: $black;
$drawer-bg: $black;


$subcat-bg: #f1f1f1;
Expand Down Expand Up @@ -87,9 +87,9 @@ table.assessment-summary th {


/* drawer / side nav */
/*
/*
TODO(mdc-migration): The following rule targets internal classes of dialog that may no longer apply for the MDC version.
TODO(mdc-migration): The following rule targets internal classes of dialog that may no longer apply for the MDC version.
*/
.mat-drawer, .mat-dialog-header {
Expand Down Expand Up @@ -138,6 +138,9 @@ table.cset-table th, table.cset-table-4 th {
background-color: $table-header-bg !important;
}

.accordion-header {
background-color: $footer-bg;
}

.footer .bg-primary {
background-color: $footer-bg !important;
Expand All @@ -149,8 +152,8 @@ table.cset-table th, table.cset-table-4 th {

/* buttons */
.btn-primary, .btn-secondary:hover {
background-color: $black;
border-color: $black;
background-color: $black;
border-color: $black;
color: $blue1;
font-weight: bold;
}
Expand All @@ -167,4 +170,4 @@ table.cset-table th, table.cset-table-4 th {

.btn-link, a:not([href]).btn-link, .btn-link-dark, a:not([href]).btn-link-dark {
color: $link1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,12 @@ label[required]::after {

.accordion-header {
padding-top: 0.2em;
margin-bottom:0;
background-color: $primary-450;
margin-bottom: 0;
background-color: $primary-color
}

.footer .bg-primary {
background-color: $primary-450 !important;
background-color: $primary-color !important;
}

.footer .card-header:first-child {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// SOFTWARE.
//
////////////////////////////////
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Component, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { AggregationService } from '../../services/aggregation.service';
Expand All @@ -42,7 +42,7 @@ import { OnlineDisclaimerComponent } from '../../dialogs/online-disclaimer/onlin
// eslint-disable-next-line
host: { class: 'd-flex flex-column flex-11a w-100 h-100' }
})
export class TsaLayoutMainComponent implements OnInit, AfterViewInit {
export class TsaLayoutMainComponent {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;
Expand All @@ -60,15 +60,6 @@ export class TsaLayoutMainComponent implements OnInit, AfterViewInit {
public router: Router
) { }


ngOnInit() { }

ngAfterViewInit() {
setTimeout(() => {
this.isFooterOpen();
}, 200);
}

/**
* Indicates if the user is currently within the Module Builder pages.
*/
Expand Down

0 comments on commit d020e27

Please sign in to comment.