From 2791d706552a3480da5e7983b129bedbe5c5dd67 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 19 Feb 2020 15:11:35 -0500 Subject: [PATCH] [frio] Merge compose/jot buttons features --- view/theme/frio/css/style.css | 3 +-- view/theme/frio/js/theme.js | 26 +++++++++----------------- view/theme/frio/templates/jot.tpl | 3 +-- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index d213a10d15..0db850a077 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1301,8 +1301,7 @@ section ul.tabs { section #jotOpen { display: none; } -#jotOpen, -#composeOpen { +#jotOpen { margin-top: 3px; float: right; } diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index 2ea3aa6d2f..335b63f16f 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -73,25 +73,17 @@ $(document).ready(function(){ 'target': ".flex-target" }); - // add Jot botton to the scecond navbar + // add Jot button to the second navbar let $jotButton = $("#jotOpen"); - let $composeButton = $("#composeOpen"); - if (compose) { - $jotButton.hide(); - if ($composeButton.length) { - $composeButton.appendTo("#topbar-second > .container > #navbar-button"); - if($("#jot-popup").is(":hidden")) { - $composeButton.hide(); - } - } - } else { - $composeButton.hide(); - if ($jotButton.length) { - $jotButton.appendTo("#topbar-second > .container > #navbar-button"); - if($("#jot-popup").is(":hidden")) { - $jotButton.hide(); - } + if ($jotButton.length) { + $jotButton.appendTo("#topbar-second > .container > #navbar-button"); + if ($("#jot-popup").is(":hidden")) { + $jotButton.hide(); } + $jotButton.on('click', function (e) { + e.preventDefault(); + jotShow(); + }); } let $body = $('body'); diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index fe756880fe..98eba98b23 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -1,6 +1,5 @@ {{* The button to open the jot - in This theme we move the button with js to the second nav bar *}} - - +
-- 2.39.5