From 63904f39ee254c9014df2c158bdae39d41d8cf74 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 10 Jul 2020 16:40:02 +0200 Subject: cursors --- frontend/views/page/components/tile.form.js | 82 ++++++++++++++++++----------- 1 file changed, 52 insertions(+), 30 deletions(-) (limited to 'frontend/views/page/components/tile.form.js') diff --git a/frontend/views/page/components/tile.form.js b/frontend/views/page/components/tile.form.js index eca895f..6011b0a 100644 --- a/frontend/views/page/components/tile.form.js +++ b/frontend/views/page/components/tile.form.js @@ -47,6 +47,13 @@ const TEXT_FONT_STYLES = [ 'normal', 'bold', 'italic', 'bold-italic', ].map(style => ({ name: style, label: style })) +const CURSORS = [ + { name: 'hand_up', label: 'Up', }, + { name: 'hand_down', label: 'Down', }, + { name: 'hand_left', label: 'Left', }, + { name: 'hand_right', label: 'Right', }, +] + const NO_LINK = 0 const EXTERNAL_LINK = -1 const PAGE_LIST_TOP_OPTIONS = [ @@ -64,10 +71,11 @@ const newImage = (data) => ({ is_tiled: false, tile_style: 'tile', url: "", + external_link_url: "", + cursor: 'hand_up', }, type: 'image', target_page_id: null, - external_link_url: "", ...data, }) @@ -82,20 +90,22 @@ const newText = (data) => ({ background_color: 'transparent', width: 0, height: 0, + external_link_url: "", + cursor: 'hand_up', }, type: 'text', target_page_id: null, - external_link_url: "", ...data, }) const newLink = (data) => ({ settings: { ...newPosition({ width: 100, height: 100, }), + external_link_url: "", + cursor: 'hand_up', }, type: 'link', target_page_id: null, - external_link_url: "", ...data, }) @@ -389,33 +399,6 @@ class TileForm extends Component { ) } - renderHyperlinkForm() { - const { temporaryTile } = this.props - const { pageList } = this.state - const isExternalLink = temporaryTile.target_page_id === EXTERNAL_LINK - return ( -
- +