diff --git a/app/assets/images/img/glyphicons-halflings-green.png b/app/assets/images/img/glyphicons-halflings-green.png deleted file mode 100644 index 1907d9bf3..000000000 Binary files a/app/assets/images/img/glyphicons-halflings-green.png and /dev/null differ diff --git a/app/assets/javascripts/app/models/post.js b/app/assets/javascripts/app/models/post.js index d4b315cb3..96657900d 100644 --- a/app/assets/javascripts/app/models/post.js +++ b/app/assets/javascripts/app/models/post.js @@ -31,34 +31,6 @@ app.models.Post = Backbone.Model.extend(_.extend({}, app.models.formatDateMixin, return this.get("author") }, - toggleFollow : function() { - var userParticipation = this.get("user_participation"); - if(userParticipation) { - this.unfollow(); - } else { - this.follow(); - } - }, - - follow : function() { - var self = this; - this.participations.create({}, {success : function(resp){ - self.set(resp) - self.trigger('interacted', self) - }}); - }, - - unfollow : function() { - var self = this; - var participationModel = new app.models.Participation(this.get("user_participation")); - participationModel.url = this.participations.url + "/" + participationModel.id; - - participationModel.destroy({success : function(model, resp){ - self.set(resp); - self.trigger('interacted', this) - }}); - }, - toggleLike : function() { var userLike = this.get("user_like") if(userLike) { diff --git a/app/assets/javascripts/app/views/feedback_view.js b/app/assets/javascripts/app/views/feedback_view.js index 12dfc2a10..869f27042 100644 --- a/app/assets/javascripts/app/views/feedback_view.js +++ b/app/assets/javascripts/app/views/feedback_view.js @@ -6,7 +6,6 @@ app.views.Feedback = app.views.Base.extend({ events: { "click .like_action" : "toggleLike", - "click .participate_action" : "toggleFollow", "click .reshare_action" : "resharePost" }, @@ -20,11 +19,6 @@ app.views.Feedback = app.views.Base.extend({ }) }, - toggleFollow : function(evt) { - if(evt) { evt.preventDefault(); } - this.model.toggleFollow(); - }, - toggleLike: function(evt) { if(evt) { evt.preventDefault(); } this.model.toggleLike(); diff --git a/app/assets/javascripts/app/views/post-viewer/feedback.js b/app/assets/javascripts/app/views/post-viewer/feedback.js index 1e10ed387..7f8584ba4 100644 --- a/app/assets/javascripts/app/views/post-viewer/feedback.js +++ b/app/assets/javascripts/app/views/post-viewer/feedback.js @@ -10,7 +10,6 @@ app.views.PostViewerFeedback = app.views.Feedback.extend({ "click *[rel='auth-required']" : "requireAuth", "click .like" : "toggleLike", - "click .follow" : "toggleFollow", "click .reshare" : "resharePost", "click *[rel='invoke-interaction-pane']" : "invokePane", diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/new_styles/_base.scss index ecad34803..934f2ebfa 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/new_styles/_base.scss @@ -5,7 +5,6 @@ a { color : rgb(42,156,235) } /* bootstrap extentions */ .icon-red { background-image: image_url("img/glyphicons-halflings-red.png"); } -.icon-green { background-image: image_url("img/glyphicons-halflings-green.png"); } .icon-blue { background-image: image_url("img/glyphicons-halflings-blue.png"); } @media (max-width: 770px) { //why is 770 a magic number? diff --git a/app/assets/templates/feedback.jst.hbs b/app/assets/templates/feedback.jst.hbs index 472cf0b0c..f22facbd2 100644 --- a/app/assets/templates/feedback.jst.hbs +++ b/app/assets/templates/feedback.jst.hbs @@ -13,14 +13,6 @@ – - - {{#if user_participation}} - {{t "stream.unfollow"}} - {{else}} - {{t "stream.follow"}} - {{/if}} - {{#if user_like}} diff --git a/app/assets/templates/post-viewer/feedback.jst.hbs b/app/assets/templates/post-viewer/feedback.jst.hbs index 4540cd92f..742d052c5 100644 --- a/app/assets/templates/post-viewer/feedback.jst.hbs +++ b/app/assets/templates/post-viewer/feedback.jst.hbs @@ -7,15 +7,6 @@ {{likes_count}} - - {{#if user_participation}} - - {{else}} - - {{/if}} - {{participations_count}} - - {{#if userCanReshare}} {{#if user_reshare}} diff --git a/app/assets/templates/post-viewer/reactions.jst.hbs b/app/assets/templates/post-viewer/reactions.jst.hbs index c4217b591..9221f9bf9 100644 --- a/app/assets/templates/post-viewer/reactions.jst.hbs +++ b/app/assets/templates/post-viewer/reactions.jst.hbs @@ -15,23 +15,6 @@ {{/if}} -{{# if participations}} -
-
-
- -
-
- {{#each participations}} - {{#linkToPerson author}} - {{{personImage this "small" "micro"}}} - {{/linkToPerson}} - {{/each}} -
-
-
-{{/if}} - {{# if reshares}}
diff --git a/spec/javascripts/app/models/post_spec.js b/spec/javascripts/app/models/post_spec.js index 6d9f75070..90dbca87c 100644 --- a/spec/javascripts/app/models/post_spec.js +++ b/spec/javascripts/app/models/post_spec.js @@ -75,43 +75,4 @@ describe("app.models.Post", function() { expect(app.models.Like.prototype.destroy).toHaveBeenCalled(); }) }) - - describe("toggleFollow", function(){ - it("calls unfollow when the user_participation exists", function(){ - this.post.set({user_participation: "123"}); - spyOn(this.post, "unfollow").andReturn(true); - - this.post.toggleFollow(); - expect(this.post.unfollow).toHaveBeenCalled(); - }) - - it("calls follow when the user_participation does not exist", function(){ - this.post.set({user_participation: null}); - spyOn(this.post, "follow").andReturn(true); - - this.post.toggleFollow(); - expect(this.post.follow).toHaveBeenCalled(); - }) - }) - - describe("follow", function(){ - it("calls create on the participations collection", function(){ - spyOn(this.post.participations, "create"); - - this.post.follow(); - expect(this.post.participations.create).toHaveBeenCalled(); - }) - }) - - describe("unfollow", function(){ - it("calls destroy on the participations collection", function(){ - var participation = new app.models.Participation(); - this.post.set({user_participation : participation.toJSON()}) - - spyOn(app.models.Participation.prototype, "destroy"); - - this.post.unfollow(); - expect(app.models.Participation.prototype.destroy).toHaveBeenCalled(); - }) - }) });