Loading lib/document_handler.js +1 −2 Original line number Diff line number Diff line Loading @@ -32,11 +32,10 @@ DocumentHandler.prototype.handlePost = function(request, response) { }); request.on('end', function(end) { winston.verbose('added document', { key: key }); response.end(JSON.stringify({ uuid: key })); response.end(JSON.stringify({ key: key })); }); request.on('error', function(error) { // TODO handle error // TODO rename key to uuid everywhere behind the scenes // TODO finish all TODOs }); }; Loading static/application.js +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ heist_document.prototype.load = function(key, callback) { var high = hljs.highlightAuto(res.data); callback({ value: high.value, uuid: key, key: key, language: high.language }); } Loading Loading @@ -48,7 +48,7 @@ heist_document.prototype.save = function(data, callback) { var high = hljs.highlightAuto(data); callback({ value: high.value, uuid: res.uuid, key: res.key, language: high.language }); } Loading Loading @@ -115,7 +115,7 @@ heist.prototype.lockDocument = function() { if (ret) { _this.$code.html(ret.value); _this.setTitle(ret.language ? ret.language : 'unknown'); window.history.pushState(null, _this.appName + '-' + ret.uuid, '/' + ret.uuid); window.history.pushState(null, _this.appName + '-' + ret.key, '/' + ret.key); _this.$textarea.val('').hide(); _this.$box.show(); } Loading Loading
lib/document_handler.js +1 −2 Original line number Diff line number Diff line Loading @@ -32,11 +32,10 @@ DocumentHandler.prototype.handlePost = function(request, response) { }); request.on('end', function(end) { winston.verbose('added document', { key: key }); response.end(JSON.stringify({ uuid: key })); response.end(JSON.stringify({ key: key })); }); request.on('error', function(error) { // TODO handle error // TODO rename key to uuid everywhere behind the scenes // TODO finish all TODOs }); }; Loading
static/application.js +3 −3 Original line number Diff line number Diff line Loading @@ -20,7 +20,7 @@ heist_document.prototype.load = function(key, callback) { var high = hljs.highlightAuto(res.data); callback({ value: high.value, uuid: key, key: key, language: high.language }); } Loading Loading @@ -48,7 +48,7 @@ heist_document.prototype.save = function(data, callback) { var high = hljs.highlightAuto(data); callback({ value: high.value, uuid: res.uuid, key: res.key, language: high.language }); } Loading Loading @@ -115,7 +115,7 @@ heist.prototype.lockDocument = function() { if (ret) { _this.$code.html(ret.value); _this.setTitle(ret.language ? ret.language : 'unknown'); window.history.pushState(null, _this.appName + '-' + ret.uuid, '/' + ret.uuid); window.history.pushState(null, _this.appName + '-' + ret.key, '/' + ret.key); _this.$textarea.val('').hide(); _this.$box.show(); } Loading