From 50d5c3c2f10725af8ebb6db47c209f7000abc8f4 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 20 Mar 2021 19:24:13 +0100 Subject: remove foreignkey constraint on target_page_id. toggle popups. show list of popups, if a tile link is open/close popup --- frontend/app/views/page/page.reducer.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'frontend/app/views/page/page.reducer.js') diff --git a/frontend/app/views/page/page.reducer.js b/frontend/app/views/page/page.reducer.js index b0c4553..a1f281a 100644 --- a/frontend/app/views/page/page.reducer.js +++ b/frontend/app/views/page/page.reducer.js @@ -11,6 +11,7 @@ const initialState = crudState('page', { tileList: false, showingPopups: true, sidebarOnRight: true, + popups: {}, }, options: { } @@ -202,7 +203,16 @@ export default function pageReducer(state = initialState, action) { ...state, editor: { ...state.editor, - togglePopups: !state.editor.togglePopups, + showingPopups: !state.editor.showingPopups, + } + } + + case types.page.load_popups: + return { + ...state, + editor: { + ...state.editor, + popups: action.popups, } } -- cgit v1.2.3-70-g09d2