dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15789
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5821: Select at least one dataelement for anonymous program event report.
------------------------------------------------------------
revno: 5821
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-01-30 11:32:58 +0700
message:
Select at least one dataelement for anonymous program event report.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2012-01-11 07:42:49 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2012-01-30 04:32:58 +0000
@@ -59,7 +59,8 @@
jQuery("#availableList").children().each(function(i, item){
if( item.selected ){
html = "<tr class='selected' id='" + item.value + "' ondblclick='unSelectDataElement( this )'><td onclick='select(this)'>" + item.text + "</td>";
- html += "<td><input type='checkbox' name='compulsory' value='" + item.value + "'></td>";
+ html += "<td align='center'><input type='checkbox' name='compulsory' value='" + item.value + "'></td>";
+ html += "<td align='center' ><input type='checkbox' name='showOnReport' value='" + item.value + "'></td>";
html += "</tr>";
selectedList.append( html );
jQuery( item ).remove();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2012-01-15 02:14:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/updateProgramStageForm.js 2012-01-30 04:32:58 +0000
@@ -12,6 +12,7 @@
showOnReport = jQuery( "#showOnReport" );
showOnReport.empty();
+ var hasDeShowReport = false;
jQuery("#selectedList").find("tr").each( function( i, item ){
selectedDataElementsValidator.append( "<option value='" + item.id + "' selected='true'>" + item.id + "</option>" );
var compulsory = jQuery( item ).find( "input[name='compulsory']:first");
@@ -22,6 +23,11 @@
checked = isShow.attr('checked') ? true : false;
showOnReport.append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+ if( checked )
+ {
+ hasDeShowReport = true;
+ showOnReport = jQuery( "#checkShowOnReport" )..append( "<option value='" + checked + "' selected='true'>" + checked + "</option>" );
+ }
});
});
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2012-01-15 16:21:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2012-01-30 04:32:58 +0000
@@ -86,7 +86,7 @@
<th>$i18n.getString( "selected_data_elements" )
<select id="selectedDataElementsValidator" name='selectedDataElementsValidator' multiple="multiple" class="{validate:{required:true}}" style="display:none"> </select>
<select id="compulsories" name='compulsories' multiple="multiple" style="display:none"></select>
- <select id="showOnReport" name='showOnReport' multiple="multiple" style="display:none"></select>
+ <select id="showOnReport" name='showOnReport' multiple="multiple" style="display:none"></select>
</th>
</tr>
</thead>
@@ -108,7 +108,9 @@
<tr><th>$i18n.getString( "dataelement" )</th>
<th width="20px">$i18n.getString( "compulsory" )</th>
#if( $programStage.program.anonymous == 'true' )
- <th width="120px">$i18n.getString( "shown_on_reports" )</th>
+ <th width="120px">$i18n.getString( "shown_on_reports" )
+ <select id='checkShowOnReport' class="{validate:{required:true}}" style="display:none"></select>
+ </th>
#end
</thead>
<tbody id="selectedList">