[Monitor Dashboard | Trunk]: Fix pills, card css. Finish topic-category-sub modal

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59720 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2020-10-29 16:36:19 +00:00
parent f138f42f38
commit b50836f18d
7 changed files with 127 additions and 132 deletions

View File

@ -58,12 +58,12 @@ import {UtilitiesService} from "../../openaireLibrary/services/utilities.service
<img class="uk-position-center" [src]="photo">
</div>
<div class="uk-margin-left">
<button (click)="remove()" class="uk-button-secondary outlined uk-icon-button small">
<button (click)="remove()" class="uk-button-secondary outlined uk-icon-button">
<icon name="remove"></icon>
</button>
</div>
<div class="uk-margin-small-left">
<button class="uk-button-secondary uk-icon-button small" (click)="file.click()">
<button class="uk-button-secondary uk-icon-button" (click)="file.click()">
<icon name="edit"></icon>
</button>
</div>

View File

@ -65,7 +65,7 @@
(click)="$event.stopPropagation();$event.preventDefault()"></i>
<div #element uk-dropdown="mode: click; pos: bottom-right; delay-hide: 0; flip: false">
<ul class="uk-nav uk-dropdown-nav">
<li><a (click)="$event.stopPropagation();editStakeholder(stakeholder, true);hide(element);$event.preventDefault()">Edit</a>
<li><a (click)="$event.stopPropagation();editStakeholder(stakeholder, !stakeholder.defaultId);hide(element);$event.preventDefault()">Edit</a>
</li>
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
<li *ngIf="stakeholder.visibility != v.value"><a (click)="changeStakeholderStatus(stakeholder, v.value);

View File

