Increase text and checkbox size when displaying list notes
This commit is contained in:
parent
3965550c26
commit
471bed7b47
|
@ -39,6 +39,10 @@ input[type="text"], textarea {
|
|||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
#editNoteBody {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
|
@ -72,4 +76,28 @@ label {
|
|||
.internal {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
.noteList {
|
||||
font-size: 200%;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.noteList ul {
|
||||
list-style-type: none;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.noteList > ul {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.noteList input[type=checkbox] {
|
||||
/* Double-sized Checkboxes */
|
||||
-ms-transform: scale(1.5); /* IE */
|
||||
-moz-transform: scale(1.5); /* FF */
|
||||
-webkit-transform: scale(1.5); /* Safari and Chrome */
|
||||
transform: scale(1.5); /* Opera */
|
||||
margin-bottom: 3px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
|
|
|
@ -327,8 +327,7 @@ function render() {
|
|||
}
|
||||
printedNotebook = true;
|
||||
|
||||
NoteBody += '<h2 onclick="editNote(\'' + Notebooks[nbid].ID + '\', \'\')" style="margin-bottom: 4px;"><span style="text-decoration: underline;">' + nblabel + '</span></h2>';
|
||||
|
||||
NoteBody += '<h2 onclick="editNote(\'' + Notebooks[nbid].ID + '\', \'\')" style="margin-bottom: 4px;"><span style="text-decoration: underline;display: inline-block;">' + nblabel + '</span></h2>';
|
||||
|
||||
var sortedNotes = [];
|
||||
for (var nid in Notebooks[nbid].Notes) {
|
||||
|
@ -354,7 +353,7 @@ function render() {
|
|||
BackNote = ViewNote;
|
||||
BackLabel = 'Cancel';
|
||||
}
|
||||
NoteBody += '<div style="margin-bottom: 7px;"><button onclick="viewNote(\'' + BackNotebook + '\', \'' + BackNote + '\')">' + BackLabel + '</button> <div style="float: right;">';
|
||||
NoteBody += '<div style="margin-bottom: 7px;"><button onclick="viewNote(\'' + BackNotebook + '\', \'' + BackNote + '\')">' + BackLabel + '</button> <div style="float: right;">';
|
||||
|
||||
if (NoteMode === "view") {
|
||||
if (note) {
|
||||
|
@ -377,25 +376,35 @@ function render() {
|
|||
}
|
||||
NoteBody += '</div></div>';
|
||||
|
||||
NoteBody += '<div style="margin-bottom: 7px;">';
|
||||
if (NoteMode === "view") {
|
||||
if (!note) {
|
||||
alert(' no note');
|
||||
} else {
|
||||
NoteBody += '<h2>' + note.Label + '</h2>';
|
||||
NoteBody += '<h2 style="text-decoration: underline;display: inline-block;">' + note.Label + '</h2>';
|
||||
}
|
||||
} else {
|
||||
NoteBody += '<input type="text" id="editNoteTitle" placeholder="Title" style="border: 1px dashed #333333;font-size: 1.25em;padding: 7px;width: 100%;box-sizing: border-box;">';
|
||||
}
|
||||
NoteBody += '</div>';
|
||||
|
||||
if (NoteMode === "view" && note) {
|
||||
modified = new Date(note.ModifiedAt * 1000);
|
||||
NoteBody += '<div style="margin-bottom: 7px;"><small> ' + modified.getFullYear() + '/' + (modified.getMonth() + 1) + '/' + modified.getDate() + ' ' + ('0' + modified.getHours()).slice(-2) + ':' + ('0' + modified.getMinutes()).slice(-2) + ' · ' + note.ModifiedBy + '</small></div>';
|
||||
NoteBody += '<div style="float:right;margin-left: 7px;"><small> ' + modified.getFullYear() + '/' + (modified.getMonth() + 1) + '/' + modified.getDate() + ' ' + ('0' + modified.getHours()).slice(-2) + ':' + ('0' + modified.getMinutes()).slice(-2) + ' · ' + note.ModifiedBy + '</small></div>';
|
||||
}
|
||||
|
||||
if (note && NoteMode === "view") {
|
||||
NoteBody += marked(note.Body, {
|
||||
var noteClass = 'noteNormal';
|
||||
if (note.Body.substr(0, 9) === '[//]: # (') {
|
||||
var endComment = note.Body.indexOf(')');
|
||||
if (endComment > 0) {
|
||||
var noteComment = note.Body.substr(10, endComment);
|
||||
var options = noteComment.split('|');
|
||||
if ($.inArray('list', options)) {
|
||||
noteClass = 'noteList';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
NoteBody += '<br><div id="noteContent" class="' + noteClass + '">' + marked(note.Body, {
|
||||
renderer: markdownRenderer,
|
||||
gfm: true,
|
||||
breaks: true,
|
||||
|
@ -406,7 +415,7 @@ function render() {
|
|||
smartLists: true,
|
||||
tables: true,
|
||||
xhtml: false
|
||||
});
|
||||
}) + '</div>';
|
||||
} else if (NoteMode === "edit") {
|
||||
NoteBody += '<textarea id="editNoteBody" placeholder="Text"></textarea>';
|
||||
}
|
||||
|
@ -415,10 +424,8 @@ function render() {
|
|||
$("#note-body").html(NoteBody);
|
||||
if (NoteMode === "view") {
|
||||
if (ViewNote !== "" && NoteHideChecked) {
|
||||
$('#note-body').append('<div id="checkedDivider" style="display: none;"><hr><ul id="hiddenItems"></ul></div>');
|
||||
|
||||
var foundChecked = false;
|
||||
$('#note-body').find('input[type=checkbox]:checked').each(function () {
|
||||
$('#noteContent').append('<div id="checkedDivider" style="display: none;"><hr><ul id="hiddenItems"></ul></div>').find('input[type=checkbox]:checked').each(function () {
|
||||
var closestLi = $(this).closest('li');
|
||||
if (!closestLi) {
|
||||
return;
|
||||
|
@ -431,7 +438,6 @@ function render() {
|
|||
foundChecked = true;
|
||||
closestLi.appendTo("#hiddenItems");
|
||||
});
|
||||
|
||||
if (foundChecked) {
|
||||
$('#checkedDivider').show();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue