From a1af3813d634a876550acc8c3c1019c4c8ddb979 Mon Sep 17 00:00:00 2001 From: Max Ogden Date: Mon, 20 Jun 2011 18:45:01 -0700 Subject: [PATCH] updating to newer jquery and jquery.request.js --- app.js | 9 +- attachments/pages/index.html | 30 ++-- attachments/script/jquery-1.5.min.js | 16 -- attachments/script/jquery-1.6.1.min.js | 18 +++ attachments/script/jquery.request.js | 215 +++++++++++++++++++++++++ 5 files changed, 258 insertions(+), 30 deletions(-) delete mode 100644 attachments/script/jquery-1.5.min.js create mode 100644 attachments/script/jquery-1.6.1.min.js create mode 100644 attachments/script/jquery.request.js diff --git a/app.js b/app.js index 291a70c7..4b955af5 100644 --- a/app.js +++ b/app.js @@ -6,8 +6,8 @@ ddoc = { _id:'_design/removalist' , rewrites : [ {from:"/", to:'pages/index.html'} - , {from:"csv", to:'_list/csv/all'} - , {from:"headers", to:'_list/urlencode/headers', query: {group: true}} + , {from:"/api/csv", to:'_list/csv/all'} + , {from:"/api/headers", to:'_list/urlencode/headers', query: {group: true}} , {from:"/api", to:'../../'} , {from:"/api/*", to:'../../*'} , {from:"/*", to:'*'} @@ -47,7 +47,8 @@ ddoc.lists = { */ csv: function(head, req) { if ('headers' in req.query) { - var headers = JSON.parse(unescape(req.query.headers))[0]; + var headers = JSON.parse(unescape(req.query.headers)); + var row, sep = '\n', headerSent = false, startedOutput = false; start({"headers":{"Content-Type" : "text/csv; charset=utf-8"}}); @@ -69,7 +70,7 @@ ddoc.lists = { send('\n'); } } else { - send("You must pass in the urlencoded headers you wish to build the CSV from. Query /_list/urlencode/headers"); + send("You must pass in the urlencoded headers you wish to build the CSV from. Query /_list/urlencode/headers?group=true"); } }, /** diff --git a/attachments/pages/index.html b/attachments/pages/index.html index 87207e7f..d28c787e 100644 --- a/attachments/pages/index.html +++ b/attachments/pages/index.html @@ -6,8 +6,9 @@ - + +