From fe8df046daa72d033f5e1f673a9a33eb84e0b0f1 Mon Sep 17 00:00:00 2001 From: Max Ogden Date: Fri, 16 Sep 2011 21:56:23 -0700 Subject: [PATCH] better error messages, more robust csv uploading --- app.js | 6 -- attachments/pages/index.html | 82 +++++++++++-------------- attachments/script/costco-csv-worker.js | 6 +- attachments/script/costco.js | 51 +++++++++------ attachments/script/deps-min.js | 19 ++++++ attachments/script/lib/jquery.couch2.js | 27 +++++++- attachments/script/recline.js | 36 ++++++----- attachments/script/site.js | 8 ++- attachments/script/util.js | 2 +- attachments/style/data-table.css | 6 +- 10 files changed, 145 insertions(+), 98 deletions(-) create mode 100644 attachments/script/deps-min.js diff --git a/app.js b/app.js index 6f0a87a7..d9e5405a 100755 --- a/app.js +++ b/app.js @@ -115,12 +115,6 @@ ddoc.lists = { } } -ddoc.validate_doc_update = function (newDoc, oldDoc, userCtx) { - if (newDoc._deleted === true && userCtx.roles.indexOf('_admin') === -1) { - throw "Only admin can delete documents on this database."; - } -}; - couchapp.loadAttachments(ddoc, path.join(__dirname, 'attachments')); module.exports = ddoc; \ No newline at end of file diff --git a/attachments/pages/index.html b/attachments/pages/index.html index cf239a7e..6b838302 100755 --- a/attachments/pages/index.html +++ b/attachments/pages/index.html @@ -6,16 +6,8 @@ - - - - - - - - - + @@ -32,7 +24,10 @@
-
+
+
+
+
@@ -94,43 +89,40 @@ @@ -304,7 +296,7 @@ Paste in an array of JSON objects representing the documents that you would like to insert into the database.

- [{woo: "pizza"}, {tasty: "muffins"}] + [{"woo": "pizza"}, {"tasty": "muffins"}]