diff --git a/app/assets/javascripts/app/views/stream_post_views.js b/app/assets/javascripts/app/views/stream_post_views.js index c91ddc27d..2c772c4af 100644 --- a/app/assets/javascripts/app/views/stream_post_views.js +++ b/app/assets/javascripts/app/views/stream_post_views.js @@ -117,16 +117,18 @@ app.views.StreamPost = app.views.Post.extend({ }, createParticipation: function (evt) { + if(evt) { evt.preventDefault(); } that = this; - $.post("/posts/" + this.model.get("id") + "/participation", {}, function () { + $.post(Routes.post_participation_path(this.model.get("id")), {}, function () { that.model.set({participation: true}); that.render(); }); }, destroyParticipation: function (evt) { + if(evt) { evt.preventDefault(); } that = this; - $.post("/posts/" + this.model.get("id") + "/participation", { _method: "delete" }, function () { + $.post(Routes.post_participation_path(this.model.get("id")), { _method: "delete" }, function () { that.model.set({participation: false}); that.render(); }); diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 9e45891b6..65f0771cd 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -281,20 +281,18 @@ ul.as-selections { } .create_participation { display: inline-block; - .icons-create-participation { + .icons-create_participation { height: 14px; width: 14px; - background: image-url("icons/create_participation.png") center; } } .destroy_participation { display: inline-block; - .icons-destroy-participation { + .icons-destroy_participation { height: 14px; width: 14px; - background: image-url("icons/destroy_participation.png") center; } - } + } .delete { display: inline-block; .icons-deletelabel { diff --git a/app/assets/templates/stream-element_tpl.jst.hbs b/app/assets/templates/stream-element_tpl.jst.hbs index 24d976dc8..4ed0daeb9 100644 --- a/app/assets/templates/stream-element_tpl.jst.hbs +++ b/app/assets/templates/stream-element_tpl.jst.hbs @@ -18,13 +18,13 @@ {{#if participation}} - + {{else}} - + - {{/if}} + {{/if}} @@ -35,7 +35,7 @@ {{/unless}} {{/if}} - +