mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	hide toggle is now on alt-h (previously ctrl-alt-h) and displays editor on full width
This commit is contained in:
		@@ -32,7 +32,7 @@
 | 
				
			|||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
      </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">
 | 
					        <div style="float: right;" class="hide-toggle">
 | 
				
			||||||
          <form action="logout" method="POST">
 | 
					          <form action="logout" method="POST">
 | 
				
			||||||
            <input type="submit" class="btn btn-sm" value="Logout">
 | 
					            <input type="submit" class="btn btn-sm" value="Logout">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,11 +18,13 @@ $(function() {
 | 
				
			|||||||
jQuery.hotkeys.options.filterInputAcceptingElements = true;
 | 
					jQuery.hotkeys.options.filterInputAcceptingElements = true;
 | 
				
			||||||
jQuery.hotkeys.options.filterContentEditable = true;
 | 
					jQuery.hotkeys.options.filterContentEditable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).bind('keydown', 'alt+ctrl+h', function() {
 | 
					$(document).bind('keydown', 'alt+h', function() {
 | 
				
			||||||
    const toggle = $(".hide-toggle");
 | 
					    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('display', hidden ? 'block' : 'none');
 | 
				
			||||||
    toggle.css('visibility', toggle.css('visibility') === 'hidden' ? 'visible' : 'hidden');
 | 
					
 | 
				
			||||||
 | 
					    $("#noteDetailWrapper").css("width", hidden ? "750px" : "100%");
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(document).bind('keydown', 'alt+q', function() {
 | 
					$(document).bind('keydown', 'alt+q', function() {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user