dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16416
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6243: (patient) Minor fix for tabular report.
------------------------------------------------------------
revno: 6243
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-03-12 11:19:40 +0700
message:
(patient) Minor fix for tabular report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-03-10 05:06:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-03-12 04:19:40 +0000
@@ -274,7 +274,7 @@
selected = Selected
orgunit = Organisation Unit
add_all = Add all
-refresh_values = Refresh values
report_unit = Report unit
order_by_orgunit = Order by organisation unit
-order_by_report_date = Order by report date
\ No newline at end of file
+order_by_report_date = Order by report date
+clear_filter = Clear filter
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2012-03-10 05:06:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/caseAggregationForm.vm 2012-03-12 04:19:40 +0000
@@ -53,9 +53,9 @@
</td>
<td>
<select id="facilityLB" name="facilityLB" style="width: 30em">
- <option value="selected" selected="selected">$i18n.getString( "selected" )</option>
+ <option value="all" selected="selected" >$i18n.getString( "all" )</option>
<option value="childrenOnly" >$i18n.getString( "children_only" )</option>
- <option value="all">$i18n.getString( "all" )</option>
+ <option value="selected" >$i18n.getString( "selected" )</option>
</select>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js 2012-03-10 05:06:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/tabularReport.js 2012-03-12 04:19:40 +0000
@@ -69,7 +69,7 @@
{
for ( i in json.dataElements )
{
- $('#availableDataElementIds').append('<option value=' + json.dataElements[i].id + '>' + json.dataElements[i].name + '</option>');
+ $('#availableDataElementIds').append('<option value=' + json.dataElements[i].id + ' >' + json.dataElements[i].name + '</option>');
}
} );
}
@@ -237,9 +237,11 @@
}
}
-function onchangeOrderBy( element )
+function onchangeOrderBy( elementId )
{
searchTabularReport();
+
+ var element = jQuery( "#" + elementId );
var isAcs = jQuery( element ).attr( 'orderBy' );
if( isAcs == 'true')
{
@@ -258,8 +260,7 @@
hideMessage();
var searchingValues = "";
- var listSeachingValues = jQuery("#gridTable input");
- var regExp = new RegExp([]);
+ var listSeachingValues = jQuery("#gridTable input[type=text]");
listSeachingValues.each( function( i, item ){
if( item.value != '' )
@@ -328,3 +329,11 @@
}
return value;
}
+
+function clearFilter()
+{
+ var listSeachingValues = jQuery("#gridTable input[type=text]");
+ listSeachingValues.each( function( i, item ){
+ item.value = '';
+ });
+}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css 2012-03-09 04:46:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/report.css 2012-03-12 04:19:40 +0000
@@ -22,8 +22,7 @@
width:355px;
}
-
-.grid input {
+.grid input[type="text"] {
width:75%;
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm 2012-03-10 05:06:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportResult.vm 2012-03-12 04:19:40 +0000
@@ -10,7 +10,7 @@
<div>
<input type="button" value="$i18n.getString( 'get_report_as_xls' )" onclick="exportTabularReport( 'xls' )" class="button" >
<input type="button" value="$i18n.getString( 'get_report_as_pdf' )" onclick="exportTabularReport( 'pdf' )" class="button" >
- <input type="button" value="$i18n.getString( 'refresh_values' )" onclick="searchTabularReport()" class="button" >
+ <input type="button" value="$i18n.getString( 'filter' )" onclick="searchTabularReport()" class="button" >
</div>
<h5>$!encoder.htmlEncode( $grid.subtitle )</h5>
@@ -25,11 +25,11 @@
<th>#</th>
<th>
$i18n.getString('report_unit')
- <a href="javascript:searchTabularReport();" title='$i18n.getString( "order_by_orgunit" )'><img src="../images/asc.gif" alt='$i18n.getString( "asc" )' id='orderByOrgunitAsc' orderBy='true' onclick='onchangeOrderBy( this )' style='curser:pointer;'></a>
+ <a href="javascript:onchangeOrderBy( 'orderByOrgunitAsc' );" title='$i18n.getString( "order_by_orgunit" )'><img src="../images/asc.gif" alt='$i18n.getString( "asc" )' id='orderByOrgunitAsc' orderBy='true' style='curser:pointer;'></a>
</th>
<th>
$i18n.getString('report_date')
- <a href="javascript:searchTabularReport();" title='$i18n.getString( "order_by_report_date" )'><img src="../images/asc.gif" alt='$i18n.getString( "desc" )' id='orderByExecutionDateByAsc' orderBy='true' onclick='onchangeOrderBy( this )' style='curser:pointer;'></a>
+ <a href="javascript:onchangeOrderBy( 'orderByExecutionDateByAsc' );" title='$i18n.getString( "order_by_report_date" )'><img src="../images/asc.gif" alt='$i18n.getString( "desc" )' id='orderByExecutionDateByAsc' orderBy='true' style='curser:pointer;'></a>
</th>
#foreach( $dataElement in $dataElements )
<th>
@@ -42,7 +42,9 @@
</tr>
<tr class='filter'>
- <td>$i18n.getString('filter')</td>
+ <td>
+ <input type="button" value="$i18n.getString( 'clear_filter' )" onclick="clearFilter();" class="button" >
+ </td>
<td></td>
<td></td>
#foreach( $dataElement in $dataElements )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm 2012-03-10 05:06:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/tabularReportSelect.vm 2012-03-12 04:19:40 +0000
@@ -1,8 +1,13 @@
<script>
jQuery(document).ready( function(){
- validation( 'reportForm', function(form){
- loadGeneratedReport();
- });
+ validation2( 'reportForm', function(form){
+ loadGeneratedReport();
+ }, {
+ 'beforeValidateHandler' : function()
+ {
+ listValidator( 'memberValidator', 'dataElementIds' );
+ }
+ } );
});
</script>
@@ -24,9 +29,9 @@
</td>
<td>
<select id="facilityLB" name="facilityLB" style="width: 30em">
- <option value="selected" selected="selected">$i18n.getString( "selected" )</option>
+ <option value="all" selected="selected" >$i18n.getString( "all" )</option>
<option value="childrenOnly" >$i18n.getString( "children_only" )</option>
- <option value="all">$i18n.getString( "all" )</option>
+ <option value="selected" >$i18n.getString( "selected" )</option>
</select>
</td>
</tr>
@@ -80,17 +85,19 @@
<tr>
<td></td>
- <td> <input type="button" value="$i18n.getString( 'add_selected' )" title="$i18n.getString( 'add_selected' )" style="width:120px" onclick="moveSelectedById( 'availableDataElementIds', 'dataElementIds' )" />
- <input type="button" value="$i18n.getString( 'add_all' )" title="$i18n.getString( 'add_all' )" style="width:120px" onclick="moveAllById( 'availableDataElementIds', 'dataElementIds' )" /> <br>
- <input type="button" value="$i18n.getString( 'remove_selected' )" title="$i18n.getString( 'remove_selected' )" style="width:120px" onclick="moveSelectedById( 'dataElementIds', 'availableDataElementIds' )" />
- <input type="button" value="$i18n.getString( 'remove_all' )" title="$i18n.getString( 'remove_all' )" style="width:120px" onclick="moveAllById( 'dataElementIds', 'availableDataElementIds' )" />
+ <td>
+ <input type="button" value="$i18n.getString( 'add_selected' )" title="$i18n.getString( 'add_selected' )" style="width:120px" onclick="moveSelectedById( 'availableDataElementIds', 'dataElementIds' )" class="button" />
+ <input type="button" value="$i18n.getString( 'add_all' )" title="$i18n.getString( 'add_all' )" style="width:120px" onclick="moveAllById( 'availableDataElementIds', 'dataElementIds' )" class="button" /> <br>
+ <input type="button" value="$i18n.getString( 'remove_selected' )" title="$i18n.getString( 'remove_selected' )" style="width:120px" onclick="moveSelectedById( 'dataElementIds', 'availableDataElementIds' )" class="button" />
+ <input type="button" value="$i18n.getString( 'remove_all' )" title="$i18n.getString( 'remove_all' )" style="width:120px" onclick="moveAllById( 'dataElementIds', 'availableDataElementIds' )" class="button" />
</td>
</tr>
<tr>
<td><label>$i18n.getString( "selected_data_elements" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
- <select id="dataElementIds" name="dataElementIds" multiple size='6' class="{validate:{required:true}}" ondblclick="moveSelectedById( 'dataElementIds', 'availableDataElementIds' )" ></select>
+ <select id="dataElementIds" name="dataElementIds" multiple size='6' ondblclick="moveSelectedById( 'dataElementIds', 'availableDataElementIds' )" ></select>
+ <select id="memberValidator" multiple="multiple" style="display:none" class="{validate:{required:true}}"/>
</td>
<td style="width:30px; text-align:center">
<a href="javascript:moveUpSelectedOption('dataElementIds')"><img src="../images/move_up.png"/></a><br/><br/>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2012-02-23 04:05:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addCaseAggregation.vm 2012-03-12 04:19:40 +0000
@@ -77,7 +77,7 @@
<table>
<tr>
<td>
- <label for="program">$i18n.getString( "program_properties" )</label>
+ <label for="program">$i18n.getString( "program" )</label>
</td>
</tr>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2012-02-23 04:05:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateCaseAggregation.vm 2012-03-12 04:19:40 +0000
@@ -80,7 +80,7 @@
<table>
<tr>
<td>
- <label for="program">$i18n.getString( "program_properties" )</label>
+ <label for="program">$i18n.getString( "program" )</label>
</td>
</tr>
<tr>