Changeset 6730


Ignore:
Timestamp:
Feb 13, 2015, 10:25:31 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #1910: Disable annotation inheritance for annotation types

Experiment view page checks if inheritance is disabled before trying to inherit annotations for an experimental factor.

Location:
trunk/www/views/experiments
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/views/experiments/experiments.js

    r6696 r6730  
    171171          ' raw bioassays have a value for this experimental factor">';
    172172      }
     173      else if (fv.disableInheritance)
     174      {
     175        status = '<img src="../../images/notify.png" alt="!">&nbsp;Inheritance not allowed';
     176      }
    173177      else
    174178      {
    175179        numIncomplete++;
    176180        var numMissing = numRawBioAssays - fv.numRawBioAssaysWithFactor;
    177         status = '<table><tr>';
    178         status += '<td><img src="../../images/warning.png" alt="!"';
    179         status += ' title="' + numMissing + ' raw bioassays are missing a value for this experimental factor"></td>';
    180         status += '<td style="text-align: center;">';
     181        status = '<img src="../../images/warning.png" alt="!"';
     182        status += ' title="' + numMissing + ' raw bioassays are missing a value for this experimental factor">';
    181183        status += '<input type="checkbox" name="autoinherit" id="autoinherit'+fv.id+'" value="'+fv.id+'" checked';
    182184        status += ' title="Select to automatically inherit annotations from parents"></td>';
    183         status += '<td>&nbsp;<label for="autoinherit'+fv.id+'">' + numMissing + ' missing</label></td>'
    184         status += '</tr></table>';
     185        status += '<label for="autoinherit'+fv.id+'">' + numMissing + ' missing</label>';
    185186      }
    186187      statusDiv.innerHTML = status;
    187 
    188188    }
    189189   
    190190    if (numIncomplete > 0)
    191191    {
    192       var checkAll = '<table><tr>';
    193       checkAll += '<td></td>';
    194       checkAll += '<td style="text-align: center;">';
     192      var checkAll = '';
    195193      checkAll += '<span id="check.uncheck" data-table-id="tbl.experimentalFactors" data-regexp="autoinherit" class="link" title="Check/uncheck all">';
    196       checkAll += '<img src="../../images/check_uncheck.png" alt="x"></span></td>';
    197       checkAll += '<td><img src="../../images/bullet.png" alt="*"></td>';
    198       checkAll += '<td><span id="autoInherit" class="link"';
     194      checkAll += '<img src="../../images/check_uncheck.png" alt="x"></span>';
     195      checkAll += '&nbsp;<span id="autoInherit" class="link"';
    199196      checkAll += ' title="Automatically try to inherit values for the selected experimental factors from parent items">';
    200       checkAll += 'Auto-inherit</span></td>'
    201       checkAll += '</tr></table>';
     197      checkAll += 'Auto-inherit&hellip;</span>'
    202198      Doc.element('tbl.experimentalFactors.status').innerHTML = checkAll;
    203199      Doc.show('warning.missing');
     
    205201      Events.addEventHandler('check.uncheck', 'click', Table.checkUncheckOnClick);
    206202      Events.addEventHandler('autoInherit', 'click', experiments.autoInheritFactors);
    207      
    208203    }
    209204  }
  • trunk/www/views/experiments/view_experiment.jsp

    r6605 r6730  
    631631          JSONObject jsonAt = new JSONObject();
    632632          jsonAt.put("id", at.getId());
     633          jsonAt.put("disableInheritance", at.getDisableInheritance() ? 1 : 0);
    633634          jsonAt.put("numRawBioAssaysWithFactor", factorValuesCount.get(at));
    634635
Note: See TracChangeset for help on using the changeset viewer.