Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removing comments altogether

  • Loading branch information...
commit 27cf4fbf6aa8980ede0e4fd9944b3f7425cee9e5 1 parent 69409e3
@maxogden authored
View
20 _attachments/style/main.css
@@ -83,26 +83,6 @@ p.menu a {
background:#ddd;
}
-#comments {
- margin:4px;
- padding:4px;
- background:#FAFAFA;
-}
-
-#comments p {
- margin-bottom:4px;
-}
-
-#comments li {
- margin:4px;
- padding:4px;
- background:#dfdcdf;
-}
-
-#comments ul li {
- list-style-type: none;
-}
-
.date {
font-size:80%
}
View
3  evently/comments/_init/after.js
@@ -1,3 +0,0 @@
-function() {
- $(".date").prettyDate();
-};
View
18 evently/comments/_init/data.js
@@ -1,18 +0,0 @@
-function(view) {
- var docid = $$("#wiki").docid,
- linkup = $$("#wiki").app.require("vendor/couchapp/lib/linkup");
-
- return {
- topic : docid,
- title : $$("#wiki").title,
- comments : view.rows.map(function(r) {
- var by = r.value.by || {};
- return {
- gravatar_url : by.gravatar_url,
- by : by.nickname,
- at : r.key[1],
- comment : linkup.encode(r.value.comment) // move to view
- }
- })
- }
-};
View
23 evently/comments/_init/mustache.html
@@ -1,23 +0,0 @@
-<h3>Comments about {{title}}</h3>
-<ul>
- {{#comments}}
- <li>
- <div class="avatar">
- {{#gravatar_url}}<img src="{{gravatar_url}}"/>{{/gravatar_url}}
- <div class="name">
- {{by}}
- </div>
- </div>
- <p>{{{comment}}}</p>
- <em><span class="date">{{at}}</span></em>
- <div class="clear"></div>
- </li>
- {{/comments}}
-</ul>
-<form>
- <label>Comment</label>
- <br/>
- <textarea name="comment" rows="4" cols="60"></textarea>
- <input type="hidden" name="topic" value="{{topic}}">
- <p><input type="submit" value="Save Comment"></p>
-</form>
View
8 evently/comments/_init/query.js
@@ -1,8 +0,0 @@
-function() {
- var docid = $$("#wiki").docid;
- return {
- view : "recent-comments",
- endkey : [docid, {}],
- startkey : [docid]
- };
-};
View
13 evently/comments/_init/selectors/form/submit.js
@@ -1,13 +0,0 @@
-function() {
- var form = $(this), app = $$(form).app,
- f = form.serializeObject();
- f.type = "comment";
- f.at = new Date();
- f.by = $$("#profile").profile;
- app.db.saveDoc(f, {
- success : function() {
- $("#comments").trigger("_init");
- }
- })
- return false;
-};
View
1  evently/profile/loggedOut/all.html
@@ -1,5 +1,4 @@
<p class="menu">
<a href="../page/index">Home</a>
<a href="../pages/recent">Changes</a>
- <a href="../pages/comments">Comments</a>
</p>
View
1  evently/profile/loggedOut/mustache.html
@@ -1,5 +1,4 @@
<p class="menu">
<a href="../page/index">Home</a>
<a href="../pages/recent">Changes</a>
- <a href="../pages/comments">Comments</a>
</p>
View
1  evently/profile/profileReady/all.html
@@ -4,6 +4,5 @@
<p class="menu">
<a href="../page/index">Home</a>
<a href="../pages/recent">Changes</a>
- <a href="../pages/comments">Comments</a>
</p>
<div style="clear:left;"></div>
View
1  evently/profile/profileReady/mustache.html
@@ -4,6 +4,5 @@
<a href="#/upload">Upload File</a>
<a href="../page/index">Home</a>
<a href="../pages/recent">Changes</a>
- <a href="../pages/comments">Comments</a>
</p>
<div style="clear:left;"></div>
View
18 lists/comments.js
@@ -1,18 +0,0 @@
-function() {
- var row, ddoc = this,
- mustache = require("vendor/couchapp/lib/mustache"),
- markdown = require("vendor/couchapp/lib/markdown"),
- data = {
- title : "All Comments",
- site_title : this.couchapp.name,
- path : "/pages/comments",
- comments : []
- };
- provides("html", function() {
- while (row = getRow()) {
- log(row);
- data.comments.push(row.value)
- }
- send(mustache.to_html(ddoc.templates.comments, data, ddoc.templates.partials));
- });
-};
View
8 rewrites.json
@@ -47,14 +47,6 @@
}
},
{
- "from" : "/pages/comments",
- "to" : "_list/comments/all-comments",
- "query" : {
- "descending" : true,
- "limit" : 20
- }
- },
- {
"from" : "pages/*",
"to" : "../../*"
}
View
29 templates/comments.html
@@ -1,29 +0,0 @@
-{{>header}}
-<ul>
- {{#comments}}
- <li>
- <span class="date">{{at}}</span>:
- {{#by}}{{name}} {{/by}}
- {{^by}}Unknown {{/by}}
- (<a href="../page/{{topic}}">{{topic}}</a>)
- <span class="idontknow">{{comment}}</span>
- </li>
- {{/comments}}
-</ul>
- </body>
- <script src="/script/myloader.js"></script>
- <script src="/_utils/script/base64.js"></script>
- <script type="text/javascript" charset="utf-8">
- $.couch.app(function(app) {
- $(".date").prettyDate();
- $("#account").evently("account", app);
- var pr = app.ddoc.evently.profile.profileReady;
- pr.mustache = pr.all; // mod the template for this page
- $("#profile").evently("profile", app);
- $.evently.connect("#account","#profile", ["loggedIn","loggedOut"]);
- },{
- db : "pages",
- design : "pages"
- });
- </script>
-</html>
View
2  templates/page.html
@@ -1,7 +1,6 @@
{{>header}}
<div id="tools"></div>
<div id="wiki"><div class="wiki">{{{body}}}</div></div>
- <div id="comments"></div>
{{#has_atts}}
<div id="files">
<p>Files attached to <em>{{title}}</em>:</p>
@@ -31,7 +30,6 @@
$$("#wiki").docid = {{docid}};
$$("#wiki").title = {{title_json}};
$("#wiki").evently("wiki", app);
- $("#comments").evently("comments", app);
$("#tools").evently("tools", app);
$.pathbinder.begin("{{begin}}");
}, opts);
View
5 views/all-comments/map.js
@@ -1,5 +0,0 @@
-function(doc) {
- if (doc.type == "comment" && doc.comment) {
- emit(doc.at, doc);
- }
-};
View
5 views/recent-comments/map.js
@@ -1,5 +0,0 @@
-function(doc) {
- if (doc.type == "comment") {
- emit([doc.topic, doc.at], doc);
- }
-};
Please sign in to comment.
Something went wrong with that request. Please try again.