WIP on the dialog for history

This commit is contained in:
azivner
2017-09-21 22:20:10 -04:00
parent 8ec2c6c338
commit 647bbcaee1
5 changed files with 61 additions and 12 deletions

View File

@@ -20,25 +20,29 @@ $(function() {
jQuery.hotkeys.options.filterInputAcceptingElements = true;
jQuery.hotkeys.options.filterContentEditable = true;
$(document).bind('keydown', 'alt+h', function() {
const toggle = $(".hide-toggle");
const hidden = toggle.css('display') === 'none';
toggle.css('display', hidden ? 'block' : 'none');
$("#noteDetailWrapper").css("width", hidden ? "750px" : "100%");
});
// $(document).bind('keydown', 'alt+h', function() {
// const toggle = $(".hide-toggle");
// const hidden = toggle.css('display') === 'none';
//
// toggle.css('display', hidden ? 'block' : 'none');
//
// $("#noteDetailWrapper").css("width", hidden ? "750px" : "100%");
// });
$(document).bind('keydown', 'alt+s', function() {
$("input[name=search]").focus();
});
function formatDate(date) {
const dateString = date.getDate() + ". " + (date.getMonth() + 1) + ". " + date.getFullYear() + " " +
date.getHours() + ":" + date.getMinutes();
return dateString;
}
// hide (toggle) everything except for the note content for distraction free writing
$(document).bind('keydown', 'alt+t', function() {
const date = new Date();
const dateString = date.getDate() + ". " + (date.getMonth() + 1) + ". " + date.getFullYear() + " " +
date.getHours() + ":" + date.getMinutes();
const dateString = formatDate(date);
$('#noteDetail').summernote('insertText', dateString);
});