Skip to content
Browse files

Handling public event

  • Loading branch information...
1 parent 8fcef11 commit 3b8234fda1cabe4bcb856a1e62dcc2d03a44766a @zmoazeni committed May 11, 2012
Showing with 12 additions and 2 deletions.
  1. +2 −2 coffee/site.coffee
  2. +6 −0 coffee/views.coffee
  3. +2 −0 js/site.js
  4. +2 −0 js/views.js
View
4 coffee/site.coffee
@@ -90,6 +90,7 @@ class Event extends Spine.Model
FollowEvent:"follow"
WatchEvent: "watch"
GollumEvent:"gollum"
+ PublicEvent:"public"
DeleteEvent: "skip"
MemberEvent: "skip"
@@ -126,8 +127,7 @@ class Event extends Spine.Model
viewInfo: ->
view = @viewType()
context = switch view
- when "repository", "watch"
- {}
+ when "repository", "watch", "public" then {}
when "item"
{title:@type}
when "gist"
View
6 coffee/views.coffee
@@ -129,6 +129,12 @@ views["repository"] = """
</li>
"""
+views["public"] = """
+<li class="prominent" data-id="{{id}}">
+ <div class="well">Made public: <a href="{{repo_url}}">{{repo}}</a> <div>{{date}}</div></div>
+</li>
+"""
+
views["watch"] = """
<li class="item" data-id="{{id}}" data-type="{{type}}">
<span class="corner"></span>
View
2 js/site.js
@@ -173,6 +173,7 @@
FollowEvent: "follow",
WatchEvent: "watch",
GollumEvent: "gollum",
+ PublicEvent: "public",
DeleteEvent: "skip",
MemberEvent: "skip",
DownloadEvent: "skip",
@@ -245,6 +246,7 @@
switch (view) {
case "repository":
case "watch":
+ case "public":
return {};
case "item":
return {
View
2 js/views.js
@@ -28,6 +28,8 @@
views["repository"] = "<li class=\"prominent\" data-id=\"{{id}}\">\n <div class=\"well\">Created: <a href=\"{{repo_url}}\">{{repo}}</a> <div>{{date}}</div></div>\n</li>";
+ views["public"] = "<li class=\"prominent\" data-id=\"{{id}}\">\n <div class=\"well\">Made public: <a href=\"{{repo_url}}\">{{repo}}</a> <div>{{date}}</div></div>\n</li>";
+
views["watch"] = "<li class=\"item\" data-id=\"{{id}}\" data-type=\"{{type}}\">\n <span class=\"corner\"></span>\n <h1>Began watching <a href=\"{{repo_url}}\">{{repo}}</a></h1>\n <span class=\"date\">{{date}}</span>\n</li>";
views["branch"] = "<li class=\"item\" data-id=\"{{id}}\" data-type=\"{{type}}\">\n <span class=\"corner\"></span>\n <h1>Branched <a href=\"{{url}}\">{{name}}</a> from <a href=\"{{repo_url}}\">{{repo}}</a></h1>\n <span class=\"date\">{{date}}</span>\n</li>";

0 comments on commit 3b8234f

Please sign in to comment.
Something went wrong with that request. Please try again.