[Wheat-cvs] r1/web-dev/source/graffiti graffiti.ws,1.2,1.3
Status: Pre-Alpha
Brought to you by:
mark_lentczner
From: Kragen S. <kr...@us...> - 2005-06-07 22:33:59
|
Update of /cvsroot/wheat/r1/web-dev/source/graffiti In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6817/web-dev/source/graffiti Modified Files: graffiti.ws Log Message: Thought I'd committed this yesterday, but apparently there was a network error. Now post-args is a table, not just a /library/base/object. Consequently it should now be safe to handle form posts with form field names like "absolute-path" and "member". Added comments on untested methods. Blog edit doesn't work, but I don't think that's a result of these changes. Index: graffiti.ws =================================================================== RCS file: /cvsroot/wheat/r1/web-dev/source/graffiti/graffiti.ws,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- graffiti.ws 3 Jun 2005 23:20:11 -0000 1.2 +++ graffiti.ws 7 Jun 2005 22:33:50 -0000 1.3 @@ -17,7 +17,7 @@ "For a good time call 867-5309"] } submit(post-args:p, request:r): { - #add(p.new-graffito) + #add(p["new-graffito"]) return $/library/render.redirect(\self, request:r) } template: @@ -85,7 +85,7 @@ <ul id="theWall"> <li tt:name="wall-graffiti"><tt:span tt:name="graffito">Graffito</tt:span></li> </ul> - <form method="POST" onsubmit="invokeAction('hello', 'theWall', {'new-graffito': this['new-graffito'].value}); return false"> + <form method="POST" onsubmit="invokeAction('hello', 'theWall', {'new-graffito': this['new-graffito'].value}); document.body.innerHTML += 'glork'; return false"> <input name="new-graffito" /> <input name="op" value="add" type="submit" /> </form> @@ -163,11 +163,11 @@ test-adding-web(): { wall := \#create-wall what := wall.submit( - post-args:{ - op: "add" - new-graffito: "Hello" - }, - request:#sample-request) + post-args: $/library/base/table.from-array([ + "op", "add", + "new-graffito", "Hello", + ...]), + request: #sample-request) #assert-equals("see-other", what.type) #assert-equals($/library/render.url(\wall, request:#sample-request), what.location) html := wall.render() |