Changeset 22559

Show
Ignore:
Timestamp:
03.08.2010 15:20:09 (10 years ago)
Author:
kjdon
Message:

added tbody element to table where we will be dynamically adding the metadata fields. IE adds this in by default if its not there already, and then the trs that we create don't get added to the right place. So now the fields should show up in IE. tested in IE8.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/macros/deposit.dm

    r19826 r22559  
    166166 
    167167    var formcontainer = document.getElementById('formcontainer'); 
    168      
     168 
    169169    if (!formcontainer) \{ 
    170170        return; 
    171171    \} 
    172      
     172 
    173173    for (i=0; i < DepositorMDFields.length; i++) \{ 
    174174        if (DepositorMDFields[i]==null) \{ 
     
    179179        var labelCell = document.createElement("td"); 
    180180        labelCell.innerHTML = metadataField.label + ": "; 
    181         labelCell.setAttribute("title", metadataField.tooltip);                          
    182  
     181        labelCell.setAttribute("title", metadataField.tooltip);  
     182                         
    183183        var cachedValue; 
    184184        if(CachedMDValues[0] !=null && CachedMDValues[0]["di1md." + metadataField.name])\{ 
     
    190190        var inputObj;  
    191191        if (metadataField.type=="text") \{ 
    192             inputObj = document.createElement("input");              
    193             inputObj.setAttribute("type","text");            
     192            inputObj = document.createElement("input"); 
     193            inputObj.setAttribute("type","text"); 
    194194            inputObj.setAttribute("size","74");  
    195195            inputObj.setAttribute("value", cachedValue); 
    196196        \}  
    197197        else if (metadataField.type=="textarea") \{ 
    198             inputObj = document.createElement("textarea");               
     198            inputObj = document.createElement("textarea"); 
    199199            inputObj.setAttribute("rows","5"); 
    200200            inputObj.setAttribute("cols", "40"); 
    201201            inputObj.innerHTML = cachedValue; 
    202202        \}   
    203         inputObj.setAttribute("name", "di1md."+ metadataField.name);         
     203        inputObj.setAttribute("name", "di1md."+ metadataField.name); 
    204204         
    205205        var inputCell = document.createElement("td"); 
     
    246246<!--input goes here--> 
    247247<!--dynamic load the metadata elements as configured in the collection's collect.cfg--> 
    248 <p><table id="formcontainer"></table> 
     248<p><table><tbody id="formcontainer"></tbody></table> 
    249249 
    250250<div class="divbar">&nbsp;</div>