dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15032
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5265: local vn - Fixed logic.
------------------------------------------------------------
revno: 5265
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-12-02 12:48:55 +0700
message:
local vn - Fixed logic.
modified:
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm.vm
local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js
--
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 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm.vm 2011-11-09 07:34:53 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm.vm 2011-12-02 05:48:55 +0000
@@ -8,7 +8,7 @@
<tr>
<td><label>$i18n.getString('group')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td >
- <select type="text" id="group" name="group" style="width:300px" onchange="getExportReportsByGroup()" >
+ <select type="text" id="group" name="group" style="width:300px" onchange="getExportReportsByGroup( currentOrgunitName )" >
#foreach($group in $groups)
<option value='$group' #if( $group == $exportReportGroup ) selected="selected" #end>$encoder.htmlEncode( $group )</option>
#end
@@ -24,7 +24,7 @@
<tr>
<td><label>$i18n.getString('period')<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
- <select type="text" id="selectedPeriodId" name="selectedPeriodId" style="width:220px" disabled="true"></select>
+ <select type="text" id="selectedPeriodId" name="selectedPeriodId" style="width:220px"></select>
<input type="button" value="<<" onclick="getPreviousPeriod()" id="lastPeriod"/>
<input type="button" value=">>" onclick="getNextPeriod()" id="nextPeriod"/>
</td>
@@ -50,7 +50,8 @@
#if ( $organisationUnit )
$(document).ready(function()
{
- getExportReportsByGroup( '$organisationUnit.name' );
+ currentOrgunitName = '$organisationUnit.name';
+ getExportReportsByGroup( currentOrgunitName );
});
#else
disable("group");
=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js 2011-11-09 07:34:53 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js 2011-12-02 05:48:55 +0000
@@ -8,16 +8,20 @@
// The current selected period type name
var currentPeriodTypeName = '';
+// The current selected orgunit name
+var currentOrgunitName = '';
+
// Functions
function organisationUnitSelected( orgUnits, orgUnitNames )
{
- getExportReportsByGroup( orgUnitNames[0] );
+ currentOrgunitName = orgUnitNames[0];
+ getExportReportsByGroup( currentOrgunitName );
}
selection.setListenerFunction( organisationUnitSelected );
function getExportReportsByGroup( selectedOrgUnitName ) {
-
+
if ( selectedOrgUnitName )
{
setInnerHTML( "selectedOrganisationUnit", selectedOrgUnitName );
@@ -36,23 +40,7 @@
currentPeriodOffset = 0;
reportSelected();
displayPeriodsInternal();
-
- enable("group");
- enable("exportReport");
- enable("selectedPeriodId");
- enable("generateExportReport");
- enable("previewButton");
- enable("nextPeriod");
- enable("lastPeriod");
});
- } else {
- disable("group");
- disable("exportReport");
- disable("selectedPeriodId");
- disable("generateExportReport");
- disable("previewButton");
- disable("nextPeriod");
- disable("lastPeriod");
}
}