]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Merge compose/jot buttons features
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 19 Feb 2020 20:11:35 +0000 (15:11 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 19 Feb 2020 20:11:35 +0000 (15:11 -0500)
view/theme/frio/css/style.css
view/theme/frio/js/theme.js
view/theme/frio/templates/jot.tpl

index d213a10d151b864d6a99763744c2de76fe629c49..0db850a0774ec05139526b95cf645ba3d7803d04 100644 (file)
@@ -1301,8 +1301,7 @@ section ul.tabs {
 section #jotOpen {
     display: none;
 }
-#jotOpen,
-#composeOpen {
+#jotOpen {
     margin-top: 3px;
     float: right;
 }
index 2ea3aa6d2fb2973021264cf4b8e3caa5600b41c1..335b63f16f3211d77bf1f1ab8c8b2ea73b99bf22 100644 (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');
index fe756880fe3243e821d92534f669a98b89955de0..98eba98b238f4e8acde799b36147102b50753328 100644 (file)
@@ -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">