[DE] added document settings controller
This commit is contained in:
parent
a77aa2fc91
commit
1dab10f1e7
|
@ -0,0 +1,24 @@
|
|||
|
||||
import React, {Component} from 'react';
|
||||
import DocumentSettings from '../document-settings/DocumentSettings'
|
||||
|
||||
|
||||
class DocumentSettingsController extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
console.log('controller created');
|
||||
}
|
||||
|
||||
onPageOrientation(value){
|
||||
console.log(`changed page orientation: ${value}`);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<DocumentSettings onPageOrientation={this.onPageOrientation} />
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default DocumentSettingsController;
|
|
@ -28,8 +28,8 @@ export default class DocumentSettings extends Component {
|
|||
<Navbar title={textDocumentSettings} backLink={textBack} />
|
||||
<BlockTitle>{textOrientation}</BlockTitle>
|
||||
<List>
|
||||
<ListItem checkbox title={textPortrait} name="orientation-checkbox" defaultChecked></ListItem>
|
||||
<ListItem checkbox title={textLandscape} name="orientation-checkbox"></ListItem>
|
||||
<ListItem radio title={textPortrait} name="orientation-checkbox" defaultChecked onChange={e => this.props.onPageOrientation('portrait')}></ListItem>
|
||||
<ListItem radio title={textLandscape} name="orientation-checkbox" onChange={e => this.props.onPageOrientation('landscape')}></ListItem>
|
||||
</List>
|
||||
<BlockTitle>{textFormat}</BlockTitle>
|
||||
<List mediaList>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
|
||||
import HomePage from '../pages/home.jsx';
|
||||
import DocumentSettings from "../components/settings/document-settings/DocumentSettings.jsx";
|
||||
// import DocumentSettings from "../components/settings/document-settings/DocumentSettings.jsx";
|
||||
import Margins from "../components/settings/document-settings/Margins.jsx";
|
||||
import DocumentFormats from "../components/settings/document-settings/DocumentFormats.jsx";
|
||||
import DocumentSettingsController from "../components/settings/controller/DocumentSettings.jsx";
|
||||
|
||||
import LeftPage1 from '../pages/left-page-1.jsx';
|
||||
import LeftPage2 from '../pages/left-page-2.jsx';
|
||||
|
@ -18,7 +19,7 @@ var routes = [
|
|||
},
|
||||
{
|
||||
path: '/document-settings/',
|
||||
component: DocumentSettings,
|
||||
component: DocumentSettingsController,
|
||||
},
|
||||
{
|
||||
path: '/users/',
|
||||
|
|
Loading…
Reference in a new issue