Refactor frontend

* restructured JavaScript using backbone.js
* replaced highlight.js with CodeMirror for its editor
* added CodeMirror Solarized (dark) theme based on Ethan Schoonover's solarized.vim
* changed `POST /document` to accept real JSON
* cleaned up template and stylesheet
This commit is contained in:
Michael Macias 2012-02-18 02:40:56 -06:00
parent 90cfe0ec57
commit 1950cc8db0
10 changed files with 426 additions and 681 deletions

View file

@ -55,7 +55,7 @@ DocumentHandler.prototype.handlePost = function(request, response) {
if (!buffer) {
response.writeHead(200, { 'content-type': 'application/json' });
}
buffer += data.toString();
buffer += JSON.parse(data.toString()).data;
if (_this.maxLength && buffer.length > _this.maxLength) {
cancelled = true;
winston.warn('document >maxLength', { maxLength: _this.maxLength });