mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02: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;">
|
||||
|
||||
<span id="top-message"></span>
|
||||
<span id="error-message"></span>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: auto; margin-right: auto; width: 1000px">
|
||||
<div style="width: 200px; float: left;">
|
||||
<div style="margin-left: auto; margin-right: auto; width: 1100px">
|
||||
<div style="width: 300px; height: 800px; float: left; overflow: scroll;">
|
||||
<button type="button" class="btn" onclick="createNewTopLevelNote()">Create new note</button>
|
||||
|
||||
<div id="tree">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 750px; float: left; margin-left: 20px;">
|
||||
<div style="width: 750px; float: left; margin-left: 30px;">
|
||||
<div style="float: right;">
|
||||
<form action="logout" method="POST">
|
||||
<input type="submit" class="btn btn-sm" value="Logout">
|
||||
</form>
|
||||
</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%;">
|
||||
</div>
|
||||
|
||||
|
@ -3,6 +3,7 @@ function html2notecase(contents, note) {
|
||||
contents = contents.replace(/<br>/g, '\n');
|
||||
contents = contents.replace(/<\/p>/g, '\n');
|
||||
contents = contents.replace(/<p>/g, '');
|
||||
contents = contents.replace(/ /g, ' ');
|
||||
|
||||
let index = 0;
|
||||
|
||||
|
@ -35,6 +35,9 @@ function noteChanged() {
|
||||
contentType: "application/json",
|
||||
success: function(result) {
|
||||
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(/ /g, ' ');
|
||||
|
||||
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").html(str);
|
||||
$("#top-message").fadeOut(3000);
|
||||
}
|
||||
|
||||
function error(str) {
|
||||
$("#error-message").show();
|
||||
$("#error-message").html(str);
|
||||
$("#error-message").fadeOut(10000);
|
||||
}
|
@ -9,4 +9,12 @@
|
||||
color: green;
|
||||
padding: 5px;
|
||||
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