summaryrefslogtreecommitdiff
path: root/frontend/app/views/tile/components/tile.form.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-20 18:03:31 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-20 18:03:31 +0100
commitd9ee2c97882ea5ace9c28ac6560ffa240daf9345 (patch)
treed4d2464597d50f245a3240d8d26f451eeb89e4f0 /frontend/app/views/tile/components/tile.form.js
parentd621365d3632b294c2c47f424786415c01c4cdf5 (diff)
toggle side of sidebar. popup form. wait to appear form.
Diffstat (limited to 'frontend/app/views/tile/components/tile.form.js')
-rw-r--r--frontend/app/views/tile/components/tile.form.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/frontend/app/views/tile/components/tile.form.js b/frontend/app/views/tile/components/tile.form.js
index 7d0780d..728bc05 100644
--- a/frontend/app/views/tile/components/tile.form.js
+++ b/frontend/app/views/tile/components/tile.form.js
@@ -13,7 +13,8 @@ import {
import AudioSelect from 'app/views/audio/components/audio.select'
import { preloadImage, preloadVideo } from 'app/utils'
-import * as tileActions from '../../tile/tile.actions'
+import * as pageActions from 'app/views/page/page.actions'
+import * as tileActions from 'app/views/tile/tile.actions'
const SELECT_TYPES = [
"image", "text", "video", "link", "script",
@@ -66,13 +67,13 @@ const CURSORS = [
const NO_LINK = 0
const EXTERNAL_LINK = -1
const OPEN_POPUP_LINK = -2
-const CLOSE_POPUP_LINK = -2
+const CLOSE_POPUP_LINK = -3
const PAGE_LIST_TOP_OPTIONS = [
{ name: NO_LINK, label: 'No link' },
{ name: EXTERNAL_LINK, label: 'External link' },
{ name: OPEN_POPUP_LINK, label: 'Open popup' },
{ name: CLOSE_POPUP_LINK, label: 'Close popup' },
- { name: -3, label: '──────────', disabled: true },
+ { name: -99, label: '──────────', disabled: true },
]
// target_page_id = Column(Integer, ForeignKey('page.id'), nullable=True)
@@ -410,6 +411,9 @@ class TileForm extends Component {
return (
<div className='box'>
<h1>{title}</h1>
+ <button className='box_corner' onClick={this.props.pageActions.toggleSidebarSide}>
+ {'◁'}
+ </button>
<form onSubmit={this.handleSubmit}>
<div className="row selects">
<Select
@@ -802,7 +806,7 @@ class TileForm extends Component {
return (
<div>
<Checkbox
- label="Add audio events"
+ label="Sound effects"
name="has_audio"
checked={temporaryTile.settings.has_audio}
onChange={this.handleSettingsSelect}
@@ -880,7 +884,6 @@ class TileForm extends Component {
title="Popup group"
name="popup_group"
data={temporaryTile.settings}
- error={errorFields.has('popup_group')}
onChange={this.handleSettingsChange}
autoComplete="off"
/>
@@ -897,7 +900,6 @@ class TileForm extends Component {
title="Appear after"
name="appear_after"
data={temporaryTile.settings}
- error={errorFields.has('appear_after')}
onChange={this.handleSettingsChange}
autoComplete="off"
/>
@@ -915,6 +917,7 @@ const mapStateToProps = state => ({
})
const mapDispatchToProps = dispatch => ({
+ pageActions: bindActionCreators({ ...pageActions }, dispatch),
tileActions: bindActionCreators({ ...tileActions }, dispatch),
})