Changeset 3483


Ignore:
Timestamp:
Sep 9, 2015, 11:10:55 AM (8 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #807: Flag RNA checkboxes should not be checked when inactive

Checkboxes are now automatically unchecked when they are disabled. If they are enabled again, they revert to the old status.

There was no similar issue in the other confirmation wizards.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.reggie/trunk/resources/analysis/demux_confirm.js

    r3320 r3483  
    341341      {
    342342        frm['flag.'+merge.id].disabled = failed;
     343        demux.resetCheckbox(frm['flag.'+merge.id]);
    343344      }
    344345      frm['align.'+merge.id].disabled = failed;
     346      demux.resetCheckbox(frm['align.'+merge.id]);
    345347      frm['comment.'+merge.id].disabled = deleteItems;
    346348    }
    347349  }
    348350
     351  /**
     352    A disabled checkbox is forced to be unchecked, the old value is stored in
     353    'oldChecked'. An enabled checkbox with 'oldChecked' set is checked.
     354   */
     355  demux.resetCheckbox = function(checkbox)
     356  {
     357    if (checkbox.disabled)
     358    {
     359      checkbox.oldChecked = checkbox.checked;
     360      checkbox.checked = false;
     361    }
     362    else if (checkbox.oldChecked != null)
     363    {
     364      checkbox.checked = checkbox.oldChecked;
     365      checkbox.oldChecked = null;
     366    }
     367  }
    349368 
    350369  demux.submit = function()
Note: See TracChangeset for help on using the changeset viewer.