[Monitor Dashboard | Trunk]: Fix a bug with reordering and chart options.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@58952 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Konstantinos Triantafyllou 2020-06-17 10:37:04 +00:00
parent 145f1676ca
commit e70567e079
2 changed files with 6 additions and 5 deletions

View File

@ -262,15 +262,15 @@
<div #element uk-dropdown="mode: click; pos: bottom-right; delay-hide: 0; flip: false"
class="uk-padding-remove-horizontal">
<ul class="uk-nav uk-dropdown-nav">
<li *ngIf="editing"><a (click)="editChartIndicatorOpen(chart, indicator._id);hide(element)">Edit</a></li>
<li *ngIf="editing"><a (click)="toggleIndicatorStatus(chart._id, indicator);hide(element)">
<li *ngIf="!editing"><a (click)="editChartIndicatorOpen(chart, indicator._id);hide(element)">Edit</a></li>
<li *ngIf="!editing"><a (click)="toggleIndicatorStatus(chart._id, indicator);hide(element)">
{{indicator.isActive ? 'Inactive' : 'Active'}}</a>
</li>
<li *ngIf="editing"><a (click)="toggleIndicatorAccess(chart._id, indicator);hide(element)">
<li *ngIf="!editing"><a (click)="toggleIndicatorAccess(chart._id, indicator);hide(element)">
{{indicator.isPublic ? 'Private' : 'Public'}}</a>
</li>
<hr class="uk-nav-divider">
<li *ngIf="editing"><a (click)="deleteIndicatorOpen(chart, indicator._id);hide(element)">Delete</a></li>
<li *ngIf="!editing"><a (click)="deleteIndicatorOpen(chart, indicator._id);hide(element)">Delete</a></li>
</ul>
</div>
</div>

View File

@ -73,7 +73,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
* Toggles
*/
public grid: boolean = true;
private editing: boolean = false;
public editing: boolean = false;
/** Safe Urls*/
public safeUrls: Map<string, SafeResourceUrl> = new Map<string, SafeResourceUrl>([]);
@ -122,6 +122,7 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
if (this.canEdit) {
if (changes.topicIndex || changes.categoryIndex || changes.subcategoryIndex) {
this.buildFilters();
this.initReorder();
}
this.filterCharts();
this.filterNumbers();