From 0919fde0919aa8ce2724ecb9797eee94774fe126 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 27 Jul 2020 22:34:33 +0200 Subject: formz --- .../frontend/app/common/form.component.js | 2 +- .../components/annotations/annotation.form.css | 3 +++ .../annotationForms/annotationForm.image.js | 2 +- .../annotationForms/annotationForm.video.js | 23 ++++++++++++++++++++-- .../frontend/app/views/viewer/viewer.fonts.css | 2 +- 5 files changed, 27 insertions(+), 5 deletions(-) (limited to 'animism-align') diff --git a/animism-align/frontend/app/common/form.component.js b/animism-align/frontend/app/common/form.component.js index 4eee10b..bbdf26d 100644 --- a/animism-align/frontend/app/common/form.component.js +++ b/animism-align/frontend/app/common/form.component.js @@ -78,7 +78,7 @@ export const Checkbox = props => ( type="checkbox" name={props.name} value={1} - checked={props.checked} + checked={!!props.checked} onChange={(e) => props.onChange(props.name, e.target.checked)} /> {props.label} diff --git a/animism-align/frontend/app/views/align/components/annotations/annotation.form.css b/animism-align/frontend/app/views/align/components/annotations/annotation.form.css index fdb4abe..26eeb26 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotation.form.css +++ b/animism-align/frontend/app/views/align/components/annotations/annotation.form.css @@ -53,3 +53,6 @@ margin: 0 0.5rem 0 0; width: 1.4rem; } +.annotationForm .checkbox { + margin-bottom: 0.5rem; +} \ No newline at end of file diff --git a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js index 2509970..0a6cc17 100644 --- a/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js +++ b/animism-align/frontend/app/views/align/components/annotations/annotationForms/annotationForm.image.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' -import { Select } from 'app/common' +import { Select, Checkbox } from 'app/common' import { AnnotationFormFullscreen } from './annotationForm.utility' export const AnnotationFormImage = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { 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 655efdc..5b4e199 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 @@ -1,8 +1,9 @@ import React, { Component } from 'react' -import { Select } from 'app/common' +import { Select, Checkbox } from 'app/common' +import { AnnotationFormFullscreen } from './annotationForm.utility' -export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect }) => { +export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect, handleSettingsChange }) => { if (!media.lookup) return
const { lookup, order } = media const video_list_items = order.filter(id => lookup[id].type === 'video').map(id => { @@ -22,6 +23,24 @@ export const AnnotationFormVideo = ({ annotation, media, handleSettingsSelect }) defaultOption='Choose a video' onChange={handleSettingsSelect} /> + + + {(annotation.settings.fullscreen && !annotation.settings.inline) && ( + + )}
) } diff --git a/animism-align/frontend/app/views/viewer/viewer.fonts.css b/animism-align/frontend/app/views/viewer/viewer.fonts.css index 09631ee..e13f195 100644 --- a/animism-align/frontend/app/views/viewer/viewer.fonts.css +++ b/animism-align/frontend/app/views/viewer/viewer.fonts.css @@ -1,6 +1,6 @@ @font-face{ font-family: "Freight Text"; - src: url("//freigtexprobook-webfont.woff2") format("woff2"), + src: url("/static/fonts/eflux/freigtexprobook-webfont.woff2") format("woff2"), url("/static/fonts/eflux/freigtexprobook-webfont.woff") format("woff"); font-weight: 400; font-style: normal; -- cgit v1.2.3-70-g09d2