Merge branch 'new-theme' of code-repo.d4science.org:MaDgIK/openaire-library into new-theme
This commit is contained in:
commit
8e09a2c68d
|
@ -66,7 +66,7 @@
|
|||
{{item.type == 'external' ? item.url : item.route}}
|
||||
</div>
|
||||
<div *ngIf="item.type == 'internal' && item.route && pageStatus != null && !pageStatus.get(item.route)" class="uk-text-small uk-text-warning uk-margin-small-top">
|
||||
This menu item is not visible because the page is disabled
|
||||
This menu item will not visible because the page is disabled
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-middle uk-flex-center">
|
||||
|
|
|
@ -374,7 +374,9 @@ export class MenuComponent implements OnInit {
|
|||
|
||||
public moveElement(index: number, newIndex: number, children: MenuItemExtended[] = []) {
|
||||
this.elements.init();
|
||||
this.subElements.init();
|
||||
if(children && children.length) {
|
||||
this.subElements.init();
|
||||
}
|
||||
if(this.selectedMenuType == 'customMenu') {
|
||||
let temp = HelperFunctions.copy(this.featuredMenuItems);
|
||||
HelperFunctions.swap(temp, index, newIndex);
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
</ng-container>
|
||||
<!-- Custom menu items -->
|
||||
<!-- TODO: Add to mobile menu as well! -->
|
||||
<ng-container *ngIf="additionalMenuItems?.length > 0 && properties.environment == 'development'">
|
||||
<ng-container *ngIf="isMenuEnabled && additionalMenuItems?.length > 0">
|
||||
<ng-container *ngFor="let menu of additionalMenuItems">
|
||||
<li class="uk-parent" [class.uk-active]="isTheActiveMenu(menu)">
|
||||
<!-- INTERNAL ROOT-->
|
||||
|
@ -235,8 +235,8 @@
|
|||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<!-- New navbar for featured menu items - test only -->
|
||||
<ng-container *ngIf="featuredMenuItems?.length > 0 && properties.environment == 'development'">
|
||||
<!-- New navbar for featured menu items only -->
|
||||
<ng-container *ngIf="isFeaturedMenuEnabled && featuredMenuItems?.length > 0">
|
||||
<div class="uk-background-primary uk-light">
|
||||
<div class="uk-container uk-container-expand">
|
||||
<div class="uk-navbar" uk-navbar>
|
||||
|
|
|
@ -56,6 +56,8 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
|
||||
public additionalMenuItems: MenuItem[] = [];
|
||||
public featuredMenuItems: MenuItem[] = [];
|
||||
public isMenuEnabled: boolean = false;
|
||||
public isFeaturedMenuEnabled: boolean = false;
|
||||
|
||||
constructor(private router: Router,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -119,6 +121,8 @@ export class NavigationBarComponent implements OnInit, OnDestroy {
|
|||
this.subs.push(
|
||||
this._helpContentService.getMenuItems(this.portal).subscribe(
|
||||
data => {
|
||||
this.isMenuEnabled = data.isMenuEnabled;
|
||||
this.isFeaturedMenuEnabled = data.isFeaturedMenuEnabled;
|
||||
this.featuredMenuItems = data.featuredMenuItems;
|
||||
this.additionalMenuItems = data.menuItems;
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue