Permalink
Browse files

Clarify example code

  • Loading branch information...
1 parent 2f3a72a commit f0d37ef0b3577a32b4ef8a097ba048f666feaeec Andy Zhang committed Mar 25, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/views/application/_send_comment.haml
View
6 app/views/application/_send_comment.haml
@@ -13,13 +13,13 @@
], function(widget) {
widget.on("initialRenderComplete", function(widget) {
$('.fyre-comment-article').click(function(e) {
- var commentJSON;
-
- commentJSON = {
+ var commentJSON = {
commentId: e.currentTarget.id.split('fyre-message-')[1],
commentAuthor: $(e.currentTarget).find('.fyre-comment-username')[0].text,
commentHTML: $(e.currentTarget).find('.fyre-comment')[0].innerHTML
};
+
+ # Send the comment to the window that opened this one
window.opener.postMessage(commentJSON, cmsLocation);
});
});

0 comments on commit f0d37ef

Please sign in to comment.