diff --git a/nullboard.html b/nullboard.html
index 0e1aca1..74d67a7 100644
--- a/nullboard.html
+++ b/nullboard.html
@@ -632,6 +632,15 @@
padding-bottom: 6px;
}
+ .board .note.overdue {
+ background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgYmFzZVByb2ZpbGU9InRpbnkiIGhlaWdodD0iMjRweCIgaWQ9IkxheWVyXzEiIHZlcnNpb249IjEuMiIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PHBhdGggZD0iTTIxLjE3MSwxNS4zOThsLTUuOTEyLTkuODU0QzE0LjQ4Myw0LjI1MSwxMy4yOTYsMy41MTEsMTIsMy41MTFzLTIuNDgzLDAuNzQtMy4yNTksMi4wMzFsLTUuOTEyLDkuODU2ICBjLTAuNzg2LDEuMzA5LTAuODcyLDIuNzA1LTAuMjM1LDMuODNDMy4yMywyMC4zNTQsNC40NzIsMjEsNiwyMWgxMmMxLjUyOCwwLDIuNzctMC42NDYsMy40MDYtMS43NzEgIEMyMi4wNDMsMTguMTA0LDIxLjk1NywxNi43MDgsMjEuMTcxLDE1LjM5OHogTTEyLDE3LjU0OWMtMC44NTQsMC0xLjU1LTAuNjk1LTEuNTUtMS41NDljMC0wLjg1NSwwLjY5NS0xLjU1MSwxLjU1LTEuNTUxICBzMS41NSwwLjY5NiwxLjU1LDEuNTUxQzEzLjU1LDE2Ljg1NCwxMi44NTQsMTcuNTQ5LDEyLDE3LjU0OXogTTEzLjYzMywxMC4xMjVjLTAuMDExLDAuMDMxLTEuNDAxLDMuNDY4LTEuNDAxLDMuNDY4ICBjLTAuMDM4LDAuMDk0LTAuMTMsMC4xNTYtMC4yMzEsMC4xNTZzLTAuMTkzLTAuMDYyLTAuMjMxLTAuMTU2bC0xLjM5MS0zLjQzOEMxMC4yODksOS45MjIsMTAuMjUsOS43MTIsMTAuMjUsOS41ICBjMC0wLjk2NSwwLjc4NS0xLjc1LDEuNzUtMS43NXMxLjc1LDAuNzg1LDEuNzUsMS43NUMxMy43NSw5LjcxMiwxMy43MTEsOS45MjIsMTMuNjMzLDEwLjEyNXoiLz48L3N2Zz4=")no-repeat, linear-gradient(to right, #ffffff, #f5071f);
+ background-position: right;
+ }
+
+ .board .note.strike {
+ text-decoration: line-through;
+ }
+
.board .note.collapsed .text,
.note-dragster.collapsed .text {
max-height: calc( var(--lh) * 1px );
@@ -1137,6 +1146,21 @@
padding-right: 10px;
}
+ .overlay > div.keyboardshortcuts {
+ text-align: center;
+ padding: 50px 50px;
+ position: relative;
+ }
+
+ .overlay > div.keyboardshortcuts div {
+ position: absolute;
+ bottom: -30px;
+ left: 0;
+ width: 100%;
+ color: #fff9;
+ }
+
+
/***/
.overlay .backup-conf {
@@ -1552,6 +1576,7 @@
+
+
+
@@ -3270,6 +3313,20 @@ Auto-backup
var n = l.addNote( getText($note.find('.text')) );
n.raw = $note.hasClass('raw');
n.min = $note.hasClass('collapsed');
+
+ //Search for overdue dates and highlight them red via a new class 'overdue'
+ var noteDate = new Date(n.text.substring(0, n.text.indexOf(']')).split('[').pop().split(']')[0]).toLocaleDateString();
+ var todayDate = new Date().toLocaleDateString();
+ if (new Date(todayDate).getTime() > new Date(noteDate).getTime()) $note.addClass('overdue');
+
+ //remove the coloring if its in a list with "done" or "complete"
+ var listTitle = $note.closest('.list, .head').find('.text').attr('_text');
+ if (listTitle.toLowerCase().includes("done") || listTitle.toLowerCase().includes("complete")){
+ $note.removeClass('overdue');
+ $note.addClass('strike');
+ }
+ else
+ $note.removeClass('strike');
});
});
@@ -3372,6 +3429,18 @@ Auto-backup
list.notes.forEach(function(n){
var $n = $ndiv.clone();
setText( $n.find('.text'), n.text );
+
+ //Search for overdue dates and highlight them red via a new class 'overdue'
+ var noteDate = new Date(n.text.substring(0, n.text.indexOf(']')).split('[').pop().split(']')[0]).toLocaleDateString();
+ var todayDate = new Date().toLocaleDateString();
+ if (new Date(todayDate).getTime() > new Date(noteDate).getTime()) $n.addClass('overdue');
+
+ //remove the coloring if its in a list with "done" or "complete"
+ if (list.title.toLowerCase().includes("done") || list.title.toLowerCase().includes("complete")){
+ $n.removeClass('overdue');
+ $n.addClass('strike');
+ }
+
if (n.raw) $n.addClass('raw');
if (n.min) $n.addClass('collapsed');
$l_notes.append($n);
@@ -4157,6 +4226,14 @@ Auto-backup
if ($item.parent().hasClass('board'))
NB.board.title = text_now;
+ //Search for overdue dates and highlight them red via a new class 'overdue' (when editing a note)
+ var noteDate = new Date(text_now.substring(0, text_now.indexOf(']')).split('[').pop().split(']')[0]).toLocaleDateString();
+ var todayDate = new Date().toLocaleDateString();
+ if (new Date(todayDate).getTime() > new Date(noteDate).getTime())
+ $item.addClass('overdue');
+ else
+ $item.removeClass('overdue');
+
updatePageTitle();
saveBoard();
}
@@ -4183,7 +4260,7 @@ Auto-backup
function setRevealState(ev)
{
var raw = ev.originalEvent;
- var do_reveal = raw.getModifierState && (raw.getModifierState( 'CapsLock' ) || raw.getModifierState( 'Control' ));
+ var do_reveal = raw.getModifierState && (raw.getModifierState( 'CapsLock' ) || raw.getModifierState( 'Control' ) || raw.getModifierState( 'Meta' ));
if (do_reveal) $('body').addClass('reveal');
else $('body').removeClass('reveal');
@@ -4704,6 +4781,45 @@ Auto-backup
return false;
}
+ // ctrl + d for auto due date insert (any date in the [] will update the note ui if past due -- defaults to today)
+ if (isNote && ev.ctrlKey && ev.keyCode == '68')
+ {
+ var have = this.value;
+ var want = '[' + new Date().toLocaleDateString() + '] ' + have;
+ $this.val(want);
+ this.selectionStart = this.selectionEnd = this.value.length;
+ return false;
+ }
+
+ // ctrl + s for auto stamp date (stamps the current date and will not affect note ui if past due)
+ if (isNote && ev.ctrlKey && ev.keyCode == '83')
+ {
+ var have = this.value;
+ var want = new Date().toLocaleDateString() + ': ' + have;
+ $this.val(want);
+ this.selectionStart = this.selectionEnd = this.value.length;
+ return false;
+ }
+
+ // ctrl + x to delete note
+ if (isNote && ev.ctrlKey && ev.keyCode == '88')
+ {
+ stopEditing($this, false, false);
+ deleteNote( $(this).closest('.note') );
+ return false;
+ }
+
+ // alt/option + rightarrow to tab
+ if (isNote && ev.altKey && ev.key == 'ArrowRight')
+ {
+ var have = this.value;
+ var pos = this.selectionStart;
+ var want = have.substr(0, pos) + '\u0009' + have.substr(this.selectionEnd);
+ $this.val(want);
+ this.selectionStart = this.selectionEnd = pos + 1;
+ return false;
+ }
+
// tab
if (ev.keyCode == 9)
{
@@ -4779,7 +4895,7 @@ Auto-backup
}
// ctrl-shift-8
- if (isNote && ev.key == '*' && ev.ctrlKey)
+ if (isNote && ev.key == '*' && ev.ctrlKey || isNote && ev.key == '8' && ev.metaKey && ev.shiftKey)
{
var have = this.value;
var pos = this.selectionStart;
@@ -5068,6 +5184,12 @@ Auto-backup
return false;
});
+ $('.view-keyboardshortcuts').click(function(){
+ var $div = $('tt .keyboardshortcuts').clone();
+ showOverlay($div);
+ return false;
+ });
+
$('.view-license').click(function(){
var $div = $('tt .license').clone();