Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix footer component depreciation #3565

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 43 additions & 37 deletions CSETWebNg/src/app/layout/layout-main/layout-main.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,51 @@
</div>

<!-- Footer -->
<ngb-accordion #acc="ngbAccordion" type="primary" class="footer row no-gutters sticky-footer"
<div ngbAccordion type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<ngb-panel id="footerPanel">
<ng-template ngbPanelTitle>
<button id="footerExpanderButton" class="cset-footer-expand-button"
[ngClass]="{'cset-icons-chevron-down flex-11a': isFooterOpen(), 'cset-icons-chevron-up flex-00a': !isFooterOpen()}"></button>
</ng-template>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" (click)="showDisclaimer()">INL
Privacy & Accessibility</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href=" https://doe.responsibledisclosure.com/hc/en-us">Vulnerability Disclosure Program</a>
<span class="mr-2 ml-2">|</span>
</ng-container>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.us-cert.gov/ics/Frequently-Asked-Questions">FAQ</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/privacy/">Privacy &amp; Use</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer"
href="http://www.us-cert.gov/accessibility/">Accessibility</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a target="_blank" rel="noopener noreferrer" href="https://www.cisa.gov/">CISA</a>
<span style="padding: 2px">is part of the</span>
<a target="_blank" rel="noopener noreferrer" href="http://www.dhs.gov">Department of Homeland Security</a>
</div>
<div ngbAccordionItem id="footerPanel" [collapsed]="footerClosed">
<h4 ngbAccordionHeader>

<button ngbAccordionButton id="footerExpanderButton" class="cset-footer-expand-button" (click)="isFooterOpen()"
[ngClass]="{'cset-icons-chevron-down flex-11a': !footerClosed, 'cset-icons-chevron-up flex-00a': footerClosed}"></button>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>

<ng-template >
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" (click)="showDisclaimer()">INL
Privacy & Accessibility</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href=" https://doe.responsibledisclosure.com/hc/en-us">Vulnerability Disclosure Program</a>
<span class="mr-2 ml-2">|</span>
</ng-container>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.us-cert.gov/ics/Frequently-Asked-Questions">FAQ</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/privacy/">Privacy &amp; Use</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer"
href="http://www.us-cert.gov/accessibility/">Accessibility</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a target="_blank" rel="noopener noreferrer" href="https://www.cisa.gov/">CISA</a>
<span style="padding: 2px">is part of the</span>
<a target="_blank" rel="noopener noreferrer" href="http://www.dhs.gov">Department of Homeland Security</a>
</div>
</div>
</ng-template>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
</div>
</div>
</div>
</div>

<div class="bgc-white dhs-seal-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ label[required]::after {
}

.accordion-header {
padding: 0.2em;
padding-top: 0.2em;
margin-bottom:0;
}

