'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');
{{* 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">