wip making UI actions for notes
This commit is contained in:
@@ -20,26 +20,16 @@ body {
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
div.note-names {
|
||||
div.note-actions {
|
||||
position: fixed;
|
||||
bottom: 5px;
|
||||
left: 0;
|
||||
font-size: 14px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
div.note-names a {
|
||||
color: #aaa;
|
||||
padding-left: 10px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
div.note-names a.current {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div .note-names a:not(:last-of-type) {
|
||||
border-right: 1px solid #666;
|
||||
select.note-dropdown {
|
||||
padding: 6px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
@@ -88,8 +78,8 @@ body.dark textarea {
|
||||
background-color: orangered;
|
||||
}
|
||||
|
||||
form input[type=password],
|
||||
button {
|
||||
form.login-form input[type=password],
|
||||
form.login-form button {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
@@ -101,12 +91,19 @@ button {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
form input[type=password] {
|
||||
form.login-form input[type=password] {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
button, select {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
form button {
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
background-color: #009E60;
|
||||
}
|
||||
|
||||
form.action-form {
|
||||
display: inline;
|
||||
}
|
@@ -47,6 +47,14 @@ $(function () {
|
||||
// set focus on load
|
||||
$textarea.focus();
|
||||
|
||||
// handle note dropdown change
|
||||
$('#note-dropdown').change(function () {
|
||||
var selectedNote = $(this).val();
|
||||
if (selectedNote && selectedNote !== noteName) {
|
||||
window.location.href = selectedNote;
|
||||
}
|
||||
});
|
||||
|
||||
// update content upon sync save
|
||||
connection.on('updateNote', function (content) {
|
||||
$textarea.val(content);
|
||||
|
Reference in New Issue
Block a user