Skip to content

Commit

Permalink
Allow charts to be full width
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Jan 31, 2020
1 parent 9693605 commit 112eded
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
21 changes: 21 additions & 0 deletions src/ChartBlock/ChartEditSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { Segment } from 'semantic-ui-react'; // , Dropdown
import { Field, SidebarPortal, TextWidget } from '@plone/volto/components';
import { Button } from 'semantic-ui-react';
import PickProvider from 'volto-datablocks/PickProvider';
import { AlignBlock } from '@plone/volto/helpers';
import { Form, Grid } from 'semantic-ui-react';

const ChartEditSidebar = ({ onChangeBlock, block, data }) => (
<SidebarPortal selected={true}>
Expand Down Expand Up @@ -45,6 +47,25 @@ const ChartEditSidebar = ({ onChangeBlock, block, data }) => (
})
}
/>
<Form.Field inline required={false}>
<Grid>
<Grid.Row>
<Grid.Column width="4">
<div className="wrapper">
<label htmlFor="field-align">Alignment</label>
</div>
</Grid.Column>
<Grid.Column width="8" className="align-tools">
<AlignBlock
align={data.align}
onChangeBlock={onChangeBlock}
data={data}
block={block}
/>
</Grid.Column>
</Grid.Row>
</Grid>
</Form.Field>
<Field
title="Source"
id="chart-source"
Expand Down
17 changes: 0 additions & 17 deletions src/PickVisualization/PickVisualization.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,3 @@ export default connect(
},
{ searchContent, getContent },
)(PickVisualization);

// visualizations,
// this.searchVisualizations();
// let visualizations = state.search
// ? state.search.subrequests?.[props.id]?.items || []
// : [];
// visualizations = visualizations.map(el => [el['@id'], el.title]);
// searchVisualizations = () => {
// this.props.searchContent(
// '',
// {
// // object_provides: 'forests.content.interfaces.IDataVisualization',
// portal_type: 'visualization',
// },
// this.props.id,
// );
// };

0 comments on commit 112eded

Please sign in to comment.