From bed86dd0796eb4404311b591de9b8e9563e232f2 Mon Sep 17 00:00:00 2001 From: Sebastien Curt <sebastien.curt@tetras-libre.fr> Date: Sat, 6 Aug 2022 10:41:17 +0200 Subject: [PATCH] Allow user to open mosaic view on preview mode --- capsule-prototype/index.html | 2 +- capsule-prototype/js/online-script.js | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/capsule-prototype/index.html b/capsule-prototype/index.html index 7465951..8ebcbc3 100644 --- a/capsule-prototype/index.html +++ b/capsule-prototype/index.html @@ -200,7 +200,7 @@ <div id='tabs' class='flex flex-col'> - <div id='tab_selector' class='flex-row flex-center editmode'> + <div id='tab_selector' class='flex-row flex-center'> <form id='tab_selector_form' class='flex-row flex-space-around'> <input id='inp_vid' name='tab' value='video' type='radio' checked /> <label for='inp_vid'>video</label> diff --git a/capsule-prototype/js/online-script.js b/capsule-prototype/js/online-script.js index 6cd99d6..9c88df2 100644 --- a/capsule-prototype/js/online-script.js +++ b/capsule-prototype/js/online-script.js @@ -31,6 +31,11 @@ window.onload = function() { rekall_common.owner = {"canEdit": false, "author": "", "locationGps": "", "locationName": ""}; rouletteStart(); + + $('#tab_selector_form').change(function (event) { + pubSub.publish(event.target.value) + }); + var httpGetData = {"status": 1}; if(getParameterByName("p") != "") { httpGetData.p = getParameterByName("p"); @@ -132,6 +137,7 @@ window.onload = function() { }); }; + function setEditionControls() { //Drag&drop files @@ -370,10 +376,6 @@ function setEditionControls() { } }); - $('#tab_selector_form').change(function (event) { - pubSub.publish(event.target.value) - }); - $("#popupEdit").click(function (event) { event.stopPropagation(); closeInputs(); @@ -706,7 +708,9 @@ function openVideo() { function openMosaic() { $('#video_tab').hide(); - $('#left_menu_controls').hide(); + if(rekall_common.owner.canEdit) { + $('#left_menu_controls').hide(); + } window.app.rekall.Rekall('mosaicWidget').show(); } -- GitLab