diff options
Diffstat (limited to 'animism-align/frontend/views/align/align.actions.js')
| -rw-r--r-- | animism-align/frontend/views/align/align.actions.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/animism-align/frontend/views/align/align.actions.js b/animism-align/frontend/views/align/align.actions.js index 82e4799..b3883ae 100644 --- a/animism-align/frontend/views/align/align.actions.js +++ b/animism-align/frontend/views/align/align.actions.js @@ -25,7 +25,7 @@ export const setCursor = cursor_ts => dispatch => ( dispatch({ type: types.align.set_display_setting, key: 'cursor_ts', value: cursor_ts }) ) -export const showNewTimestampForm = (start_ts, text) => dispatch => { +export const showNewAnnotationForm = (start_ts, text) => dispatch => { let croppedText; if (store.getState().align.annotation.start_ts) { croppedText = store.getState().align.annotation.text @@ -44,6 +44,13 @@ export const showNewTimestampForm = (start_ts, text) => dispatch => { }) } +export const updateAnnotationForm = (key, value) => dispatch => { + dispatch({ type: types.align.update_temporary_annotation, key, value }) +} +export const updateAnnotationSettings = (key, value) => dispatch => { + dispatch({ type: types.align.update_temporary_annotation_settings, key, value }) +} + const cutFirstSentence = text => { const textToCrop = text.trim().replace("\n", " ").split("\n")[0] let cropIndex = textToCrop.indexOf('. ') + 1 @@ -54,7 +61,7 @@ const cutFirstSentence = text => { return croppedText } -export const hideTimestampForm = () => dispatch => { +export const hideAnnotationForm = () => dispatch => { dispatch({ type: types.align.set_temporary_annotation, data: {} |
