Merge pull request #53 from Ammy2/master

Id for the textarea of reply form made unique
This commit is contained in:
Timo Stollenwerk 2014-06-29 19:25:22 +02:00
commit 21a03d295e

View File

@ -35,8 +35,9 @@
*/
reply_div.appendTo(comment_div).css("display", "none");
/* Remove id="reply" attribute, since we use it to uniquely
/* Remove id="commenting" attribute, since we use it to uniquely define
the main reply form. */
// Still belongs to class="reply"
reply_div.removeAttr("id");
/* Hide the reply button (only hide, because we may want to show it
@ -47,6 +48,13 @@
/* Fetch the reply form inside the reply div */
var reply_form = reply_div.find("form");
/* Change the id of the textarea of the reply form
* To avoid conflict later between textareas with same id 'form-widgets-comment-text' while implementing a seperate instance of TinyMCE
* */
reply_form.find('#formfield-form-widgets-comment-text').attr('id', 'formfield-form-widgets-new-textarea'+comment_id );
reply_form.find('#form-widgets-comment-text').attr('id', 'form-widgets-new-textarea'+comment_id );
/* Populate the hidden 'in_reply_to' field with the correct comment
id */
reply_form.find("input[name='form.widgets.in_reply_to']")