summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-08-18 16:31:08 +0200
committerJules Laplace <julescarbon@gmail.com>2020-08-18 16:31:08 +0200
commit128d6ee5c937652813c7a9aed198239f1d74c96d (patch)
tree8d3fc374f54869a9f3482a11e9a8cb581cadfd04
parentf80cc8643fa1316de9019f031e0d5754e3627a8c (diff)
annotation edits
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotation.form.js2
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js6
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.utility.js13
-rw-r--r--animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js2
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.inline/index.js5
-rw-r--r--animism-align/frontend/app/views/viewer/player/components.inline/inline.utility.js23
6 files changed, 40 insertions, 11 deletions
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js
index eb5afeb..829d3ae 100644
--- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.js
+++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.js
@@ -17,7 +17,7 @@ const ANNOTATION_TYPES = [
'video',
'image',
'gallery', 'carousel', 'grid', 'vitrine',
- 'curtain', 'intro',
+ 'curtain', 'intro', 'schedule',
].map(name => ({ name, label: capitalize(name.replace('_', ' ')) }))
class AnnotationForm extends Component {
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
index 9d15b44..8ba9c9b 100644
--- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
+++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.video.js
@@ -42,6 +42,12 @@ export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect, h
checked={annotation.settings.inline}
onChange={handleSettingsSelect}
/>
+ <Checkbox
+ label="Hide in transcript"
+ name="hide_in_transcript"
+ checked={annotation.settings.hide_in_transcript}
+ onChange={handleSettingsSelect}
+ />
<Select
title='Color'
name='color'
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.utility.js b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.utility.js
index 296e5bc..45ea239 100644
--- a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.utility.js
+++ b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/annotationTypes.utility.js
@@ -36,6 +36,19 @@ export const AnnotationIntro = ({ y, annotation, timeline, selected, onClick, on
)
}
+export const AnnotationSchedule = ({ y, annotation, timeline, selected, onClick, onDoubleClick }) => {
+ const className = selected ? 'annotation utility schedule selected' : 'annotation utility schedule'
+ return (
+ <div
+ className={className}
+ style={style}
+ onClick={e => onClick(e, annotation)}
+ onDoubleClick={e => onDoubleClick(e, annotation)}
+ >
+ Schedule
+ </div>
+ )
+}
export const AnnotationCurtain = ({ y, annotation, timeline, selected, onClick, onDoubleClick }) => {
const className = selected ? 'annotation utility curtain selected' : 'annotation utility curtain'
diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js
index 2ebe7b3..a0da2f2 100644
--- a/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js
+++ b/animism-align/frontend/app/views/align/components/annotations/annotationTypes/index.js
@@ -22,6 +22,7 @@ import {
import {
AnnotationCurtain,
AnnotationIntro,
+ AnnotationSchedule,
} from './annotationTypes.utility'
export const AnnotationElementLookup = {
@@ -39,5 +40,6 @@ export const AnnotationElementLookup = {
vitrine: React.memo(AnnotationGallery),
intro: React.memo(AnnotationIntro),
+ schedule: React.memo(AnnotationSchedule),
curtain: React.memo(AnnotationCurtain),
}
diff --git a/animism-align/frontend/app/views/viewer/player/components.inline/index.js b/animism-align/frontend/app/views/viewer/player/components.inline/index.js
index 6ce1bbe..01090a6 100644
--- a/animism-align/frontend/app/views/viewer/player/components.inline/index.js
+++ b/animism-align/frontend/app/views/viewer/player/components.inline/index.js
@@ -22,7 +22,8 @@ import {
} from './inline.gallery'
import {
- Intro
+ Intro,
+ Schedule,
} from './inline.utility'
export const inlineComponents = {
@@ -33,7 +34,9 @@ export const inlineComponents = {
section_heading: React.memo(SectionHeading),
heading_text: React.memo(HeadingText),
header: React.memo(SectionHeading),
+
intro: React.memo(Intro),
+ schedule: React.memo(Schedule),
video: React.memo(MediaVideo),
image: React.memo(MediaImage),
diff --git a/animism-align/frontend/app/views/viewer/player/components.inline/inline.utility.js b/animism-align/frontend/app/views/viewer/player/components.inline/inline.utility.js
index 084fbf4..f42e550 100644
--- a/animism-align/frontend/app/views/viewer/player/components.inline/inline.utility.js
+++ b/animism-align/frontend/app/views/viewer/player/components.inline/inline.utility.js
@@ -13,16 +13,21 @@ export const Intro = ({ paragraph, media, currentParagraph, currentAnnotation, o
return a
}, new Set)
return (
- <div>
- <div
- className='site-intro'
- style={style}
- >
- <div className='inner'>
- {annotation.settings.title && <span dangerouslySetInnerHTML={{ __html: annotation.settings.title }} />}
- {annotation.settings.subtitle && <span dangerouslySetInnerHTML={{ __html: annotation.settings.subtitle }} />}
- </div>
+ <div
+ className='site-intro'
+ style={style}
+ >
+ <div className='inner'>
+ {annotation.settings.title && <span dangerouslySetInnerHTML={{ __html: annotation.settings.title }} />}
+ {annotation.settings.subtitle && <span dangerouslySetInnerHTML={{ __html: annotation.settings.subtitle }} />}
</div>
+ </div>
+ )
+}
+
+export const Schedule = ({}) => {
+ return (
+ <div>
<div className='schedule'>
<div className='schedule-title'>Schedule</div>
{SCHEDULE.map(row => (