Skip to content
Snippets Groups Projects
Select Git revision
  • cb99fadebc096c78a7a811bbab41b3ae056e3a5d
  • mui5-annotation-on-video-stable default
  • get_setter_canvasSizeInformations
  • fix-error-div-into-p
  • annotation-on-video-v2
  • detached
  • annotation-on-video-r17
  • mui5
  • mui5-react-18
  • jacob-test
  • annotation-on-video protected
  • master
  • test-antoinev1
  • 20-fetch-thumbnail-on-annotation
  • add-research-field
  • Save
  • add-plugin
  • 14-wip-no-seek-to
  • 14-bug-on-video-time-control
  • 9_wip_videotests
  • _upgrade_material_ui
  • latest-tetras-16
  • v3.3.0
  • v3.2.0
  • v3.1.1
  • v3.1.0
  • v3.0.0
  • v3.0.0-rc.7
  • v3.0.0-rc.6
  • v3.0.0-rc.5
  • v3.0.0-rc.4
  • v3.0.0-rc.3
  • v3.0.0-rc.2
  • v3.0.0-rc.1
  • v3.0.0-beta.10
  • v3.0.0-beta.9
  • v3.0.0-beta.8
  • v3.0.0-beta.7
  • v3.0.0-beta.6
  • v3.0.0-beta.5
  • v3.0.0-beta.3
41 results

window.js

Blame
  • SelectCollection.js 1.60 KiB
    import { Component } from 'react';
    import PropTypes from 'prop-types';
    import Button from '@material-ui/core/Button';
    import Grid from '@material-ui/core/Grid';
    import Typography from '@material-ui/core/Typography';
    import ListSharpIcon from '@material-ui/icons/ListSharp';
    
    /**
     *
     */
    export class SelectCollection extends Component {
      /** */
      constructor(props) {
        super(props);
    
        this.openCollectionDialog = this.openCollectionDialog.bind(this);
      }
    
      /** */
      openCollectionDialog() {
        const {
          collectionPath, manifestId, showCollectionDialog, windowId,
        } = this.props;
        showCollectionDialog(manifestId, collectionPath.slice(0, -1), windowId);
      }
    
      /** */
      render() {
        const {
          t,
        } = this.props;
        return (
          <Grid container justifyContent="center" alignItems="center">
            <Grid container direction="column" alignItems="center">
              <Typography variant="h4" paragraph>
                <em>
                  {t('noItemSelected')}
                </em>
              </Typography>
              <Button
                color="primary"
                variant="contained"
                onClick={this.openCollectionDialog}
                startIcon={<ListSharpIcon />}
              >
                {t('showCollection')}
              </Button>
            </Grid>
          </Grid>
        );
      }
    }
    
    SelectCollection.propTypes = {
      collectionPath: PropTypes.arrayOf(PropTypes.string),
      manifestId: PropTypes.string,
      showCollectionDialog: PropTypes.func.isRequired,
      t: PropTypes.func,
      windowId: PropTypes.string,
    };
    
    SelectCollection.defaultProps = {
      collectionPath: [],
      manifestId: null,
      t: () => {},
      windowId: null,
    };