diff options
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/app/views/tile/components/tile.form.js | 3 | ||||
| -rw-r--r-- | frontend/app/views/tile/forms/tile.constants.js | 2 | ||||
| -rw-r--r-- | frontend/site/viewer/viewer.container.js | 6 |
3 files changed, 10 insertions, 1 deletions
diff --git a/frontend/app/views/tile/components/tile.form.js b/frontend/app/views/tile/components/tile.form.js index 54b736e..2e6dfef 100644 --- a/frontend/app/views/tile/components/tile.form.js +++ b/frontend/app/views/tile/components/tile.form.js @@ -22,7 +22,8 @@ import { IMAGE_TILE_STYLES, VIDEO_STYLES, TEXT_FONT_FAMILIES, TEXT_FONT_STYLES, CURSORS, UNITS, - NO_LINK, EXTERNAL_LINK, OPEN_POPUP_LINK, CLOSE_POPUP_LINK, + NO_LINK, EXTERNAL_LINK, + OPEN_POPUP_LINK, CLOSE_POPUP_LINK, TOGGLE_POPUP_LINK, PAGE_LIST_TOP_OPTIONS, NO_POPUP, POPUP_LIST_TOP_OPTIONS, } from 'app/views/tile/forms/tile.constants' diff --git a/frontend/app/views/tile/forms/tile.constants.js b/frontend/app/views/tile/forms/tile.constants.js index 273085c..322a081 100644 --- a/frontend/app/views/tile/forms/tile.constants.js +++ b/frontend/app/views/tile/forms/tile.constants.js @@ -80,11 +80,13 @@ export const NO_LINK = 0 export const EXTERNAL_LINK = -1 export const OPEN_POPUP_LINK = -2 export const CLOSE_POPUP_LINK = -3 +export const TOGGLE_POPUP_LINK = -4 export 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: TOGGLE_POPUP_LINK, label: 'Toggle popup' }, { name: -99, label: '──────────', disabled: true }, ] diff --git a/frontend/site/viewer/viewer.container.js b/frontend/site/viewer/viewer.container.js index c5dbd92..c075cfd 100644 --- a/frontend/site/viewer/viewer.container.js +++ b/frontend/site/viewer/viewer.container.js @@ -128,6 +128,12 @@ class ViewerContainer extends Component { [tile.settings.target_popup]: false, }) } + else if (tile.href === '__toggle_popup') { + actions.site.setPopups({ + ...this.props.popups, + [tile.settings.target_popup]: !this.props.popups[tile.settings.target_popup], + }) + } else if (!tile.settings.navigate_when_audio_finishes) { history.push(tile.href) } |