.footer .bg-primary {
Expand Down
16 changes: 6 additions & 10 deletions CSETWebNg/src/app/layout/layout-main/layout-main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
import { AggregationService } from '../../services/aggregation.service';
import { AssessmentService } from '../../services/assessment.service';
import { AuthenticationService } from '../../services/authentication.service';
Expand All @@ -48,9 +47,8 @@ export class LayoutMainComponent implements OnInit, AfterViewInit {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;

@ViewChild('acc') accordion: NgbAccordion;

footerClosed: boolean = true;

constructor(
public auth: AuthenticationService,
public assessSvc: AssessmentService,
Expand All @@ -70,9 +68,7 @@ export class LayoutMainComponent implements OnInit, AfterViewInit {
}

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

}

/**
Expand All @@ -93,10 +89,10 @@ export class LayoutMainComponent implements OnInit, AfterViewInit {
}

isFooterOpen() {
if (!!this.accordion) {
return this.accordion.isExpanded('footerPanel');
if (!this.footerClosed) {
return this.footerClosed = true;
}
return false;
return this.footerClosed = false;
}

isRunningAnonymous() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,40 @@
</div>

<!-- Footer -->
<ngb-accordion #acc="ngbAccordion" type="primary" class="footer row no-gutters sticky-footer"
<div ngbAccordion type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<ngb-panel id="footerPanel">
<ng-template ngbPanelTitle>
<button id="footerExpanderButton" class="cset-footer-expand-button"
[ngClass]="{'cset-icons-chevron-down flex-11a': isFooterOpen(), 'cset-icons-chevron-up flex-00a': !isFooterOpen()}"></button>
</ng-template>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" (click)="showDisclaimer()">INL
Privacy & Accessibility</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href=" https://doe.responsibledisclosure.com/hc/en-us">Vulnerability Disclosure Program</a>
<span class="mr-2 ml-2">|</span>
</ng-container>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.cisa.gov/topics/industrial-control-systems">FAQ</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<div ngbAccordionItem id="footerPanel" [collapsed]="footerClosed">
<h4 ngbAccordionHeader>

<button ngbAccordionButton id="footerExpanderButton" class="cset-footer-expand-button" (click)="isFooterOpen()"
[ngClass]="{'cset-icons-chevron-down flex-11a': !footerClosed, 'cset-icons-chevron-up flex-00a': footerClosed}"></button>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<ng-container *ngIf="isRunningAnonymous()">
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer" (click)="showDisclaimer()">INL
Privacy & Accessibility</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href=" https://doe.responsibledisclosure.com/hc/en-us">Vulnerability Disclosure Program</a>
<span class="mr-2 ml-2">|</span>
</ng-container>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.cisa.gov/topics/industrial-control-systems">FAQ</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
</div>
</div>
</ng-template>
</div>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ label[required]::after {
}

.accordion-header {
padding: 0.2em;
padding-top: 0.2em;
margin-bottom:0;
}

.footer .bg-primary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
import { AggregationService } from '../../services/aggregation.service';
import { AssessmentService } from '../../services/assessment.service';
import { AuthenticationService } from '../../services/authentication.service';
Expand All @@ -47,8 +46,7 @@ export class RenewLayoutMainComponent implements OnInit, AfterViewInit {
docUrl: string;
dialogRef: MatDialogRef<any>;
isFooterVisible: boolean = false;

@ViewChild('acc') accordion: NgbAccordion;
footerClosed:boolean = true;

constructor(
public auth: AuthenticationService,
Expand Down Expand Up @@ -89,10 +87,10 @@ export class RenewLayoutMainComponent implements OnInit, AfterViewInit {
}

isFooterOpen() {
if (!!this.accordion) {
return this.accordion.isExpanded('footerPanel');
if (!this.footerClosed) {
return this.footerClosed = true;
}
return false;
return this.footerClosed = false;
}

isRunningAnonymous() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,37 +197,42 @@
</div>

<!-- Footer -->
<ngb-accordion #acc="ngbAccordion" type="primary" class="footer row no-gutters"
*ngIf="layoutSvc.isFooterShown(router.url)">
<ngb-panel id="footerPanel">
<ng-template ngbPanelTitle>
<button id="footerExpanderButton" class="cset-footer-expand-button"
[ngClass]="{'cset-icons-chevron-down flex-11a': isFooterOpen(), 'cset-icons-chevron-up flex-00a': !isFooterOpen()}"></button>
</ng-template>
<ng-template ngbPanelContent>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a class="mr-2" target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.us-cert.gov/ics/Frequently-Asked-Questions">FAQ</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/privacy/">Privacy &amp; Use</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer"
href="http://www.us-cert.gov/accessibility/">Accessibility</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a target="_blank" rel="noopener noreferrer" href="https://www.cisa.gov/">CISA</a>
<span style="padding: 2px">is part of the</span>
<a target="_blank" rel="noopener noreferrer" href="http://www.dhs.gov">Department of Homeland Security</a>
</div>
<div ngbAccordion type="primary" class="footer row no-gutters sticky-footer"
*ngIf="layoutSvc.isFooterShown(this.router.url)">
<div ngbAccordionItem id="footerPanel" [collapsed]="footerClosed">
<h4 ngbAccordionHeader>

<button ngbAccordionButton id="footerExpanderButton" class="cset-footer-expand-button" (click)="isFooterOpen()"
[ngClass]="{'cset-icons-chevron-down flex-11a': !footerClosed, 'cset-icons-chevron-up flex-00a': footerClosed}"></button>
</h4>
<div ngbAccordionCollapse>
<div ngbAccordionBody>
<ng-template>
<div class="footer-section-2 p-2">
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a class="mr-2" target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="https://www.us-cert.gov/ics/Frequently-Asked-Questions">FAQ</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/tlp/">Traffic Light Protocol</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer" rel="noopener noreferrer"
href="http://www.us-cert.gov/privacy/">Privacy &amp; Use</a>
<span class="mr-2 ml-2">|</span>
<a target="_blank" rel="noopener noreferrer"
href="http://www.us-cert.gov/accessibility/">Accessibility</a>
</div>
<div class="d-flex flex-row flex-wrap justify-content-center flex-11a">
<a target="_blank" rel="noopener noreferrer" href="https://www.cisa.gov/">CISA</a>
<span style="padding: 2px">is part of the</span>
<a target="_blank" rel="noopener noreferrer" href="http://www.dhs.gov">Department of Homeland Security</a>
</div>
</div>
</ng-template>
</div>
</ng-template>
</ngb-panel>
</ngb-accordion>
</div>
</div>
</div>
</div>

<div class="bgc-white dhs-seal-background"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ label[required]::after {
}

.accordion-header {
padding: 0.2em;
padding-top: 0.2em;
margin-bottom:0;
}

.footer .bg-primary {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import { AfterViewInit, Component, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { NgbAccordion } from '@ng-bootstrap/ng-bootstrap';
import { AggregationService } from '../../services/aggregation.service';
import { AssessmentService } from '../../services/assessment.service';
import { AuthenticationService } from '../../services/authentication.service';
Expand All @@ -45,8 +44,7 @@ export class RraLayoutMainComponent implements OnInit, AfterViewInit {

docUrl: string;
dialogRef: MatDialogRef<any>;

@ViewChild('acc') accordion: NgbAccordion;
footerClosed:boolean = true;

constructor(
public auth: AuthenticationService,
Expand Down Expand Up @@ -95,10 +93,10 @@ export class RraLayoutMainComponent implements OnInit, AfterViewInit {
}

isFooterOpen() {
if (!!this.accordion) {
return this.accordion.isExpanded('footerPanel');
if (!this.footerClosed) {
return this.footerClosed = true;
}
return false;
return this.footerClosed = false;
}

}
Loading
Loading