mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 20:41:33 +08:00 
			
		
		
		
	various small usability improvements
This commit is contained in:
		
							parent
							
								
									191f70477c
								
							
						
					
					
						commit
						6fe81cd93a
					
				| @ -8,24 +8,25 @@ | |||||||
|     <div id="top" style="text-align: center;"> |     <div id="top" style="text-align: center;"> | ||||||
|         |         | ||||||
|       <span id="top-message"></span> |       <span id="top-message"></span> | ||||||
|  |       <span id="error-message"></span> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <div style="margin-left: auto; margin-right: auto; width: 1000px"> |     <div style="margin-left: auto; margin-right: auto; width: 1100px"> | ||||||
|       <div style="width: 200px; float: left;"> |       <div style="width: 300px; height: 800px; float: left; overflow: scroll;"> | ||||||
|         <button type="button" class="btn" onclick="createNewTopLevelNote()">Create new note</button> |         <button type="button" class="btn" onclick="createNewTopLevelNote()">Create new note</button> | ||||||
| 
 | 
 | ||||||
|         <div id="tree"> |         <div id="tree"> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
| 
 | 
 | ||||||
|       <div style="width: 750px; float: left; margin-left: 20px;"> |       <div style="width: 750px; float: left; margin-left: 30px;"> | ||||||
|         <div style="float: right;"> |         <div style="float: right;"> | ||||||
|           <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"> | ||||||
|           </form> |           </form> | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|         <div style="float: left;"> |         <div style="float: left; margin: 5px;"> | ||||||
|           <input type="text" autocomplete="off" value="Welcome to Notecase web app!" id="noteTitle" style="font-size: x-large; border: 0; width: 100%;"> |           <input type="text" autocomplete="off" value="Welcome to Notecase web app!" id="noteTitle" style="font-size: x-large; border: 0; width: 100%;"> | ||||||
|         </div> |         </div> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -3,6 +3,7 @@ function html2notecase(contents, note) { | |||||||
|     contents = contents.replace(/<br>/g, '\n'); |     contents = contents.replace(/<br>/g, '\n'); | ||||||
|     contents = contents.replace(/<\/p>/g, '\n'); |     contents = contents.replace(/<\/p>/g, '\n'); | ||||||
|     contents = contents.replace(/<p>/g, ''); |     contents = contents.replace(/<p>/g, ''); | ||||||
|  |     contents = contents.replace(/ /g, ' '); | ||||||
| 
 | 
 | ||||||
|     let index = 0; |     let index = 0; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -35,6 +35,9 @@ function noteChanged() { | |||||||
|         contentType: "application/json", |         contentType: "application/json", | ||||||
|         success: function(result) { |         success: function(result) { | ||||||
|             message("Saved!"); |             message("Saved!"); | ||||||
|  |         }, | ||||||
|  |         error: function(result) { | ||||||
|  |             error("Error saving the note!"); | ||||||
|         } |         } | ||||||
|     }); |     }); | ||||||
| } | } | ||||||
|  | |||||||
| @ -44,5 +44,7 @@ function notecase2html(note) { | |||||||
| 
 | 
 | ||||||
|     noteText = noteText.replace(/(?:\r\n|\r|\n)/g, '<br />'); |     noteText = noteText.replace(/(?:\r\n|\r|\n)/g, '<br />'); | ||||||
| 
 | 
 | ||||||
|  |     noteText = noteText.replace(/  /g, '  '); | ||||||
|  | 
 | ||||||
|     return noteText; |     return noteText; | ||||||
| } | } | ||||||
| @ -127,6 +127,10 @@ $(function(){ | |||||||
|                                 } |                                 } | ||||||
|                             }); |                             }); | ||||||
|                         } |                         } | ||||||
|  |                     }, | ||||||
|  |                     "return": function(node) { | ||||||
|  |                         // doesn't work :-/
 | ||||||
|  |                         $('#noteDetail').summernote('focus'); | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | |||||||
| @ -2,4 +2,10 @@ function message(str) { | |||||||
|     $("#top-message").show(); |     $("#top-message").show(); | ||||||
|     $("#top-message").html(str); |     $("#top-message").html(str); | ||||||
|     $("#top-message").fadeOut(3000); |     $("#top-message").fadeOut(3000); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | function error(str) { | ||||||
|  |     $("#error-message").show(); | ||||||
|  |     $("#error-message").html(str); | ||||||
|  |     $("#error-message").fadeOut(10000); | ||||||
| } | } | ||||||
| @ -9,4 +9,12 @@ | |||||||
|     color: green; |     color: green; | ||||||
|     padding: 5px; |     padding: 5px; | ||||||
|     border-radius: 10px; |     border-radius: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | #error-message { | ||||||
|  |     display: none; /* initial state is hidden */ | ||||||
|  |     background-color: red; | ||||||
|  |     color: white; | ||||||
|  |     padding: 5px; | ||||||
|  |     border-radius: 10px; | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 azivner
						azivner