tweak for print.css and add click-outside-or-escape directive for indicators' description overlay

This commit is contained in:
Alex Martzios 2022-04-13 13:22:22 +03:00
parent da71702e2a
commit 56a877461d
6 changed files with 19 additions and 10 deletions

View File

@ -182,7 +182,7 @@
<div *ngIf="indicator.description || indicator.additionalDescription" <div *ngIf="indicator.description || indicator.additionalDescription"
class="uk-position-bottom-left uk-margin-left uk-margin-small-bottom"> class="uk-position-bottom-left uk-margin-left uk-margin-small-bottom">
<a class="uk-display-inline-block uk-text-uppercase uk-button-text" <a class="uk-display-inline-block uk-text-uppercase uk-button-text"
(click)="toggleDescriptionOverlay(j)"> (click)="toggleDescriptionOverlay($event, j)">
<span class="uk-flex uk-flex-middle"> <span class="uk-flex uk-flex-middle">
<icon name="analytics" type="outlined" [flex]="true"></icon> <icon name="analytics" type="outlined" [flex]="true"></icon>
<span class="uk-margin-small-left">Description</span> <span class="uk-margin-small-left">Description</span>
@ -191,9 +191,9 @@
</div> </div>
<div *ngIf="showDescriptionOverlay[j] && (indicator.description || indicator.additionalDescription)" <div *ngIf="showDescriptionOverlay[j] && (indicator.description || indicator.additionalDescription)"
class="custom-description-overlay uk-card uk-card-default uk-flex uk-flex-middle uk-flex-center"> class="custom-description-overlay uk-card uk-card-default uk-flex uk-flex-middle uk-flex-center">
<div class="inner uk-padding-small"> <div class="inner uk-padding-small" click-outside-or-esc (clickOutside)="closeDescriptionOverlay($event, j)">
<div class="uk-flex uk-flex-right"> <div class="uk-flex uk-flex-right">
<a class="uk-display-inline-block uk-link-reset" (click)="toggleDescriptionOverlay(j)"> <a class="uk-display-inline-block uk-link-reset" (click)="toggleDescriptionOverlay($event, j)">
<icon name="close" ratio="1"></icon> <icon name="close" ratio="1"></icon>
</a> </a>
</div> </div>

View File

@ -31,7 +31,7 @@ import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
import {properties} from "../../environments/environment"; import {properties} from "../../environments/environment";
import {IndexInfoService} from "../openaireLibrary/utils/indexInfo.service"; import {IndexInfoService} from "../openaireLibrary/utils/indexInfo.service";
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service"; import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
import {HelperFunctions} from "../openaireLibrary/utils/HelperFunctions.class"; import {ClickEvent} from '../openaireLibrary/utils/click/click-outside-or-esc.directive';
declare var UIkit; declare var UIkit;
@ -570,8 +570,14 @@ export class MonitorComponent implements OnInit, OnDestroy {
this.userManagementService.login(); this.userManagementService.login();
} }
toggleDescriptionOverlay(j) { toggleDescriptionOverlay(event, j) {
console.log(j); event.stopPropagation();
this.showDescriptionOverlay[j] = !this.showDescriptionOverlay[j]; this.showDescriptionOverlay[j] = !this.showDescriptionOverlay[j];
} }
closeDescriptionOverlay(event: ClickEvent,j) {
if(event.clicked && this.showDescriptionOverlay[j]) {
this.showDescriptionOverlay[j] = false;
}
}
} }

@ -1 +1 @@
Subproject commit d0dc3bd5e86b2864cf0019c041526d2632eb982c Subproject commit e6b2f41c8c858f860ed4bf48d7a31e5a04d7a088

@ -1 +1 @@
Subproject commit 84332ef82b15998e0d24f64f1ff1de97616cd735 Subproject commit fbbae0418315e06d6ce5a0d193fd08c8ea617b6b

@ -1 +1 @@
Subproject commit 79aafa3b70d8c0b21582fdb1b5dabbc7e6a825a2 Subproject commit b441da3afde53c70df14cbdfc1230de41a034bb1

View File

@ -18,7 +18,7 @@
padding: 0 !important; padding: 0 !important;
margin: 0 !important; margin: 0 !important;
position: relative !important; position: relative !important;
height: 0px !important; height: 0 !important;
} }
#page_content, #page_content,
.uk-navbar-center { .uk-navbar-center {
@ -32,4 +32,7 @@
.uk-hidden { .uk-hidden {
display:unset !important; display:unset !important;
} }
.uk-card .uk-button-text {
display: none !important;
}
} }