From: Hypolite Petovan <hypolite@mrpetovan.com>
Date: Wed, 19 Feb 2020 20:11:35 +0000 (-0500)
Subject: [frio] Merge compose/jot buttons features
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2791d706552a3480da5e7983b129bedbe5c5dd67;p=friendica.git

[frio] Merge compose/jot buttons features
---

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 *}}
-<button class="btn btn-sm btn-main pull-right" id="jotOpen" aria-label="{{$new_post}}" title="{{$new_post}}" onclick="jotShow();"><i class="fa fa-pencil-square-o fa-2x"></i></button>
-<a class="btn btn-sm btn-main pull-right" id="composeOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o fa-2x"></i></a>
+<a class="btn btn-sm btn-main pull-right" id="jotOpen" href="compose/{{$posttype}}{{if $content}}?body={{$content}}{{/if}}" aria-label="{{$new_post}}" title="{{$new_post}}"><i class="fa fa-pencil-square-o fa-2x"></i></a>
 
 <div id="jot-content">
 	<div id="jot-sections">