hide toggle is now on alt-h (previously ctrl-alt-h) and displays editor on full width

This commit is contained in:
azivner 2017-08-29 21:07:02 -04:00
parent a7180e0e19
commit 0b5aeee0ce
2 changed files with 6 additions and 4 deletions

View File

@ -32,7 +32,7 @@
</div>
</div>
<div style="width: 750px; float: left; margin-left: 30px;">
<div id="noteDetailWrapper" style="width: 750px; float: left; margin-left: 30px;">
<div style="float: right;" class="hide-toggle">
<form action="logout" method="POST">
<input type="submit" class="btn btn-sm" value="Logout">

View File

@ -18,11 +18,13 @@ $(function() {
jQuery.hotkeys.options.filterInputAcceptingElements = true;
jQuery.hotkeys.options.filterContentEditable = true;
$(document).bind('keydown', 'alt+ctrl+h', function() {
$(document).bind('keydown', 'alt+h', function() {
const toggle = $(".hide-toggle");
const hidden = toggle.css('display') === 'none';
// use visibility instead of display so that content isn't moved around and stays set in place
toggle.css('visibility', toggle.css('visibility') === 'hidden' ? 'visible' : 'hidden');
toggle.css('display', hidden ? 'block' : 'none');
$("#noteDetailWrapper").css("width", hidden ? "750px" : "100%");
});
$(document).bind('keydown', 'alt+q', function() {