@ -1,85 +1,86 @@
<aside id="sidebar_main">
<div id="sidebar_content">
<!--<div *ngIf="stakeholder" class="sidebar_main_header uk-margin-remove-bottom uk-text-center">
<img *ngIf="properties.environment =='beta' || properties.environment =='development'" class="badge"
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
[alt]="properties.environment">
<div class="uk-position-relative uk-margin-small-top">
&lt;!&ndash; <div *ngIf="!stakeholder.defaultId" class="uk-badge default">Default</div>&ndash;&gt;
&lt;!&ndash; <img class="logo" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">&ndash;&gt;
&lt;!&ndash; <div class="uk-margin-top" *ngIf="!stakeholder.logoUrl" >{{stakeholder.name}}</div>&ndash;&gt;
<a [href]="properties.domain + properties.baseLink"><div class="portalLogo logo" ></div></a>
</div>
</div>-->
<div *ngIf="stakeholder && stakeholder.topics[topicIndex]" class="menu_section uk-margin-top">
<div class="uk-text-center">
<a [routerLink]="'/admin/' + stakeholder.alias" class="uk-h5 uk-link-heading">
<span class="" uk-icon="icon:close;ratio:1.8"></span>
<span class="uk-margin-left">Indicators</span>
</a>
</div>
<ul class="uk-list">
<li class="submenu_trigger">
<li class="submenu_trigger">
<ul class="uk-nav-default">
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
<li
[title]="topic.name+': '+(topic.isActive?'Active':'Inactive')+', '+(topic.isPublic?'Public':'Private')"
class="uk-margin-top uk-margin-small-right uk-visible-toggle"
[class.uk-active]="topicIndex == i"
[class.uk-text-bold]="topicIndex == i">
<a [routerLink]="'/admin/'+stakeholder.alias + '/indicators/' + topic.alias" class="uk-flex">
<!--<div *ngIf="stakeholder" class="sidebar_main_header uk-margin-remove-bottom uk-text-center">
<img *ngIf="properties.environment =='beta' || properties.environment =='development'" class="badge"
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
[alt]="properties.environment">
<div class="uk-position-relative uk-margin-small-top">
&lt;!&ndash; <div *ngIf="!stakeholder.defaultId" class="uk-badge default">Default</div>&ndash;&gt;
&lt;!&ndash; <img class="logo" *ngIf="stakeholder.logoUrl" [src]="stakeholder.logoUrl">&ndash;&gt;
&lt;!&ndash; <div class="uk-margin-top" *ngIf="!stakeholder.logoUrl" >{{stakeholder.name}}</div>&ndash;&gt;
<a [href]="properties.domain + properties.baseLink"><div class="portalLogo logo" ></div></a>
</div>
</div>-->
<div *ngIf="stakeholder && stakeholder.topics[topicIndex]" class="menu_section uk-margin-top">
<div class="uk-text-center">
<a [routerLink]="'/admin/' + stakeholder.alias" class="uk-h5 uk-link-heading">
<span class="" uk-icon="icon:close;ratio:1.8"></span>
<span class="uk-margin-left">Indicators</span>
</a>
</div>
<ul class="uk-list">
<li class="submenu_trigger">
<li class="submenu_trigger">
<ul class="uk-nav-default">
<ng-template ngFor [ngForOf]="stakeholder.topics" let-topic let-i="index">
<li
[title]="topic.name+': '+(topic.isActive?'Active':'Inactive')+', '+(topic.isPublic?'Public':'Private')"
class="uk-margin-top uk-margin-small-right uk-visible-toggle"
[class.uk-active]="topicIndex == i"
[class.uk-text-bold]="topicIndex == i">
<a [routerLink]="'/admin/'+stakeholder.alias + '/indicators/' + topic.alias" class="uk-flex">
<span *ngIf="topic.icon" class="menu_icon">
<!-- <span [innerHTML]="satinizeHTML(topic.icon)"></span>-->
</span>
<div class="menu_title uk-width-expand uk-text-center">
<ng-container *ngTemplateOutlet="visibilityOptions; context:
<div class="menu_title uk-width-expand uk-text-center">
<ng-container *ngTemplateOutlet="visibilityOptions; context:
{i:i, type: 'topic',
visibility: stakeholder.topics[i].visibility}"></ng-container>
{{topic.name}}
</div>
<div class="uk-invisible-hover" (click)="$event.stopPropagation();$event.preventDefault()">
<i class=" onHover" uk-icon="more-vertical"></i>
<div #element uk-dropdown="mode: click; pos: bottom-right; offset: 5; delay-hide: 0; flip: false"
class="uk-padding-remove-horizontal">
<ul class="uk-nav uk-dropdown-nav uk-list">
<li><a (click)="editTopicOpen(i); hide(element)">Edit</a></li>
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
<li *ngIf="topic.visibility != v.value"><a (click)="toggleTopicStatus(i, v.value);
hide(element)">
{{'Make ' + v.label.toLowerCase()}}</a>
</li>
</ng-template>
<hr *ngIf="!topic.defaultId" class="uk-nav-divider">
<li *ngIf="!topic.defaultId"><a (click)="deleteTopicOpen(i, 'delete'); hide(element)">Delete</a>
<!-- <ng-container *ngIf="!stakeholder.defaultId">-->
<!-- <a (click)="deleteTopicOpen(i, 'delete'); hide(element)">Delete from all profiles</a>-->
<!-- <a (click)="deleteTopicOpen(i, 'disconnect'); hide(element)">Delete and disconnect from all profiles</a>-->
<!-- </ng-container>-->
</li>
</ul>
{{topic.name}}
</div>
</div>
</a>
</li>
</ng-template>
<li class="uk-text-center uk-margin-top uk-visible-toggle">
<span (click)="editTopicOpen(-1); $event.preventDefault()">
<div class="uk-invisible-hover" (click)="$event.stopPropagation();$event.preventDefault()">
<i class=" onHover" uk-icon="more-vertical"></i>
<div #element uk-dropdown="mode: click; pos: bottom-right; offset: 5; delay-hide: 0; flip: false"
class="uk-padding-remove-horizontal">
<ul class="uk-nav uk-dropdown-nav uk-list">
<li><a (click)="editTopicOpen(i); hide(element)">Edit</a></li>
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
<li *ngIf="topic.visibility != v.value"><a (click)="toggleTopicStatus(i, v.value);
hide(element)">
{{'Make ' + v.label.toLowerCase()}}</a>
</li>
</ng-template>
<hr *ngIf="!topic.defaultId" class="uk-nav-divider">
<li *ngIf="!topic.defaultId"><a (click)="deleteTopicOpen(i, 'delete'); hide(element)">Delete</a>
<!-- <ng-container *ngIf="!stakeholder.defaultId">-->
<!-- <a (click)="deleteTopicOpen(i, 'delete'); hide(element)">Delete from all profiles</a>-->
<!-- <a (click)="deleteTopicOpen(i, 'disconnect'); hide(element)">Delete and disconnect from all profiles</a>-->
<!-- </ng-container>-->
</li>
</ul>
</div>
</div>
</a>
</li>
</ng-template>
<li class="uk-text-center uk-margin-top uk-visible-toggle">
<span (click)="editTopicOpen(-1); $event.preventDefault()">
<!-- <span class="menu_icon"><i class="material-icons">add</i></span>-->
<span
class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i uk-icon="icon:plus; ratio:0.7"></i></span>
class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i
uk-icon="icon:plus; ratio:0.7"></i></span>
<span class="uk-hidden-hover"> Create new topic</span>
</span>
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div *ngIf="!isSmallScreen" id="sidebar_switcher_toggle" class="clickable "
(click)="toggleOpen($event)" >
<span class="uk-position-center" *ngIf="!open" uk-icon="icon:chevron-right; ratio: 1.5" ></span>
<span class="uk-position-center" *ngIf="open" uk-icon="icon: chevron-left; ratio:1.5"></span>
(click)="toggleOpen($event)">
<span class="uk-position-center" *ngIf="!open" uk-icon="icon:chevron-right; ratio: 1.5"></span>
<span class="uk-position-center" *ngIf="open" uk-icon="icon: chevron-left; ratio:1.5"></span>
</div>
</aside>
<div id="page_content">
@ -94,7 +95,7 @@
<ng-template ngFor [ngForOf]="stakeholder.topics[topicIndex].categories" let-category let-i="index">
<li class="uk-visible-toggle"
[class.uk-active]="category.alias === stakeholder.topics[topicIndex].categories[categoryIndex].alias">
<a (click)="toggleCategory(i)"
<a (click)="toggleCategory(i)"
class="uk-margin-remove-bottom uk-h4"
>
<ng-container *ngTemplateOutlet="visibilityOptions; context:
@ -102,7 +103,7 @@
visibility: stakeholder.topics[topicIndex].categories[i].visibility}"></ng-container>
<span class="title"> {{category.name}}</span>
<span class="uk-invisible-hover"
(click)="$event.stopPropagation();$event.preventDefault()">
(click)="$event.stopPropagation();$event.preventDefault()">
<i class=" onHover" uk-icon="more-vertical"></i>
<div #element uk-dropdown="mode: click; pos: bottom-right; offset: 5; delay-hide: 0; flip: false"
class="uk-padding-remove-horizontal">
@ -111,12 +112,12 @@
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
<li *ngIf="category.visibility != v.value"><a (click)="toggleCategoryStatus(i, v.value);
hide(element)">
{{'Make ' + v.label.toLowerCase()}}</a>
{{'Make ' + v.label.toLowerCase()}}</a>
</li>
</ng-template>
<hr *ngIf="!stakeholder.topics[topicIndex].categories[i].defaultId" class="uk-nav-divider">
<hr *ngIf="!stakeholder.topics[topicIndex].categories[i].defaultId" class="uk-nav-divider">
<li *ngIf="!stakeholder.topics[topicIndex].categories[i].defaultId"><a
(click)="deleteCategoryOpen(i, 'delete'); hide(element)">Delete</a>
(click)="deleteCategoryOpen(i, 'delete'); hide(element)">Delete</a>
</li>
</ul>
</div>
@ -126,7 +127,8 @@
</ng-template>
<li>
<span href="#" (click)="editCategoryOpen();$event.preventDefault()" class="uk-visible-toggle clickable">
<span class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i uk-icon="icon:plus; ratio:0.7"></i></span>
<span class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i
uk-icon="icon:plus; ratio:0.7"></i></span>
<span class="uk-hidden-hover uk-te"> Create new category</span>
</span>
</li>
@ -136,10 +138,12 @@
<ul *ngIf=" stakeholder.topics[topicIndex].categories[categoryIndex] &&
stakeholder.topics[topicIndex].categories[categoryIndex].subCategories.length > 0"
class="uk-subnav uk-subnav-pill subCategoriesTabs admin">
<ng-template ngFor [ngForOf]="stakeholder.topics[topicIndex].categories[categoryIndex].subCategories" let-subCategory let-i="index">
<ng-template ngFor [ngForOf]="stakeholder.topics[topicIndex].categories[categoryIndex].subCategories"
let-subCategory let-i="index">
<li
[class.uk-active]="(subCategory.alias ===
stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[subCategoryIndex].alias)" class=" uk-visible-toggle uk-flex uk-flex-middle">
stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[subCategoryIndex].alias)"
class=" uk-visible-toggle uk-flex uk-flex-middle">
<ng-container *ngTemplateOutlet="visibilityOptions; context:
{i:i, type: 'sub',
visibility: stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[i].visibility}"></ng-container>
@ -158,13 +162,13 @@
<ng-template ngFor [ngForOf]="stakeholderUtils.visibility" let-v>
<li *ngIf="subCategory.visibility != v.value"><a (click)="toggleSubcategoryStatus(i, v.value);
hide(element)">
{{'Make ' + v.label.toLowerCase()}}</a>
{{'Make ' + v.label.toLowerCase()}}</a>
</li>
</ng-template>
<hr *ngIf="!stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[i].defaultId"
class="uk-nav-divider">
<li *ngIf="!stakeholder.topics[topicIndex].categories[categoryIndex].subCategories[i].defaultId"><a
(click)="deleteSubcategoryOpen(i, 'delete'); hide(element)">Delete</a>
(click)="deleteSubcategoryOpen(i, 'delete'); hide(element)">Delete</a>
</li>
</ul>
@ -175,7 +179,8 @@
<li>
<span href="#" (click)="editSubCategoryOpen();$event.preventDefault()"
class="uk-padding-remove uk-visible-toggle clickable">
<span class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i uk-icon="icon:plus; ratio:0.7"></i></span>
<span class="menu_icon uk-icon-button portal-icon-button icon-button-small"><i
uk-icon="icon:plus; ratio:0.7"></i></span>
<span class="uk-hidden-hover"> Create new sub category</span>
</span>
</li>
@ -184,10 +189,10 @@
</div>
</div>
<div id="page_content_inner" style="margin-top: 40px;">
<indicators *ngIf="stakeholder" [properties]="properties"
<indicators *ngIf="stakeholder" [properties]="properties"
[topicIndex]="topicIndex"
[categoryIndex]="categoryIndex"
[subcategoryIndex]="subCategoryIndex"></indicators>
[subcategoryIndex]="subCategoryIndex"></indicators>
</div>
</div>
<modal-alert #deleteModal (alertOutput)="deleteElement()">
@ -198,38 +203,40 @@
Are you sure you want to proceed?
</modal-alert>
<modal-alert #editModal (alertOutput)="saveElement()">
<div *ngIf="form" class="uk-padding-small" [formGroup]="form">
<div dashboard-input class="uk-form-row" [formInput]="form.get('name')" label="Title"></div>
<div dashboard-input class="uk-form-row" [formInput]="form.get('description')"
<modal-alert #editModal (alertOutput)="saveElement()" [okDisabled]="form && (form.invalid || form.pristine)">
<div *ngIf="form" class="uk-grid uk-padding uk-padding-remove-horizontal uk-child-width-1-1" [formGroup]="form"
uk-grid>
<div dashboard-input [formInput]="form.get('name')" label="Title"></div>
<div dashboard-input [formInput]="form.get('description')"
label="Description" type="textarea">
</div>
<div *ngIf="form.get('icon')" dashboard-input class="uk-form-row" [formInput]="form.get('icon')"
<div *ngIf="form.get('icon')" dashboard-input [formInput]="form.get('icon')"
label="Icon(SVG)" type="textarea">
</div>
<div class="uk-form-row uk-flex uk-flex-middle">
<div dashboard-input class="uk-width-small" [formInput]="form.get('visibility')"
label="Visibility" [options]="stakeholderUtils.visibility" type="select">
</div>
<div dashboard-input [formInput]="form.get('visibility')"
label="Status" [options]="stakeholderUtils.visibility" type="select">
</div>
</div>
</modal-alert>
<ng-template #visibilityOptions let-type="type" let-i="i" let-visibility="visibility" >
<span class="uk-invisible-hover uk-padding-remove" (click)="$event.stopPropagation();$event.preventDefault()">
<i [attr.uk-icon]="stakeholderUtils.isPublicIcon.get(visibility)" class="clickable visibilityMenuIcon"></i>
<ng-template #visibilityOptions let-type="type" let-i="i" let-visibility="visibility">
<span class="uk-invisible-hover uk-padding-remove" (click)="$event.stopPropagation();$event.preventDefault()">
<i [attr.uk-icon]="stakeholderUtils.isPublicIcon.get(visibility)"
class="clickable visibilityMenuIcon"></i>
<div #element uk-dropdown="mode: click; pos: bottom-left; delay-hide: 0; flip: false">
<ul class="uk-nav uk-dropdown-nav">
<li *ngFor="let v of stakeholderUtils.visibility" [class.selectedVisibility]="v.value == visibility">
<li *ngFor="let v of stakeholderUtils.visibility"
[class.selectedVisibility]="v.value == visibility">
<a
*ngIf="visibility != v.value"
(click)="$event.stopPropagation();toggleStatusByIndex(i, v.value, type);hide(element);$event.preventDefault()">
*ngIf="visibility != v.value"
(click)="$event.stopPropagation();toggleStatusByIndex(i, v.value, type);hide(element);$event.preventDefault()">
<i [attr.uk-icon]="stakeholderUtils.isPublicIcon.get( v.value)"></i> {{v.label}}</a>
<a *ngIf="visibility == v.value">
<i [attr.uk-icon]="stakeholderUtils.isPublicIcon.get( v.value)"></i> {{v.label}} <icon
customClass="uk-text-secondary uk-float-right" [ratio]="0.5"
name="bullet"></icon></a>
<i [attr.uk-icon]="stakeholderUtils.isPublicIcon.get( v.value)"></i> {{v.label}}
<icon
customClass="uk-text-secondary uk-float-right" [ratio]="0.5"
name="bullet"></icon></a>
</li>
</ul>
</div>

View File

@ -4,15 +4,20 @@
box-shadow: 0 3px 6px #0000001A;
}
.uk-card.uk-card-default:not([class*="uk-padding"]) {
.uk-card-body {
padding: 19px 25px;
}
.uk-card .uk-grid.uk-grid-divider>:not(.uk-first-column)::before {
.uk-card .uk-grid-divider>:not(.uk-first-column)::before {
border-left: 1px solid currentColor;
opacity: 0.2;
}
.uk-card .uk-grid-divider.uk-grid-stack>.uk-grid-margin::before {
border-top: 1px solid currentColor;
opacity: 0.2;
}
.uk-card .uk-button.action {
background: #FFFFFF;
box-shadow: 0 3px 6px #00000029;

View File

@ -1,4 +1,9 @@
.uk-subnav-pill>*>a:first-child {
.uk-subnav-pill, .uk-tab {
flex-wrap: nowrap;
overflow-x: auto;
}
.uk-subnav-pill > * > a, .uk-subnav>*>a:first-child {
color: currentColor !important;
font-size: 13px;
text-transform: none;
@ -9,7 +14,10 @@
line-height: 18px;
}
.uk-subnav-pill > li> a:hover {
.uk-subnav-pill > li > a:hover {
border-color: var(--secondary-color);
color: var(--secondary-color) !important;
background-color: var(--contrast-color);
opacity: 1;
}

View File

@ -160,15 +160,6 @@ bottom a:not(.license), bottom a > :not(svg) {
.stakeholderPage:not(.sidebar_mini) #sidebar_main .menu_section > ul > li.current_section > a .menu_title {
display: inline !important;
}
.uk-subnav-pill.subCategoriesTabs > li > a{
border: 1px solid #1a1a1a;
color: #1a1a1a;
border-radius: 40px;
background-color: transparent;
opacity: 0.5 ;
padding: 5px 10px;
}
.uk-subnav-pill.subCategoriesTabs > li.uk-active > a{
color: white;

View File

@ -147,25 +147,9 @@
font-size: 13px;
text-transform: capitalize;
}
.customTabs > li.uk-active a, .subCategoriesTabs > li.uk-active a{
.customTabs > li.uk-active a {
font-weight:bold;
}
.uk-subnav-pill.subCategoriesTabs > li > a{
border: 1px solid #1a1a1a;
color: #1a1a1a;
border-radius: 40px;
background-color: transparent;
opacity: 0.5 ;
padding: 5px 10px;
}
.uk-subnav-pill.subCategoriesTabs > li.uk-active > a{
color: white;
border: 1px solid var(--secondary-color);
background-color: var(--secondary-color);
opacity: 1 ;
}
.uk-tab.customTabs::before {
border-bottom: none !important;