Changeset 21373 in main


Ignore:
Timestamp:
08/25/20 22:22:30 (3 weeks ago)
Author:
GarthBraithwaite_STG
Message:

admin - commented out related_indicators.jsp grouping. Reworked IPV dataset record edit interface to show red if the constant value has "year" in it's title. Reworked the mergeRecordData.tag to have a popup if the user selects overwrite existing data. Added listed steps and help.

Location:
trunk/ibisph-admin/src/main/webapp
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/indicator/dataset/_help.jsp

    r20264 r21373  
    226226
    227227
     228<c:set var="mergeHelp">
     229        This  page allows you to copy data from Excel or some other source and paste
     230        it into the dataset record values table.
     231</c:set>
     232
    228233
    229234<%-- standard variable definitions that are likely good enough...
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/indicator/dataset/records.jsp

    r19380 r21373  
    343343</c:if>
    344344
    345                 <tag:mergeRecordData title="${title}"
     345                <tag:mergeRecordData title="the ${dataset.name} Dataset"
    346346                        startingDestinationTableRow="1"
    347347                        tableRowIndexAdjustment="-1"
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/indicator/related_indicators.jsp

    r19380 r21373  
    123123        <jsp:body>
    124124
     125<%-- Commented out for NM and possibly UT.  Note for this to work all existing
     126        relateds MUST be set to PopChar otherwise they are NOT editable.
     127
     128        update indicator_to_indicator set relation_name='PopChar';
     129
    125130                <div style="border:1px solid #cccccc; background-color:#eeeeee; padding:8px 10px 8px 10px; margin:2px 10px 0 0;">
    126131                        <label for="selectedRelationName" class="Bold">Relation:</label>
     
    150155                        <div id="relationTextCounter" class="TextAreaCounter"></div>
    151156                        <br/>
    152 
     157--%>
    153158                        <span class="Bold">Related Indicators:</span><a id="alphaIndex" style="height: 1px"></a>
    154159                        <div class="JumpTo">
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/jsp/indicator/view/records.jsp

    r19714 r21373  
    33<%@include file="/WEB-INF/jsp/_taglibs.jsp"%>
    44<%@include file="_help.jsp"%>
     5
     6<c:set var="mergeHelp">
     7        This  page allows you to copy data from Excel or some other source and paste
     8        it into the dataset record values table which are associated with this
     9        indicator view.
     10</c:set>
    511
    612<tag:page title="Records of the ${indicatorView.title} View" name="indicator/view/records" help="${recordsPageHelp}">
     
    201207                        <div>
    202208                                <label for="constantDimensionValue">Constant Dimension Value:</label>
    203                                 <span id="constantDimensionValue">${constantDimensionValues[0].title}</span>
     209                                <span id="constantDimensionValue" <c:if test="${fn:containsIgnoreCase({constantDimensionValues[0].dimensionTitle}, 'year')}">class="Red"</c:if>
     210                                >${constantDimensionValues[0].title}</span>
    204211                        </div>
    205212                </div>
     
    325332                </div>
    326333</c:if>
    327 
    328                 <tag:mergeRecordData title="${title}"
     334                <tag:mergeRecordData title="${indicatorView.title}"
    329335                        startingDestinationTableRow="1"
    330336                        tableRowIndexAdjustment="-1"
  • trunk/ibisph-admin/src/main/webapp/WEB-INF/tags/mergeRecordData.tag

    r19351 r21373  
    1111<%@attribute name="help"%>
    1212
     13<c:set var="mergeDestinationStartingRowHelp">
     14        The starting destination row allows you to specify where this data will be
     15        inserted into the dataset records table.  This value indexes starting at 1
     16        which means 1 = the first row of data.
     17</c:set>
     18<c:set var="mergeDelimiterHelp">
     19        Specifies how the above data values are seperated. 
     20        Use <code class="Bold Larger">\t</code> if pasting from MS-Excel,
     21        use a <code class="Bold Larger">comma</code> for CSV,
     22        other delimiters could be <code class="Bold Larger">space, | #</code> etc.
     23        <br/><br/>
     24        Note: delimiter values are typically a single character but are not limited
     25        to a single character.  For example you might have data that uses a string
     26        like <code class="Bold Larger">#!#</code> that delimits the values etc.
     27</c:set>
     28
     29<c:set var="mergeOverwriteHelp">
     30        If you want to overwrite existing data make you MUST check this box.  If unchecked
     31        then data is only merged into blank existing cells.  So if you are entering a
     32        new year, all fields/cells on the dataset record page *SHOULD* be blank and thus
     33        this option does not need to be selected.
     34        <br/><br/>
     35
     36        <div class="Bold">IMPORTANT: Be very careful using this
     37        option as it is rarely needed or used in this new version of the application. 
     38        In older versions this was used to update all values when a new current year's
     39        data was being implemented.  In version 3 this is NOT used as new data MUST
     40        be associated with a new period dimension value.  This allows historical data
     41        to not be thrown away so it can be used for trending etc.
     42</c:set>
     43
    1344<div id="mergeDialog" class="${empty cssClass ? "ModalDialog" : cssClass}">
    1445        <a href="javascript:global.mergeDialog.hide()" title="Close" class="CloseBox"><img src="${pageContext.request.contextPath}/image/icon/32/closebox.png"/></a>
    15         <div class="InnerCanvas">
    16                 <h2 class="TitleBar">Merge Data into ${title} ${help}</h2>
     46        <div class="InnerCanvas" style="padding: 2em;">
     47                <h2 class="TitleBar">Merge Data into ${title} <tag:help content="${help}"/></h2>
    1748                <hr/>
    1849                <div id="mergeDialogContentContainer">
     50                        <br/>
    1951                        The "Merge Data" function allows data to be copied from outside
    20                         applications like Excel spreadsheets and pasted into the value
    21                         cells.
     52                        applications like Excel spreadsheets, database tools, or CSV files
     53                        and pasted into the dataset record value cells.
    2254                        <br/><br/>
    2355
    24                         IMPORTANT: both the row and column data ordering MUST match exactly.
    25                         This means that the series and category values are NOT cross matched -
    26                         the data is placed into the table exactly as defined and ordered in
    27                         the "Delimited Data to be Merged:" input area below.
    28                         <br/><br/>
     56                        <h4>Steps:</h4>
     57                        <ol>
     58                                <li>
     59                                        <label for="mergeDataToParse">Paste and/or enter delimited values to be merged into the dataset records table:</label><br/>
     60                                        <textarea id="mergeDataToParse" rows="10" title="Paste the delimited data into this edit box - or edit directly."></textarea>
     61                                        <div class="Note">IMPORTANT: both the row and column
     62                                                data ordering MUST match exactly.  This means that the series
     63                                                and category values are not cross matched - the data is placed
     64                                                into the table in the exact order as exists above.
     65                                        </div>
     66                                </li>
     67                                <li title="Use '\t' for Excel, or any character like ',' or ' ' etc.">
     68                                        <label for="mergeColumnDelimiter">Enter the delimiter for the pasted/entered values:</label>
     69                                        <input type="text" name="mergeColumnDelimiter" id="mergeColumnDelimiter"
     70                                                value="\t" maxlength="10" style="width: 4em;"
     71                                        />
     72                                        <tag:help content="${mergeDelimiterHelp}"/>
     73                                </li>
     74                                <li title="Starting row to merge the data to.">
     75                                        <label for="mergeStartingTableRow">Enter the destination starting row: </label>
     76                                        <input type="number" id="mergeStartingTableRow" maxlength="4"
     77                                                value="${(empty startingDestinationTableRow) ? 1 : startingDestinationTableRow}"
     78                                                indexAdjustment="${(empty tableRowIndexAdjustment) ? -1 : tableRowIndexAdjustment}"
     79                                                style="width: 4em;"
     80                                        />
     81                                        <tag:help content="${mergeDestinationStartingRowHelp}"/>
     82                                </li>
    2983
    30                         Usage: Enter the starting row number where you want that data pasted
    31                         into.  The first data row is "1".  Next enter the data values cell
    32                         delimiter value (MS-Excel copy/paste uses the tab character which is
    33                         specified by "\t" - without the double quotes).  If you
    34                         want to overwrite existing data make sure that the "Overwrite existing
    35                         data" is checked.  Then paste the copied data into the text area
    36                         (you can edit in the text area directly as desired).  Finally
    37                         press the [Merge] button.  Remember that if you do not like the
    38                         merge result you can always use the "Reset" to undo your changes
    39                         to the point of when you first entered the page.  If you press the
    40                         [Save] button or navigate to another page the values will be committed
    41                         without any possiblity of an undo.
    42                         <br/><br/>
     84                                <li>
     85                                        <input type="checkbox" name="mergeOverwriteNonBlankData" id="mergeOverwriteNonBlankData" value="true"
     86                                                onclick="javascript:alertIfExistingData()"
     87                                                title="Check this to overwrite existing non blank data values."
     88                                        />
     89                                        <label for="mergeOverwriteNonBlankData">Check this to allow any existing, non blank data to be overwritten (if applicable).
     90                                        <tag:help content="${mergeOverwriteHelp}"/>
     91                                        </label>
     92                                </li>
    4393
    44                         <table>
    45                                 <tr title="Starting row to merge the data to.">
    46                                         <td><label for="mergeStartingTableRow">Starting Row to Merge the Data to:</label></td>
    47                                         <td>
    48                                                 <input type="number" id="mergeStartingTableRow"
    49                                                         size="5" maxlength="4"
    50                                                         value="${(empty startingDestinationTableRow) ? 1 : startingDestinationTableRow}"
    51                                                         indexAdjustment="${(empty tableRowIndexAdjustment) ? -1 : tableRowIndexAdjustment}"
    52                                                 />
    53                                         </td>
    54                                 </tr>
    55                                 <tr title="Use '\t' for Excel, or any character like ',' or ' ' etc.">
    56                                         <td><label for="mergeColumnDelimiter">Data Column/Cell Delimiter:</label></td>
    57                                         <td><input type="text" name="mergeColumnDelimiter" id="mergeColumnDelimiter" value="\t" size="5" maxlength="10"/></td>
    58                                 </tr>
    59                         </table><br/>
     94                                <li>
     95                                        Press the [Merge] button to proceed or click the "x" located
     96                                        in the upper right corner of this window to cancel this operation. 
     97                                        <br/>
     98                                        <input type="button" value="Merge Data" onclick="mergeParsedData()" style="padding: 0.5em 1em; margin-top: 1em;"/>
     99                                        <br/><br/>
    60100
    61                         <label for="mergeDataToParse">Delimited Data to be Merged:</label><br/>
    62                         <textarea id="mergeDataToParse" rows="5" title="Paste the delimited data into this edit box - or edit directly."></textarea>
    63                         <br/>
    64                         <input type="checkbox" name="mergeOverwriteNonBlankData" id="mergeOverwriteNonBlankData" value="true" title="Check this to overwrite existing non blank data values."/>
    65                         <label for="mergeOverwriteNonBlankData">Overwrite Existing, Non Blank Data (if applicable)</label>
    66                         <br/><br/>
    67 
    68                         <input type="button" value="Merge" onclick="mergeParsedData()"/><br/>
     101                                        <div class="Note">
     102                                                If you proceed with the merge operation and do not like the
     103                                                merged result you can always use the "Reset" option which will
     104                                                reset the page to the point of when it was first entered. 
     105                                                Once back to the dataset records page IF you "Save" or
     106                                                navigate to another page the values will be committed.
     107                                        </div>
     108                                </li>
     109                        </ol>
    69110                </div>
    70111
     
    85126        function showMergeDataDialog()
    86127        {
    87                 if(!global.mergeDialog) global.mergeDialog = new ModalDialog("mergeDialog", "mergeDialogContentContainer");
     128                if(!global.mergeDialog)
     129                {
     130                        global.mergeDialog = new ModalDialog("mergeDialog", "mergeDialogContentContainer");
     131                }
    88132                global.mergeDialog.show();
    89133        } //~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~
     134
     135
     136        // checks if any blank values.  If so then show alert message.
     137        function alertIfExistingData()
     138        {
     139                var isChecked = document.getElementById("mergeOverwriteNonBlankData").checked;
     140
     141                if(isChecked)
     142                {
     143                        var nonBlankValuesFound = false;
     144                        var elements = document.getElementsByName("measureValue");
     145                        for(var i = 0, element; element = elements[i++];)
     146                        {
     147                                nonBlankValuesFound = (element.value > " ");
     148                                if(nonBlankValuesFound) break;
     149                        }
     150                        if(nonBlankValuesFound) alert(
     151                                "***   STOP!   IMPORTANT WARNING!   DATA EXISTS!   READ BELOW!   ***\n\n"
     152                                + "Do NOT proceed if you are updating a new years data! "
     153                                + "Close the Merge Data window to return to the records entry page "
     154                                + "and correct this issue by changing to the appropriate year. If you proceed "
     155                                + "you will loose or corrupt valid historical data. \n\n"
     156                                + "If you are not updating data to a new year proceed with extreme caution "
     157                                + "and verify each and every value before saving the values."
     158                        );
     159                }
     160        } //~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~
     161
     162
    90163
    91164        // called from the dialog's [Merge] button when clicked.
  • trunk/ibisph-admin/src/main/webapp/css/_general.css

    r19705 r21373  
    7171li
    7272{
     73        margin-bottom:          1em;
    7374        padding-top:            2px;
    7475        padding-bottom:         1px;
Note: See TracChangeset for help on using the changeset viewer.