Permalink
Browse files

Updated documentation; add jQuery form plugin

  • Loading branch information...
1 parent 83c0fae commit 59877eec7af08c45f2ad142b9fead13fa2fca400 @henrypoydar committed Aug 5, 2009
View
@@ -27,6 +27,7 @@ The [Processing.js](http://processingjs.org) Javascript extension is used to dis
* Sketches to include attached images
* Separate production deploy
* Preview on creation
+* Delete renderings
* Endless pagination
* Start/stop animated documents
* Image uploading
@@ -2,7 +2,7 @@
<canvas id="view" class="new preview center"></canvas>
-<form action="#/manage/new" method="post" class="processing">
+<form action="#/manage/new" method="post" class="processing" id="sketch_form" enctype="multipart/form-data">
<p>
<label for="sketch_name">Sketch name:</label>
@@ -23,6 +23,11 @@
</p>
<p>
+ <label for="sketch_file" class="inline">Sketch file: (optional)</label>
+ <input type="file" name="sketch_file" />
+ </p>
+
+ <p>
<input type="button" name="preview" value="Preview" id="preview_sketch" class="preview" />
<input type="submit" name="add" value="Add" id="add_sketch" />
<small><a href="#/manage">Cancel</a></small>
@@ -10,5 +10,6 @@ $(document).ready(function() {
$(this).show();
});
});
+
});
@@ -52,12 +52,16 @@
var ctx = this;
var date = new Date();
var sketch_name = (ctx.params['sketch_name'].blank() ? ('Untitled ' + date) : ctx.params['sketch_name']);
+
+ console.log(ctx.params);
+
couchapp.db.saveDoc(
{
type: 'sketch',
created_at: date.toJSON(),
name: sketch_name,
- code: ctx.params['sketch_code']
+ code: ctx.params['sketch_code'],
+ //"_attachments": { ctx.params['sketch_file'] }
}, {
success: function(json) {
flash = {
Oops, something went wrong.

0 comments on commit 59877ee

Please sign in to comment.