mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 14:02:48 +00:00
fix: replace breadcrumb popover with simply expanding the breadcrumbs
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -32,10 +32,6 @@ describe('assessments', function () {
|
|||||||
cy.visit('/assessments/detail/02f065a6-6c02-58ab-97d9-a3febdbc91a1?token=mock');
|
cy.visit('/assessments/detail/02f065a6-6c02-58ab-97d9-a3febdbc91a1?token=mock');
|
||||||
|
|
||||||
cy.get('.breadcrumb-collapsed').click();
|
cy.get('.breadcrumb-collapsed').click();
|
||||||
cy.get('ion-popover').within(() => {
|
cy.get('ion-breadcrumb').should('have.length', 3);
|
||||||
cy.get('ion-item').should('have.length', 3);
|
|
||||||
cy.get('ion-item').first().should('contain', 'Basismodule');
|
|
||||||
cy.get('ion-item').last().should('contain', 'Modellierung');
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -35,6 +35,8 @@ export class DataPathComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
@Input() autoRouting = true;
|
@Input() autoRouting = true;
|
||||||
|
|
||||||
|
@Input() maxItems = 2;
|
||||||
|
|
||||||
@Input() set item(item: SCThings) {
|
@Input() set item(item: SCThings) {
|
||||||
// eslint-disable-next-line unicorn/prefer-ternary
|
// eslint-disable-next-line unicorn/prefer-ternary
|
||||||
if (item.type === SCThingType.Catalog && item.superCatalogs) {
|
if (item.type === SCThingType.Catalog && item.superCatalogs) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2022 StApps
|
~ Copyright (C) 2023 StApps
|
||||||
~ This program is free software: you can redistribute it and/or modify it
|
~ This program is free software: you can redistribute it and/or modify it
|
||||||
~ under the terms of the GNU General Public License as published by the Free
|
~ under the terms of the GNU General Public License as published by the Free
|
||||||
~ Software Foundation, version 3.
|
~ Software Foundation, version 3.
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
color="light"
|
color="light"
|
||||||
[itemsBeforeCollapse]="1"
|
[itemsBeforeCollapse]="1"
|
||||||
[itemsAfterCollapse]="($width | async) >= 768 ? 1 : 0"
|
[itemsAfterCollapse]="($width | async) >= 768 ? 1 : 0"
|
||||||
[maxItems]="2"
|
[maxItems]="maxItems"
|
||||||
(ionCollapsedClick)="popover.present($event)"
|
(ionCollapsedClick)="maxItems = undefined"
|
||||||
>
|
>
|
||||||
<ion-breadcrumb *ngFor="let fragment of stack">
|
<ion-breadcrumb *ngFor="let fragment of stack">
|
||||||
<ion-label
|
<ion-label
|
||||||
@@ -38,16 +38,4 @@
|
|||||||
>
|
>
|
||||||
</ion-breadcrumb>
|
</ion-breadcrumb>
|
||||||
</ion-breadcrumbs>
|
</ion-breadcrumbs>
|
||||||
<ion-popover #popover>
|
|
||||||
<ng-template>
|
|
||||||
<ion-list>
|
|
||||||
<ion-item
|
|
||||||
button
|
|
||||||
*ngFor="let fragment of stack"
|
|
||||||
(click)="dataRoutingService.emitPathEvent(fragment); popover.dismiss()"
|
|
||||||
>{{ 'name' | thingTranslate: $any(fragment) }}</ion-item
|
|
||||||
>
|
|
||||||
</ion-list>
|
|
||||||
</ng-template>
|
|
||||||
</ion-popover>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*!
|
/*!
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.crumb-label {
|
.crumb-label {
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2022 StApps
|
* Copyright (C) 2023 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
* more details.
|
* more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {Component, Input} from '@angular/core';
|
import {Component, Input} from '@angular/core';
|
||||||
import {SCThingWithoutReferences} from '@openstapps/core';
|
import {SCThingWithoutReferences} from '@openstapps/core';
|
||||||
@@ -32,6 +32,8 @@ export class EventRoutePathComponent {
|
|||||||
|
|
||||||
@Input() itemsBeforeCollapse?: number;
|
@Input() itemsBeforeCollapse?: number;
|
||||||
|
|
||||||
|
@Input() showSelfInPopover = false;
|
||||||
|
|
||||||
@Input() items: Array<SCThingWithoutReferences | undefined> = [];
|
@Input() items: Array<SCThingWithoutReferences | undefined> = [];
|
||||||
|
|
||||||
@Input() more?: Observable<SCThingWithoutReferences[]>;
|
@Input() more?: Observable<SCThingWithoutReferences[]>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
~ Copyright (C) 2022 StApps
|
~ Copyright (C) 2023 StApps
|
||||||
~ This program is free software: you can redistribute it and/or modify it
|
~ This program is free software: you can redistribute it and/or modify it
|
||||||
~ under the terms of the GNU General Public License as published by the Free
|
~ under the terms of the GNU General Public License as published by the Free
|
||||||
~ Software Foundation, version 3.
|
~ Software Foundation, version 3.
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</ion-breadcrumbs>
|
</ion-breadcrumbs>
|
||||||
<ion-popover #popover>
|
<ion-popover #popover>
|
||||||
<ng-template>
|
<ng-template>
|
||||||
<ion-list>
|
<ion-list lines="none">
|
||||||
<ng-container *ngIf="moreAnchor === 'start' && more | async as more">
|
<ng-container *ngIf="moreAnchor === 'start' && more | async as more">
|
||||||
<ng-container
|
<ng-container
|
||||||
*ngFor="let item of more"
|
*ngFor="let item of more"
|
||||||
@@ -35,11 +35,13 @@
|
|||||||
[ngTemplateOutletContext]="{item}"
|
[ngTemplateOutletContext]="{item}"
|
||||||
></ng-container>
|
></ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container
|
<ng-container *ngIf="showSelfInPopover">
|
||||||
*ngFor="let item of items"
|
<ng-container
|
||||||
[ngTemplateOutlet]="popoverItem"
|
*ngFor="let item of items"
|
||||||
[ngTemplateOutletContext]="{item}"
|
[ngTemplateOutlet]="popoverItem"
|
||||||
></ng-container>
|
[ngTemplateOutletContext]="{item}"
|
||||||
|
></ng-container>
|
||||||
|
</ng-container>
|
||||||
<ng-container *ngIf="moreAnchor === 'end' && more | async as more">
|
<ng-container *ngIf="moreAnchor === 'end' && more | async as more">
|
||||||
<ng-container
|
<ng-container
|
||||||
*ngFor="let item of more"
|
*ngFor="let item of more"
|
||||||
|
|||||||
Reference in New Issue
Block a user