From a8c37ff6399a66923854dbf50f319d7f46bb20cf Mon Sep 17 00:00:00 2001 From: Ali Movahedi Date: Fri, 2 Jan 2015 23:29:30 +0330 Subject: [PATCH 1/2] Fix app.static directory --- ipsum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipsum.js b/ipsum.js index f00c8e7..17f5e80 100644 --- a/ipsum.js +++ b/ipsum.js @@ -1,7 +1,7 @@ var express = require('express'), app = express(); -app.use(express.static(__dirname + '/ipsum', {maxAge: 60*60*24*7})); +app.use(express.static(__dirname + '/client', {maxAge: 60*60*24*7})); module.exports.app = app; From 4c996020f778ac9290cf3105eeb027b1df973729 Mon Sep 17 00:00:00 2001 From: Ali Movahedi Date: Sat, 3 Jan 2015 12:22:31 +0330 Subject: [PATCH 2/2] Currently, support Delete key and arrow keys --- client/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/js/main.js b/client/js/main.js index 77e9a63..e52bf00 100644 --- a/client/js/main.js +++ b/client/js/main.js @@ -5,7 +5,7 @@ $('li[contenteditable]').click(function(e) { }); $('li[contenteditable]').on('keydown', function(e) { - if(e.keyCode !== 8 && isNaN(+e.key)) return e.preventDefault(); + if([8, 37, 38, 39 ,40, 46].indexOf(e.keyCode) < 0 && isNaN(+e.key)) return e.preventDefault(); }); $('li[contenteditable]').on('keyup', function(e) { $(this).data('val', /\d*/.exec($(this).html()));