Permalink
Browse files

Somewhat working step 1.

  • Loading branch information...
0 parents commit c6255e13c2e097c849d7f675a565e5d385865fb6 @dustin committed Jul 6, 2011
Showing with 6,917 additions and 0 deletions.
  1. +6 −0 .couchappignore
  2. +11 −0 .gitignore
  3. +22 −0 _attachments/index.html
  4. +75 −0 _attachments/style/main.css
  5. +1 −0 _id
  6. +4 −0 couchapp.json
  7. +20 −0 evently/items/_changes/after.js
  8. +8 −0 evently/items/_changes/data.js
  9. +16 −0 evently/items/_changes/mustache.html
  10. +6 −0 evently/items/_changes/query.json
  11. +14 −0 evently/profile/profileReady/mustache.html
  12. +12 −0 evently/profile/profileReady/selectors/form/submit.js
  13. +1 −0 language
  14. +2,858 −0 tools/feedparser.py
  15. +70 −0 tools/fetch.py
  16. +4 −0 updates/set_state.js
  17. +239 −0 vendor/couchapp/_attachments/jquery.couch.app.js
  18. +90 −0 vendor/couchapp/_attachments/jquery.couch.app.util.js
  19. +399 −0 vendor/couchapp/_attachments/jquery.evently.js
  20. +346 −0 vendor/couchapp/_attachments/jquery.mustache.js
  21. +174 −0 vendor/couchapp/_attachments/jquery.pathbinder.js
  22. +17 −0 vendor/couchapp/_attachments/loader.js
  23. +22 −0 vendor/couchapp/evently/README.md
  24. +16 −0 vendor/couchapp/evently/account/_init.js
  25. +1 −0 vendor/couchapp/evently/account/adminParty/mustache.html
  26. +10 −0 vendor/couchapp/evently/account/doLogin.js
  27. +8 −0 vendor/couchapp/evently/account/doLogout.js
  28. +10 −0 vendor/couchapp/evently/account/doSignup.js
  29. +4 −0 vendor/couchapp/evently/account/loggedIn/after.js
  30. +7 −0 vendor/couchapp/evently/account/loggedIn/data.js
  31. +4 −0 vendor/couchapp/evently/account/loggedIn/mustache.html
  32. +3 −0 vendor/couchapp/evently/account/loggedIn/selectors.json
  33. +1 −0 vendor/couchapp/evently/account/loggedOut/mustache.html
  34. +4 −0 vendor/couchapp/evently/account/loggedOut/selectors.json
  35. +3 −0 vendor/couchapp/evently/account/loginForm/after.js
  36. +6 −0 vendor/couchapp/evently/account/loginForm/mustache.html
  37. +6 −0 vendor/couchapp/evently/account/loginForm/selectors/form/submit.js
  38. +3 −0 vendor/couchapp/evently/account/signupForm/after.js
  39. +6 −0 vendor/couchapp/evently/account/signupForm/mustache.html
  40. +6 −0 vendor/couchapp/evently/account/signupForm/selectors/form/submit.js
  41. +21 −0 vendor/couchapp/evently/profile/loggedIn.js
  42. +3 −0 vendor/couchapp/evently/profile/loggedOut/after.js
  43. +1 −0 vendor/couchapp/evently/profile/loggedOut/mustache.html
  44. +3 −0 vendor/couchapp/evently/profile/noProfile/data.js
  45. +11 −0 vendor/couchapp/evently/profile/noProfile/mustache.html
  46. +36 −0 vendor/couchapp/evently/profile/noProfile/selectors/form/submit.js
  47. +3 −0 vendor/couchapp/evently/profile/profileReady/after.js
  48. +3 −0 vendor/couchapp/evently/profile/profileReady/data.js
  49. +8 −0 vendor/couchapp/evently/profile/profileReady/mustache.html
  50. +39 −0 vendor/couchapp/lib/atom.js
  51. +25 −0 vendor/couchapp/lib/cache.js
  52. +20 −0 vendor/couchapp/lib/code.js
  53. +121 −0 vendor/couchapp/lib/docform.js
  54. +18 −0 vendor/couchapp/lib/linkup.js
  55. +13 −0 vendor/couchapp/lib/list.js
  56. +1,300 −0 vendor/couchapp/lib/markdown.js
  57. +261 −0 vendor/couchapp/lib/md5.js
  58. +339 −0 vendor/couchapp/lib/mustache.js
  59. +87 −0 vendor/couchapp/lib/path.js
  60. +8 −0 vendor/couchapp/lib/redirect.js
  61. +21 −0 vendor/couchapp/lib/utils.js
  62. +53 −0 vendor/couchapp/lib/validate.js
  63. +5 −0 vendor/couchapp/metadata.json
  64. +5 −0 views/recent-items/map.js
