Show
Ignore:
Timestamp:
04/14/08 18:28:41 (20 months ago)
Author:
bsmith
Message:

bugzid:74303 - Review Design of Threaded Comments

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-34/default_templates/javascript.mtml

    r1887 r1889  
    175175     
    176176    var checkbox = document.getElementById('comment-reply'); 
    177  
    178     // Clear the current label but NOT our checkbox! 
    179177    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 
    184180    // 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 
    193184    checkbox.value = parent_id;  
    194     checkbox.setAttribute('checked', true); 
    195     checkbox.focus(); 
    196      
     185    checkbox.checked = true; 
     186    text.focus(); 
     187 
    197188    setCommentParentID(); 
    198189}