Skip to content
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

Closed
wants to merge 25 commits into from

Conversation

marcelosizer
Copy link
Contributor

Proposing addition of a confirmation prompt when deleting chat messages as requested in Issue #2540.

@@ -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?'))
Copy link
Contributor

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)

@marcelosizer
Copy link
Contributor Author

@lefnire done and done. =]

lefnire and others added 23 commits February 5, 2014 17:28
…res.json(500,{err:err}). Let the top-level error handler handle this (needed for upcoming versionerror discarding)
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)
Updating Looking for Group to the proper (not dead) link.
@marcelosizer
Copy link
Contributor Author

Ok, just fucked this up. Closing and opening a new one.

@marcelosizer
Copy link
Contributor Author

@lefnire is this confirmation prompt wanted?

@deilann
Copy link
Contributor

deilann commented Feb 7, 2014

I don't know if @lefnire wants it, but I am super afraid I'm going to
delete someone else's chat messages now! And there's no way to revert it.

On Fri, Feb 7, 2014 at 1:13 PM, Marcelo Sizer notifications@github.comwrote:

@lefnire https://github.com/lefnire is this confirmation prompt wanted?

Reply to this email directly or view it on GitHubhttps://github.com//pull/2545#issuecomment-34503673
.

@lefnire
Copy link
Contributor

lefnire commented Feb 8, 2014

Goodness, I'm having trouble following this thread. Yes we want confirmation-before-deletion. Did something else accidentally get merged?

@marcelosizer
Copy link
Contributor Author

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants