New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add confirmation prompt when deleting chat messages #2545
Conversation
@@ -169,12 +169,13 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', ' | |||
$scope.deleteChatMessage = function(group, message){ | |||
if(message.uuid === User.user.id || (User.user.backer && User.user.contributor.admin)){ | |||
var previousMsg = (group.chat && group.chat[0]) ? group.chat[0].id : false; | |||
Groups.Group.deleteChatMessage({gid:group._id, messageId:message.id, previousMsg:previousMsg}, undefined, function(data){ | |||
if(data.chat) group.chat = data.chat; | |||
if(confirm('Are you sure you want to delete this message?')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may want a {
here, since the next stuff spans multiple expressions? Also, shoot me an email sometime, would like to invite you to the contrib guild (it's a G+ community)
@lefnire done and done. =] |
…res.json(500,{err:err}). Let the top-level error handler handle this (needed for upcoming versionerror discarding)
err-back of batch updates
Replace hard-coded strings for window.env.t on js files
…pp.json, move env.t client code to own file, add env.isStaticPage (from isFrontPage)
…o restart cluster workers
Updating Looking for Group to the proper (not dead) link.
…icked this" This reverts commit 2d4d103.
Ok, just fucked this up. Closing and opening a new one. |
@lefnire is this confirmation prompt wanted? |
I don't know if @lefnire wants it, but I am super afraid I'm going to On Fri, Feb 7, 2014 at 1:13 PM, Marcelo Sizer notifications@github.comwrote:
|
Goodness, I'm having trouble following this thread. Yes we want confirmation-before-deletion. Did something else accidentally get merged? |
Ignore all comments before my last one... I decided to try fetching and rebasing this old branch to see what would happened and voila! =p I'll send a new one now... |
Proposing addition of a confirmation prompt when deleting chat messages as requested in Issue #2540.