From 315b0b66b907613e7639c54f37b8523c05407ce5 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 15 Jan 2012 23:43:57 +0100 Subject: [PATCH] Add the title field to the model --- plemp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plemp.js b/plemp.js index 4d61a28..bab3382 100644 --- a/plemp.js +++ b/plemp.js @@ -84,6 +84,7 @@ app.post('/draggables', function(req, res) { } draggables[file_id] = { name: files.file.filename, mime: file_mime, + title: fields.title, top: 200, left: 350 }; } @@ -100,7 +101,7 @@ app.get('/draggables/:id', function(req, res) { // Stuff taken from the Camping implementation. var drag = draggables[drag_id]; var default_style = "left:" + drag.left + "px;top:" + drag.top + "px;"; - var title = drag.name || drag.title || 'Title not set'; + var title = drag.title || drag.name || 'Title not set'; var content; var mime_type = drag.mime.split("/") switch (mime_type[0]) {