Changeset 20775


Ignore:
Timestamp:
03/03/10 11:30:36 (2 years ago)
Author:
julie
Message:

fix comma-adding. check appropriate radio button as the radio buttons will be hidden if only one mine has orthologues

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bio/webapp/src/org/intermine/bio/web/logic/OrthologueConverter.java

    r20773 r20775  
    8888            List<ResultElement> row = it.next(); 
    8989            String orthologue = row.get(0).getField().toString(); 
    90             if (orthologues != null) { 
     90            if (orthologues.length() > 0) { 
    9191                orthologues.append(","); 
    9292            } 
    9393            orthologues.append(orthologue); 
    94         } 
    95         if (orthologues == null) { 
    96             return null; 
    9794        } 
    9895        return orthologues.toString(); 
  • trunk/intermine/webapp/main/resources/webapp/js/imdwr.js

    r20767 r20775  
    803803    // convert orthologues then post 
    804804    if (myForm.orthologueMapping[1].checked) { 
     805         alert("converting!"); 
    805806        // convert orthologues 
    806807        AjaxServices.convertObjects(bagType, bagName, 'orthologue', selectedOrganism, function(identifiers) { 
     808            alert("converted!"); 
    807809            if (identifiers != null && identifiers != '') { 
    808810                myForm.externalids.value = identifiers; 
     811                alert(myForm.externalids.value); 
    809812                myForm.orthologue.disabled = true; 
    810813                myForm.submit(); 
     
    828831    var selectedOrganism = orthologueSelect.options[orthologueSelect.selectedIndex].text; 
    829832    myForm.orthologue.value = selectedOrganism; 
     833    var selectLocal = false; 
    830834 
    831835    // hide/show the radio button and name of intermine if they do/don't have orthologues 
     
    840844            display('orthologueMappingRemoteRadio' + statusCount, false); 
    841845            display('orthologueMappingLocalRadio' + statusCount, false); 
     846            // check hidden radio button so that `local` mine is selected 
     847            // radio button is hidden but script needs this value to be checked 
     848            myForm.orthologueMapping[0].checked = false; 
     849            myForm.orthologueMapping[1].checked = true; 
    842850        } 
    843851    } else { 
     
    847855        display('orthologueMappingRemoteRadio' + statusCount, false); 
    848856        display('orthologueMappingLocalRadio' + statusCount, false); 
    849     } 
     857        //check hidden radio button so that `remote` mine is selected 
     858        // radio button is hidden but script needs this value to be checked 
     859        myForm.orthologueMapping[0].checked = true; 
     860        myForm.orthologueMapping[1].checked = false; 
     861    } 
     862 
    850863    // if there is only one option, don't show a dropdown 
    851864//    if (orthologueSelect.length == 1) { 
Note: See TracChangeset for help on using the changeset viewer.