dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #11067
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3099: Disabling period selection until period type is selected in dataset report
------------------------------------------------------------
revno: 3099
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-03-20 15:21:11 +0100
message:
Disabling period selection until period type is selected in dataset report
modified:
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js
dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderSectionDataSetReportForm.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-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm 2011-03-20 13:35:54 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/dataSetReportForm.vm 2011-03-20 14:21:11 +0000
@@ -30,17 +30,17 @@
<th>$i18n.getString( "report_period" )</th>
</tr>
<tr>
- <td>
- <input type="button" style="width:50px" value="$i18n.getString( 'prev' )" onclick="getAvailablePeriods( 'periodType', 'periodId', 'periodId', '-1' )"><input
- type="button" style="width:50px" value="$i18n.getString( 'next' )" onclick="getAvailablePeriods( 'periodType', 'periodId', 'periodId', '1' )">
- <select id="periodType" name="periodType" style="min-width:222px" onchange="getAvailablePeriods( 'periodType', 'periodId', 'periodId', '0' )">
+ <td>
+ <select id="periodType" name="periodType" style="min-width:222px" onchange="getPeriods( 'periodType', 'periodId', 'periodId', '0' )">
<option value="">[ $i18n.getString( "select_period_type" ) ]</option>
#foreach ( $type in $periodTypes )
<option value="$type.name">$type.name</option>
#end
- </select><br>
+ </select>
+ <input type="button" style="width:50px" value="$i18n.getString( 'prev' )" onclick="getAvailablePeriods( 'periodType', 'periodId', 'periodId', '-1' )"><input
+ type="button" style="width:50px" value="$i18n.getString( 'next' )" onclick="getAvailablePeriods( 'periodType', 'periodId', 'periodId', '1' )"><br>
- <select id="periodId" name="periodId" style="width:325px">
+ <select id="periodId" name="periodId" style="width:325px" disabled="disabled">
</select>
</td>
</tr>
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2010-07-25 13:43:07 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/dataSetReport.js 2011-03-20 14:21:11 +0000
@@ -15,6 +15,13 @@
selectionTreeSelection.setListenerFunction( setSelectedOrganisationUnitIds );
}
+function getPeriods( periodTypeList, availableList, selectedList, timespan )
+{
+ $( "#periodId" ).removeAttr( "disabled" );
+
+ getAvailablePeriods( periodTypeList, availableList, selectedList, timespan );
+}
+
function validateDataSetReport()
{
if ( !getListValue( "dataSetId" ) )
=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderSectionDataSetReportForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderSectionDataSetReportForm.vm 2011-03-20 13:35:54 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/renderSectionDataSetReportForm.vm 2011-03-20 14:21:11 +0000
@@ -18,7 +18,7 @@
<thead>
<tr>
#foreach( $header in $grid.getVisibleHeaders() )
-<th #if( !$header.meta )class="val"#end>$!encoder.htmlEncode( $header.name )</th>
+<th #if( !$header.meta )style="text-align:center"#end>$!encoder.htmlEncode( $header.name )</th>
#end
</tr>
</thead>