parent
cb706010ff
commit
c805ee2cec
2 changed files with 2 additions and 3 deletions
|
|
@ -41,7 +41,6 @@ app.views.ProfileHeader = app.views.Base.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
postRenderTemplate: function() {
|
postRenderTemplate: function() {
|
||||||
var self = this;
|
|
||||||
var dropdownEl = this.$('.aspect_membership_dropdown.placeholder');
|
var dropdownEl = this.$('.aspect_membership_dropdown.placeholder');
|
||||||
if( dropdownEl.length === 0 ) {
|
if( dropdownEl.length === 0 ) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ app.views.StreamPost = app.views.Post.extend({
|
||||||
|
|
||||||
createParticipation: function (evt) {
|
createParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
that = this;
|
var that = this;
|
||||||
$.post(Routes.postParticipation(this.model.get("id")), {}, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), {}, function () {
|
||||||
that.model.set({participation: true});
|
that.model.set({participation: true});
|
||||||
that.render();
|
that.render();
|
||||||
|
|
@ -128,7 +128,7 @@ app.views.StreamPost = app.views.Post.extend({
|
||||||
|
|
||||||
destroyParticipation: function (evt) {
|
destroyParticipation: function (evt) {
|
||||||
if(evt) { evt.preventDefault(); }
|
if(evt) { evt.preventDefault(); }
|
||||||
that = this;
|
var that = this;
|
||||||
$.post(Routes.postParticipation(this.model.get("id")), { _method: "delete" }, function () {
|
$.post(Routes.postParticipation(this.model.get("id")), { _method: "delete" }, function () {
|
||||||
that.model.set({participation: false});
|
that.model.set({participation: false});
|
||||||
that.render();
|
that.render();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue