[frio] Merge compose/jot buttons features
This commit is contained in:
parent
abe1e37dd9
commit
2791d70655
3 changed files with 11 additions and 21 deletions
|
@ -1301,8 +1301,7 @@ section ul.tabs {
|
|||
section #jotOpen {
|
||||
display: none;
|
||||
}
|
||||
#jotOpen,
|
||||
#composeOpen {
|
||||
#jotOpen {
|
||||
margin-top: 3px;
|
||||
float: right;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
$jotButton.on('click', function (e) {
|
||||
e.preventDefault();
|
||||
jotShow();
|
||||
});
|
||||
}
|
||||
|
||||
let $body = $('body');
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue