summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals/Modal.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-21 15:33:37 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:48:16 +0200
commit912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch)
tree49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/components/modals/Modal.js
parent791b5d1e443f97adc756264878c3aae41ca0f748 (diff)
Add first plotting attempts for portfolios
Diffstat (limited to 'frontend/src/components/modals/Modal.js')
-rw-r--r--frontend/src/components/modals/Modal.js20
1 files changed, 5 insertions, 15 deletions
diff --git a/frontend/src/components/modals/Modal.js b/frontend/src/components/modals/Modal.js
index dd8cea8e..40656dc1 100644
--- a/frontend/src/components/modals/Modal.js
+++ b/frontend/src/components/modals/Modal.js
@@ -33,18 +33,15 @@ class Modal extends React.Component {
// Trigger auto-focus
jQuery('#' + this.id)
- .on('shown.bs.modal', function() {
- jQuery(this)
- .find('input')
- .first()
- .focus()
+ .on('shown.bs.modal', function () {
+ jQuery(this).find('input').first().focus()
})
.on('hide.bs.modal', () => {
if (this.visible) {
this.props.onCancel()
}
})
- .on('keydown', e => {
+ .on('keydown', (e) => {
e.stopPropagation()
})
}
@@ -106,19 +103,12 @@ class Modal extends React.Component {
</div>
<div className="modal-body">{this.props.children}</div>
<div className="modal-footer">
- <button
- type="button"
- className="btn btn-secondary"
- onClick={this.onCancel.bind(this)}
- >
+ <button type="button" className="btn btn-secondary" onClick={this.onCancel.bind(this)}>
Close
</button>
<button
type="button"
- className={classNames(
- 'btn',
- 'btn-' + this.props.submitButtonType,
- )}
+ className={classNames('btn', 'btn-' + this.props.submitButtonType)}
onClick={this.onSubmit.bind(this)}
>
{this.props.submitButtonText}