Changes between Version 1 and Version 2 of Ticket #505, comment 9


Ignore:
Timestamp:
Sep 20, 2013, 1:58:24 PM (11 years ago)
Author:
olle

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #505, comment 9

    v1 v2  
    11Design implementation comments:
    22
    3  * The affected files are JSP script `samplereportgenerator.jsp` in `reggie/resources/reports/` and java servlet  `SampleReportServlet.java` in `reggie/src/net/sf/basedb/reggie/servlet/`.
    4  * JSP script `samplereportgenerator.jsp` in `reggie/resources/reports/` is updated with two new  pop-up menus for "Table alternatives" and "Blood sample filter". Function `gotoStep2()` is updated to show both menus for the sample count report, and only the "Blood sample filter" menu for the overview and missing sample data reports. The added menus will be disabled at start for the sample count and missing sample data reports, but enabled for the overview report.
     3The affected files are JSP script `samplereportgenerator.jsp` in `reggie/resources/reports/` and java servlet  `SampleReportServlet.java` in `reggie/src/net/sf/basedb/reggie/servlet/`.
     4
     5Updates in JSP script `samplereportgenerator.jsp` in `reggie/resources/reports/`:
     6
     7 * Two new  pop-up menus for "Table alternatives" and "Blood sample filter" are added. Function `gotoStep2()` is updated to show both menus for the sample count report, and only the "Blood sample filter" menu for the overview and missing sample data reports. The added menus will be disabled at start for the sample count and missing sample data reports, but enabled for the overview report.
    58 * New function `tableAlternativesOnChange()` is called when the table alternatives value changes, and enables the "Blood sample filter" pop-up menu when the table alternatives is changed to "1 table with optional blood sample filter" (which is not the default). If the table alternatives is changed to an option different from "1 table with optional blood sample filter", the "Blood sample filter" pop-up menu is reset and disabled again.
    69 * New function `sampleTypeOnChange()` is called when the sample type value changes, and enables the "Table alternatives" and "Blood sample filter" pop-up menus when the sample type is changed to "Blood" (which is not the default). For the sample count report, the "Blood sample filter" pop-up menu is only enabled if the "Table alternative" is "1 table with optional blood sample filter". If the sample type is changed to an option different from "Blood", the pop-up menus are reset and disabled again.
    7 
     10 * function `goCreate()` is updated to add the values of pop-up menus "Table alternative" and "Blood sample filter" to the Ajax servlet requests for the affected reports. The servlet copies the values to the returned JSON object, in order for them to be available to the script functions creating the tables.
     11 * Function `goCreate()` is updated to add 8 extra tables for the sample count report, if "Table alternatives" equals "9 tables with different blood sample choices". The extra tables are added analogously to the extra tables for the consent and overview reports. The extra reports are created by calling function `createItemCountReport(report, reportType)` with different report data for the first argument. In order to avoid a major rewrite of the latter function, JSON data for the new reports are added as child items to the original report object, with a name key identifying the type of report.