Changeset 1889 for branches/release-34/default_templates/javascript.mtml
- Timestamp:
- 04/14/08 18:28:41 (20 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-34/default_templates/javascript.mtml
r1887 r1889 175 175 176 176 var checkbox = document.getElementById('comment-reply'); 177 178 // Clear the current label but NOT our checkbox!179 177 var label = document.getElementById('comment-reply-label'); 180 for(var i = 1; i < label.childNodes.length; i++) { 181 label.removeChild(label.childNodes[i]); 182 } 183 178 var text = document.getElementById('comment-text'); 179 184 180 // Populate label with new values 185 var reply_text = document.createTextNode(' <__trans phrase="Replying to"> '); 186 label.appendChild(reply_text); 187 188 var anchor = document.createElement('a'); 189 anchor.setAttribute('href', '#comment-' + parent_id); 190 anchor.innerHTML = author; 191 label.appendChild(anchor); 192 181 var reply_text = '<__trans phrase="Replying to <a href="#comment-[_1]">comment from [_2]</a>" params="'+ parent_id +'%%'+ author +'">'; 182 label.innerHTML = reply_text; 183 193 184 checkbox.value = parent_id; 194 checkbox. setAttribute('checked', true);195 checkbox.focus();196 185 checkbox.checked = true; 186 text.focus(); 187 197 188 setCommentParentID(); 198 189 }
