Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show 'stop ignoring' button in hovercards
- Loading branch information
kas70
committed
Apr 21, 2018
1 parent
c84411e
commit a271616
Showing
5 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later | ||
|
||
app.views.UnblockPerson = app.views.Base.extend({ | ||
templateName: "unblock_person", | ||
|
||
events: { | ||
"click #unblock_user_button": "unblock" | ||
}, | ||
|
||
initialize: function(opts) { | ||
_.extend(this, opts); | ||
this.parent = opts.parent; | ||
}, | ||
|
||
unblock: function() { | ||
var unblock = this.person.unblock(); | ||
var that = this; | ||
|
||
unblock.fail(function() { | ||
app.flashMessages.error(Diaspora.I18.t("unblock_failed")); | ||
}); | ||
|
||
unblock.done(function() { | ||
that.parent._populateHovercard(); | ||
}); | ||
return false; | ||
} | ||
}); | ||
// @license-end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<button id="unblock_user_button" class="btn btn-danger"> | ||
<span class="text">{{ t "people.stop_ignoring" }}</span> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters