Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moved presentational stuff out of the view, into the list

  • Loading branch information...
commit 3ad9de4f8ee7457fa592c67aec66b9502dddca8f 1 parent 6e111ed
@cdcarter authored
Showing with 5 additions and 6 deletions.
  1. +5 −0 lists/shows.js
  2. +0 −6 views/shows/map.js
View
5 lists/shows.js
@@ -14,6 +14,11 @@ function(head,req) {
var doc = row.value;
doc.venue = row.key;
doc.link = path.rewrite(doc.id)
+ if (doc.perfd==0) {
+ doc.perfd = "None";
+ doc.avg = "None";
+ doc.latest = "None";
+ }
send(mustache.to_html(ddoc.templates.listline,doc))
}
View
6 views/shows/map.js
@@ -4,12 +4,6 @@ function(doc) {
avgs = calc.avg(doc)
guess = calc.guess(doc,avgs)
- if (avgs.perfd==0) {
- avgs.perfd = "None";
- avgs.avg = "None";
- avgs.latest = "None";
- }
-
emit(doc.venue,{"name":doc.name, "avg": avgs.avg, "latest": avgs.latest, "perfd": avgs.perfd, "id": doc._id,"guess":guess})
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.