diff --git a/client/src/app-components/are-you-sure.js b/client/src/app-components/are-you-sure.js index df76ee79..a1502c09 100644 --- a/client/src/app-components/are-you-sure.js +++ b/client/src/app-components/are-you-sure.js @@ -13,23 +13,27 @@ class AreYouSure extends React.Component { closeModal: React.PropTypes.func }; + componentDidMount() { + this.refs.yesButton && this.refs.yesButton.focus(); + } + render() { return ( -
-
+
+
{i18n('ARE_YOU_SURE')}
-
+
{this.props.description}
-
-
diff --git a/client/src/app/App.js b/client/src/app/App.js index e35a0be7..00f2efdf 100644 --- a/client/src/app/App.js +++ b/client/src/app/App.js @@ -1,5 +1,6 @@ import React from 'react'; import _ from 'lodash'; +import classNames from 'classnames'; import { connect } from 'react-redux' import { browserHistory } from 'react-router'; @@ -21,13 +22,24 @@ class App extends React.Component { render() { return ( -
- {React.cloneElement(this.props.children, {})} +
+
+ {React.cloneElement(this.props.children, {})} +
); } + getClass() { + let classes = { + 'application': true, + 'application_modal-opened': (this.props.modal.opened) + }; + + return classNames(classes); + } + redirectIfPathIsNotValid(props) { const validations = { languageChanged: props.config.language !== this.props.config.language, diff --git a/client/src/app/app.scss b/client/src/app/app.scss new file mode 100644 index 00000000..feccbaf6 --- /dev/null +++ b/client/src/app/app.scss @@ -0,0 +1,12 @@ +@import "../scss/vars"; + +.application { + padding: $half-space; + + &_modal-opened { + .application__content { + position: fixed; + overflow: hidden; + } + } +} \ No newline at end of file diff --git a/client/src/app/demo/components-demo-page.js b/client/src/app/demo/components-demo-page.js index 874edabb..04473348 100644 --- a/client/src/app/demo/components-demo-page.js +++ b/client/src/app/demo/components-demo-page.js @@ -3,9 +3,7 @@ const React = require('react'); const DocumentTitle = require('react-document-title'); -const ModalActions = require('actions/modal-actions'); -const store = require('app/store'); - +const ModalContainer = require('app/modal-container'); const AreYouSure = require('app-components/are-you-sure'); const Button = require('core-components/button'); @@ -96,10 +94,8 @@ let DemoPage = React.createClass({ title: 'ModalTrigger', render: (