Show More
@@ -67,13 +67,21 b' function addQuickReply(postId) {' | |||
|
67 | 67 | if (getForm().prev().attr('id') == postId) { |
|
68 | 68 | resetFormPosition(); |
|
69 | 69 | } else { |
|
70 | ||
|
71 | 70 | var blockToInsert = null; |
|
72 | ||
|
71 | var textAreaJq = $('textarea'); | |
|
72 | var postLinkRaw = '[post]' + postId + '[/post]' | |
|
73 | var textToAdd = ''; | |
|
73 | 74 | |
|
74 | 75 | if (postId != null) { |
|
75 | 76 | var post = $('#' + postId); |
|
76 | 77 | |
|
78 | // If this is not OP, add reflink to the post. If there already is | |
|
79 | // the same reflink, don't add it again. | |
|
80 | if (!post.is(':first-child') && textAreaJq.val().indexOf(postLinkRaw) < 0) { | |
|
81 | textToAdd += postLinkRaw + '\n'; | |
|
82 | } | |
|
83 | ||
|
84 | textAreaJq.val(textAreaJq.val()+ textToAdd); | |
|
77 | 85 | blockToInsert = post; |
|
78 | 86 | } else { |
|
79 | 87 | blockToInsert = $('.thread'); |
@@ -93,15 +101,6 b' function addQuickQuote(postId) {' | |||
|
93 | 101 | var textToAdd = ''; |
|
94 | 102 | var textAreaJq = $('textarea'); |
|
95 | 103 | var postLinkRaw = '[post]' + postId + '[/post]' |
|
96 | if (postId != null) { | |
|
97 | var post = $('#' + postId); | |
|
98 | ||
|
99 | // If this is not OP, add reflink to the post. If there already is | |
|
100 | // the same reflink, don't add it again. | |
|
101 | if (!post.is(':first-child') && textAreaJq.val().indexOf(postLinkRaw) < 0) { | |
|
102 | textToAdd += postLinkRaw + '\n'; | |
|
103 | } | |
|
104 | } | |
|
105 | 104 | var selection = window.getSelection().toString(); |
|
106 | 105 | if (selection.length > 0) { |
|
107 | 106 | textToAdd += '[quote]' + selection + '[/quote]\n'; |
General Comments 0
You need to be logged in to leave comments.
Login now