Skip to content
Snippets Groups Projects
Commit afa0281b authored by Anthony's avatar Anthony
Browse files

WIP on accordion in a component

parent 2e19c18a
No related branches found
No related tags found
2 merge requests!13Manifest side to side,!11Draft: 33 8 open an other manifest side by side from an annotation
......@@ -30,6 +30,7 @@ export class CanvasAnnotations extends Component {
this.handleAnnotationHover = this.handleAnnotationHover.bind(this);
this.handleAnnotationBlur = this.handleAnnotationBlur.bind(this);
this.handleOpenManifestSideToSide = this.handleOpenManifestSideToSide.bind(this);
this.handleAccordion = this.handleAccordion.bind(this);
}
/**
......@@ -67,6 +68,10 @@ export class CanvasAnnotations extends Component {
addWindow({ manifestId });
}
handleAccordion() {
console.log("openAccordion");
}
/**
* Returns the rendered component
*/
......@@ -137,54 +142,11 @@ export class CanvasAnnotations extends Component {
))
}
</div>
</ListItemText>
</MenuItem>
{
(annotation.idIsManifest || annotation.manifestsInContent) && (
<div>
<Accordion>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
>
<Typography className={classes.heading}>Manifests found :</Typography>
</AccordionSummary>
<AccordionDetails>
<Typography>
{annotation.idIsManifest && (
<div className={classes.manifestOpeningWrapper}>
<div>{annotation.id}</div>
<MiradorMenuButton
aria-haspopup="true"
aria-label={t('openManifestInOtherWindow', { manifest: annotation.id })}
titleAccess={t('openManifestInOtherWindow', { manifest: annotation.id })}
onClick={(e) => { this.handleOpenManifestSideToSide(e, annotation.id); }}
className={classes.manifestOpeningButton}
>
<PlaylistAddIcon />
</MiradorMenuButton>
</div>
)}
{annotation.manifestsInContent && annotation.manifestsInContent.map(manifestId => (
<div className={classes.manifestOpeningWrapper}>
<div>{manifestId}</div>
<MiradorMenuButton
aria-haspopup="true"
aria-label={t('openManifestInOtherWindow')}
titleAccess={t('openManifestInOtherWindow')}
onClick={(e) => { this.handleOpenManifestSideToSide(e, manifestId); }}
className={classes.manifestOpeningButton}
>
<PlaylistAddIcon />
</MiradorMenuButton>
</div>
))}
</Typography>
</AccordionDetails>
</Accordion>
</div>
)
}
</ScrollTo>
))
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment