Created
September 7, 2010 18:17
-
-
Save joegaudet/568772 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
destroyComment : function(comment) { | |
this.set('_comment', comment); | |
SC.AlertPane.error("Are you sure you want to delete this comment.", "This action is irreversable, and will permanently remove this comment from the system.", null, "Ok", "Cancel", null, this); | |
}, | |
alertPaneDidDismiss : function(pane, status) { | |
if (status == SC.BUTTON1_STATUS) { | |
var comment = this.get('_comment'); | |
this.get('content').removeObject(comment); | |
this.invokeLater(function(){ | |
comment.destroy(); | |
comment.commitRecord(); | |
}); | |
} | |
else { | |
this.set('_comment', null); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment