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:
parent
90cfe0ec57
commit
1950cc8db0
10 changed files with 426 additions and 681 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue