← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9135: local vn - Fixed for both GUI of generating report. We can use it dynamically in the future. And ...

 

------------------------------------------------------------
revno: 9135
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-11-27 18:50:14 +0700
message:
  local vn - Fixed for both GUI of generating report. We can use it dynamically in the future. And hide the preview content when the params changed.
modified:
  local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties
  local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties
  local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm_originalGUI.vm
  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/preview.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/resources/org/hisp/dhis/reportsheet/i18n_module.properties'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties	2012-11-27 06:33:42 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module.properties	2012-11-27 11:50:14 +0000
@@ -378,6 +378,7 @@
 org_unit_with_name			 = Organisation unit
 data_set_with_name			 = Data set
 uncompleted					 = uncompleted
+importing					 = Importing
 specified_data_set_unavailable = Selected data set is not exist
 specified_data_set_unassign_to_export_report = Selected data set is not assign to any Export report
 roll_back_import 			= Rollback imported value

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties	2012-11-27 06:33:42 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/resources/org/hisp/dhis/reportsheet/i18n_module_vi_VN.properties	2012-11-27 11:50:14 +0000
@@ -408,6 +408,7 @@
 org_unit_with_name = \u0110\u01a1n v\u1ecb
 data_set_with_name = Bi\u1ec3u nh\u1eadp
 uncompleted	= ch\u01b0a ho\u00e0n t\u1ea5t
+importing = T\u00edch h\u1ee3p d\u1eef li\u1ec7u
 specified_data_set_unavailable = M\u1eabu b\u00e1o c\u00e1o n\u00e0y kh\u00f4ng t\u1ed3n t\u1ea1i
 specified_data_set_unassign_to_export_report = M\u1eabu b\u00e1o c\u00e1o n\u00e0y ch\u01b0a \u0111\u01b0\u1ee3c g\u00e1n v\u00e0o b\u1ea5t k\u1ef3 bi\u1ec3u Xu\u1ea5t n\u00e0o
 roll_back_import = Ph\u1ee5c h\u1ed3i gi\u00e1 tr\u1ecb import

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm_originalGUI.vm'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm_originalGUI.vm	2012-06-07 08:39:52 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/generateReportForm_originalGUI.vm	2012-11-27 11:50:14 +0000
@@ -4,16 +4,19 @@
 	{
 		currentOrgunitName = "$!organisationUnit.name";
 		getExportReportsByGroup( currentOrgunitName );
+		
+		defaultForm = true;
 	});
 
 	var i18n_select_period = '$encoder.jsEscape( $i18n.getString( "select_period" ) , "'")';
 	var i18n_value_rounded = '$encoder.jsEscape( $i18n.getString("value_rounded"), "'" )';
 	var i18n_specify_export_report = '$encoder.jsEscape( $i18n.getString("specify_export_report"), "'" )';
+	var i18n_specify_periodtype_or_period = '$encoder.jsEscape( $i18n.getString( "specify_periodtype_or_period" ) , "'")';
 </script>
 
 <h3>$i18n.getString( "generate_export_report" ) #openHelp( "excelReportingExportReport" )</h3>
 
-<div class="inputCriteria" style="width:485px;height:93px;">
+<div id="exportReportDiv" class="inputCriteria" style="width:410px;height:93px;">
 <table>	
 	<tr>
 		<td><label>$i18n.getString( 'organisation' )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
@@ -32,7 +35,8 @@
 	<tr>
 		<td><label>$i18n.getString( 'export_reports' )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
 		<td>
-			<select type="text" id="exportReport" name="exportReport" style="width:300px" onchange="reportSelected()"></select>
+			<select type="text" id="exportReport" name="exportReport" style="width:300px" onchange="reportSelected()"></select><br/>
+			<span id="elementSelect_loader" style="display:none;color:red" >$i18n.getString( "loading" )&nbsp;&nbsp;<img src="../images/ajax-loader-bar.gif" /></span>
 		</td>
     </tr>
 	<tr>
@@ -44,15 +48,25 @@
 			<input type="button" value="&gt;&gt;" onclick="getNextPeriod()" id="nextPeriod"/>
 		</td>
     </tr>
+	<tr id="showSubItemTR" style="display:none">
+		<td colspan="2"><label class='bold'>$i18n.getString( 'do_not_show_sub_item' )</label>
+			<input type="checkbox" id="showSubItem" value="false"/>
+		</td>
+	</tr>
+	<tr id="orderedGroupLabelTR" style="display:none">
+		<td colspan="2"><label class='bold'>$i18n.getString( 'filter_on_section' )</label>
+			<select type="text" id="orderedGroups" name="orderedGroups" style="width:410px" multiple="true" size="5"></select>
+		</td>
+    </tr>
 </table>
 </div>
 
 <hr/>
 
 <p>
+	<input type="button" id="showButtonDiv" onclick="showExportDiv();" value="$i18n.getString( 'show_export_params' )" style="display:none"/>
 	<input type="button" id="previewButton" value='$i18n.getString( "preview_report" )' onclick="validatePreviewReport();" style="width:150px"/>
 	<input type="button" id="generateExportReport" value='$i18n.getString( "generate_export_report" )' onclick="validateGenerateReport();" style="width:150px"/>
-	<input type="button" id="printExcelReportButton" value='$i18n.getString( "print" )' onclick='printExportReport()' style="width:150px"/>
 </p>
 
 <div id="previewDiv"></div>
\ No newline at end of file

=== 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	2012-11-27 04:26:35 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/export.js	2012-11-27 11:50:14 +0000
@@ -14,6 +14,8 @@
 // The current selected orgunit name
 var currentOrgunitName = '';
 
+var defaultForm = false;
+
 // Functions
 function organisationUnitSelected( orgUnits, orgUnitNames )
 {
@@ -116,7 +118,12 @@
 					hideById( 'showSubItemTR' );
 					showById( 'orderedGroupLabelTR' );
 					showById( 'orderedGroupSelectTR' );
-					byId( 'exportReportDiv' ).style.height = '410px';
+					byId( 'exportReportDiv' ).style.height = (defaultForm ? '210px' : '410px' );
+					
+					if ( defaultForm )
+					{
+						byId( 'exportReportDiv' ).style.width = '435px';
+					}
 				} );
 			}
 			else if ( currentReportTypeName == "O" )
@@ -125,13 +132,13 @@
 				showById( "periodCol" );
 				hideById( 'orderedGroupLabelTR' );
 				hideById( 'orderedGroupSelectTR' );
-				byId( 'exportReportDiv' ).style.height = '320px';
+				byId( 'exportReportDiv' ).style.height = (defaultForm ? '120px' : '320px');
 			} else {
 				showById( "periodCol" );
 				hideById( 'showSubItemTR' );
 				hideById( 'orderedGroupLabelTR' );
 				hideById( 'orderedGroupSelectTR' );
-				byId( 'exportReportDiv' ).style.height = '300px';
+				byId( 'exportReportDiv' ).style.height = (defaultForm ? '100px' : '300px');
 			}
 		}
 	}
@@ -187,6 +194,8 @@
 			setFieldValue( 'selectedPeriodId2', submitDateId );
 		}
 	}
+	
+	hideById( "previewDiv" );
 }
 
 function getNextPeriod()

=== modified file 'local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js'
--- local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js	2012-11-27 07:32:34 +0000
+++ local/vn/dhis-web-spreadsheet-reporting/src/main/webapp/dhis-web-spreadsheet-reporting/javascript/preview.js	2012-11-27 11:50:14 +0000
@@ -116,16 +116,17 @@
 	var _cols 		= "";
 	var _sheets		= parentElement.getElementsByTagName( 'sheet' );
 	var _sHTML		= [];
+	var _sHTMLBUTTONS = htmlPrintDownloadFunc.slice(0);
 
 	if ( isImport )
 	{
-		htmlPrintDownloadFunc.push( "</div>" );
+		_sHTMLBUTTONS.push( "</div>" );
 	}
 	else {
-		htmlPrintDownloadFunc.push( "&nbsp;&nbsp;<a href='downloadFile.action' title='Download'><img src='images/download.png'/></a></div>" );
+		_sHTMLBUTTONS.push( "&nbsp;&nbsp;<a href='downloadFile.action' title='Download'><img src='images/download.png'/></a></div>" );
 	}
 	
-	var tabsHTML 	= [ htmlPrintDownloadFunc.join('') + '<div id="tabs"><ul>' ];
+	var tabsHTML 	= [ _sHTMLBUTTONS.join('') + '<div id="tabs"><ul>' ];
 
 	for (var s = 0 ; s < _sheets.length ; s ++)
 	{
@@ -207,12 +208,12 @@
 	}
 
 	tabsHTML.push( '</ul>', _sHTML.join(''), '</div>' );
-	tabsHTML.push( htmlPrintDownloadFunc.join('') );
+	tabsHTML.push( _sHTMLBUTTONS.join('') );
 
 	jQuery( '#previewDiv' ).html( tabsHTML.join('') );
 	jQuery( '#tabs' ).tabs({ collapsible : true });
-	enable( 'printExcelReportButton' );
 	applyStyleIntoPreview();
+	showById( "previewDiv" );
 	unLockScreen();
 }