##// END OF EJS Templates
Refactoring of the scripts accessing textarea
neko259 -
r1769:30b6f53c default
parent child Browse files
Show More
@@ -88,6 +88,10 b' function selectFileChoice() {'
88 88 localStorage.setItem(ITEM_FILE_SOURCE, source);
89 89 }
90 90
91 function getPostTextarea() {
92 return $('textarea#id_text');
93 }
94
91 95 $(document).ready(function() {
92 96 var powDifficulty = parseInt($('body').attr('data-pow-difficulty'));
93 97 if (powDifficulty > 0 && typeof SharedWorker != 'undefined') {
@@ -30,7 +30,7 b''
30 30 * @param end End (right) text
31 31 */
32 32 function addMarkToMsg(start, end) {
33 var textareas = $('textarea#id_text');
33 var textareas = getPostTextarea();
34 34
35 35 for (var i = 0; i < textareas.length; i++) {
36 36 var textarea = textareas[i];
@@ -68,7 +68,7 b' function addQuickReply(postId) {'
68 68 resetFormPosition();
69 69 } else {
70 70 var blockToInsert = null;
71 var textAreaJq = $('textarea#id_text');
71 var textAreaJq = getPostTextarea();
72 72 var postLinkRaw = '[post]' + postId + '[/post]'
73 73 var textToAdd = '';
74 74
@@ -101,7 +101,7 b' function addQuickReply(postId) {'
101 101 }
102 102
103 103 function addQuickQuote() {
104 var textAreaJq = $('textarea#id_text');
104 var textAreaJq = getPostTextarea();
105 105
106 106 var quoteButton = $("#quote-button");
107 107 var postId = quoteButton.attr('data-post-id');
General Comments 0
You need to be logged in to leave comments. Login now