Changes between Initial Version and Version 1 of Ticket #801, comment 111


Ignore:
Timestamp:
Nov 27, 2015, 2:18:39 PM (8 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #801, comment 111

    initial v1  
    33 * Wizard "Create new start DNA plate" in sub-section "Start DNA plate wizards" in section "Library preparation wizards" should be updated in step 3 (the step after initial selection of DNA extracts, concerned with selecting a library preparation kit to use) by allowing manual selection of extra DNA extracts and/or control items:[[BR]][[BR]]a. Three new buttons should be added to the top of the form, "Add extract...", "Add control...", and "Reset".[[BR]]b. Clicking the "Add extract..." button should open a BASE pop-up extract selection dialog, with filters: Name: "`%.d`", Type: "`DNA`", and Remaining quantity (µg): "`>0`". Selecting any extract items should make the step 3 form update with the new item selection, after the "OK" is pressed in the dialog.[[BR]]c. Clicking the "Add control..." button should open a BASE pop-up extract selection dialog, with filters: Name: "`Horizon%.d`", Type: "`DNA`", and Remaining quantity (µg): "`>0`". Selecting any extract items should make the step 3 form update with the new item selection, after the "OK" is pressed in the dialog.[[BR]]d. Clicking the "Reset" button should remove any manually made extra item selections, and make the step 3 form update with the original item selection.
    44
     5Design discussion:
     6
     7Code for displaying a BASE pop-up extract selection dialog is taken from the commented out "Manual select..." button in the toolbar above the plate display in step 4 of the wizard. This code contains a lot of library "magic", working behind the scenes, such as the way a callback function for the dialog is set with call "`Events.addEventHandler('plate', 'base-selected', selectdna.manuallySelected)`", where `selectdna.manuallySelected(event)` is the callback function. The coupling to the call for displaying the BASE selection dialog, "`Dialogs.selectItem('EXTRACT', 'plate', 1, url)`" seems to go via argument `plate`, in a way that is not quite clear. For the original manual select dialog in step 4, `plate` is a natural argument variable, since the plate display is updated with the new items after the dialog is closed, but in the case discussed here, no plate has been displayed yet. However, in order not to risk breaking code that works, as much as possible has been kept identical to the original code, but this might lead to side effects, if the original toolbar functionality, or part of it, should be reinstated in the future. In the latter case, the code may have to be re-written.
     8
    59Design update:
    610
    711 1. JSP file `select_dna_for_start_plate.jsp` in `resources/libprep/` updated in step 3 by adding buttons for manual selection of extra DNA items, control items, and reset of the manually made selection. The buttons are placed at the top of the form, above the display of active used kits as plates.
    8  2. Javascript file `select_dna_for_start_plate.js` in `resources/libprep/` updated:[[BR]]a. Two new global variables defined: A JSONArray for keeping track of the originally selected extract names, and a flag indicating whether the original names have been loaded into the former.[[BR]]b. Function `initPage()` updated by adding event handlers for the new buttons in step 3. The "Add extract..." button is coupled to new function `manualSelectExtract()`, the "Add control..." button is coupled to new function `manualSelectControl()`, and the "Reset" button is coupled to new function `manualSelectReset()`.
     12 2. Javascript file `select_dna_for_start_plate.js` in `resources/libprep/` updated:[[BR]]a. Two new global variables defined: A JSONArray for keeping track of the originally selected extract names, and a flag indicating whether the original names have been loaded into the former.[[BR]]b. Function `initPage()` updated by adding event handlers for the new buttons in step 3. The "Add extract..." button is coupled to new function `manualSelectExtract()`, the "Add control..." button is coupled to new function `manualSelectControl()`, and the "Reset" button is coupled to new function `manualSelectReset()`. An event handler is coupled to the BASE selection dialog used for the two first buttons, coupling it to new callback function `manuallySelectedExtract(event)`.[[BR]]c. Function `initializeStep1(response)` is updated by resetting the JSONArray for keeping track of the originally selected extract names, and the flag indicating whether the original names have been loaded into the former.[[BR]]d. Function `initializeStep3(response)` is updated by disabling the three new buttons together with the "Next" button until the kit tables have been loaded. Also, the kit table section is now hidden until the kit tables have been loaded, since older versions of the tables could confuse the user, when the form is re-displayed. The first time the function is used, the JSONArray for keeping track of the originally selected extract names is loaded with the latter, and the flag indicating whether the original names have been loaded is then set to `true`. The message displayed while the kit tables are loading has been changed from "Loading information about plate..." to the more correct "Loading information about kits...".[[BR]]e. Function `kitPlatesInfoLoaded(response)` updated by enabling the three new buttons together with the "Next" button after the kit tables have been loaded, and show the kit table section.[[BR]]f. New function `manualSelectExtract(event)` added. It calls `Dialogs.selectItem('EXTRACT', 'plate', 1, url)` to open up a BASE extract selection dialog with filters: Name: "`%.d`", Type: "`DNA`", and Remaining quantity (µg): "`>0`".[[BR]]g. New function `manualSelectControl(event)` added. It calls `Dialogs.selectItem('EXTRACT', 'plate', 1, url)` to open up a BASE extract selection dialog with filters: Name: "`Horizon%.d`", Type: "`DNA`", and Remaining quantity (µg): "`>0`".[[BR]]h. New function `manuallySelectedExtract(event)` added. It is callback function for the BASE extract selection dialog, and adds the names of the extracts selected in the dialog to the JSONArray of previously selected, after which function `initializeStep3(event)` is called to re-display the form.[[BR]]i. New function `manualSelectReset()` added. It is coupled to the "Reset" button, and resets the JSONArray of selected extract names to the original ones, after which function `initializeStep3(event)` is called to re-display the form.