Add scripts to create myops-getqueryview:
[myops.git] / web / query / evently / profile / profileReady / selectors / #preview / click.js
1 function() {
2   var f = $(this), app = $$(this).app;
3   var Mustache = app.require("lib/mustache");
4   var markdown = app.require("vendor/couchapp/lib/markdown");
5
6   var c = {
7     name : $$("#profile").profile.nickname,
8     url : $$("#profile").profile.url,
9     avatar : $$("#profile").profile.gravatar_url,
10     html : markdown.encode(Mustache.escape($("[name=comment]", f).val())),
11     created_at : JSON.parse(JSON.stringify(new Date()))
12   };
13   
14   $("#comment-preview").html(Mustache.to_html(app.ddoc.templates.partials.comment, c));
15 };