@@ -0,0 +1,6 @@
+[
+ ".*\\.swp$",
+ ".*~$",
+ "^compass.*",
+ "^tools.*"
+]
@@ -0,0 +1,11 @@
+#*
+*#
+*.pyc
+*~
+.#*
+.DS_Store
+/.couchapprc
+/_attachments/style/ie.css
+/_attachments/style/print.css
+/_attachments/style/screen.css
+/compass/.sass-cache/
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>README</title>
+ <link rel="stylesheet" href="style/main.css" type="text/css">
+ </head>
+ <body>
+ <h1>README</h1>
+
+ <div id="items"></div>
+
+ <div id="sidebar">
+ <p>Some tools here would be nice.</p>
+ </div>
+ </body>
+ <script src="vendor/couchapp/loader.js"></script>
+ <script type="text/javascript" charset="utf-8">
+ $.couch.app(function(app) {
+ $("#items").evently("items", app);
+ });
+ </script>
+</html>
@@ -0,0 +1,75 @@
+/* add styles here */
+
+body {
+ font:1em Helvetica, sans-serif;
+ padding:4px;
+}
+
+h1 {
+ margin-top:0;
+}
+
+#account {
+ float:right;
+}
+
+#profile {
+ border:4px solid #edd;
+ background:#fee;
+ padding:8px;
+ margin-bottom:8px;
+}
+
+#items {
+ border:4px solid #dde;
+ background:#eef;
+ padding:8px;
+ width:60%;
+ float:left;
+}
+
+#sidebar {
+ border:4px solid #dfd;
+ padding:8px;
+ float:right;
+ width:30%;
+}
+
+#items li {
+ border:4px solid #f5f5ff;
+ background:#fff;
+ padding:8px;
+ margin:4px 0;
+}
+
+form {
+ padding:4px;
+ margin:6px;
+ background-color:#ddd;
+}
+
+div.avatar {
+ padding:2px;
+ padding-bottom:0;
+ margin-right:4px;
+ float:left;
+ font-size:0.78em;
+ width : 60px;
+ height : 60px;
+ text-align: center;
+}
+
+div.avatar .name {
+ padding-top:2px;
+}
+
+div.avatar img {
+ margin:0 auto;
+ padding:0;
+ width : 40px;
+ height : 40px;
+}
+
+#items ul {
+ list-style: none;
+}
1 _id
@@ -0,0 +1 @@
+_design/app
@@ -0,0 +1,4 @@
+{
+ "name": "Name of your CouchApp",
+ "description": "CouchApp"
+}
@@ -0,0 +1,20 @@
+function(me, args) {
+ var app = $$(this).app;
+ var baseUri = app.db.uri;
+ var ddoc = app.ddoc._id;
+
+ $(".statechange").each(function(a, el) {
+ var parts = el.id.split('-');
+ $(el).click(function() {
+ $.ajax({type: 'POST',
+ url: baseUri + ddoc + "/_update/set_state/" + parts[1],
+ data: 'new_state=' + encodeURIComponent(parts[0]),
+ dataType: "json",
+ complete: function(res) {
+ console.log("Result", res);
+ }});
+
+ return false;
+ });
+ });
+}
@@ -0,0 +1,8 @@
+function(data) {
+ var p;
+ return {
+ items : data.rows.map(function(r) {
+ return r.doc;
+ })
+ };
+};
@@ -0,0 +1,16 @@
+<h1>Recent Messages</h1>
+<ul id="items">
+ {{#items}}
+ <li>
+ <div class="header">
+ <img src="{{rm_favicon}}" alt="favicon" /><span class="name">{{author}}</span>
+ - <a href="{{link}}" class="title">{{title}}</a>
+ [<a href="#" class="statechange" id="uninteresting-{{_id}}" title="uninteresting">U</a>,
+ <a href="#" class="statechange" id="important-{{_id}}" title="important">!</a>]
+ </div>
+ <div id="message">{{{summary}}}</div>
+ <div style="clear:left;"></div>
+ </li>
+ {{/items}}
+</ul>
+
@@ -0,0 +1,6 @@
+{
+ "view" : "recent-items",
+ "descending" : "true",
+ "limit" : 50,
+ "include_docs": "true"
+}
@@ -0,0 +1,14 @@
+<p>Most applications will customize this template (<tt>ddoc.evently.profile.profileReady.mustache</tt>) for user input.</p>
+
+<div class="avatar">
+ {{#gravatar_url}}<img src="{{gravatar_url}}"/>{{/gravatar_url}}
+ <div class="name">
+ {{name}}
+ </div>
+</div>
+
+<form>
+ <label>New message from {{nickname}}: <input type="text" name="message" size=60 value=""></label>
+</form>
+
+<div style="clear:left;"></div>
@@ -0,0 +1,12 @@
+function() {
+ var form = $(this);
+ var fdoc = form.serializeObject();
+ fdoc.created_at = new Date();
+ fdoc.profile = $$("#profile").profile;
+ $$(this).app.db.saveDoc(fdoc, {
+ success : function() {
+ form[0].reset();
+ }
+ });
+ return false;
+};
@@ -0,0 +1 @@
+javascript
Oops, something went wrong.

0 comments on commit c6255e1

Please sign in to comment.