[frio] Merge compose/jot buttons features

This commit is contained in:
Hypolite Petovan 2020-02-19 15:11:35 -05:00
commit 2791d70655
3 changed files with 11 additions and 21 deletions

View file

@ -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');