dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14201
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4728: Use jQuery.dialog to show report form into Summary report instead of popup window.
------------------------------------------------------------
revno: 4728
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-28 11:18:15 +0700
message:
Use jQuery.dialog to show report form into Summary report instead of popup window.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.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/webapp/dhis-web-caseentry/javascript/report.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js 2011-09-28 04:02:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/report.js 2011-09-28 04:18:15 +0000
@@ -22,7 +22,7 @@
}
else
{
- addOptionById( 'programId', "", i18n_select );
+ addOptionById( 'programId', "", i18n_please_select_a_program );
for ( var i in json.programs )
{
@@ -89,13 +89,15 @@
function viewRecords( programStageInstanceId )
{
- var url = 'viewRecords.action?id=' + programStageInstanceId;
-
- var width = 800;
- var height = 500;
- var left = parseInt( ( screen.availWidth/2 ) - ( width/2 ) );
- var top = parseInt( ( screen.availHeight/2 ) - ( height/2 ) );
- var windowFeatures = 'width=' + width + ',height=' + height + ',scrollbars=yes, resizable=yes,left=' + left + ',top=' + top + 'screenX=' + left + ',screenY=' + top;
-
- window.open( url, '_blank_', windowFeatures);
+ $('<div id="viewRecordsDiv">' )
+ .load( 'viewRecords.action?id=' + programStageInstanceId )
+ .dialog({
+ title: i18n_reports,
+ maximize: true,
+ closable: true,
+ modal:true,
+ overlay:{background:'#000000', opacity:0.1},
+ width: 800,
+ height: 400
+ });
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm 2011-09-01 04:50:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/records.vm 2011-09-28 04:18:15 +0000
@@ -1,8 +1,3 @@
-
-<p align="right">
- <input type="button" value="$i18n.getString( "close" )" onclick="window.close()" style="width:10em"/>
-</p>
-
<table>
<tr>
<td><strong>$i18n.getString( "full_name" ):</strong></td>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm 2011-08-04 06:25:28 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportSelect.vm 2011-09-28 04:18:15 +0000
@@ -58,5 +58,6 @@
<script type="text/javascript">
var i18n_report_generation_failed = '$encoder.jsEscape( $i18n.getString( "report_generation_failed" ), "'")';
- var i18n_select = '$encoder.jsEscape( $i18n.getString( "select" ), "'")';
+ var i18n_please_select_a_program = '[' + '$encoder.jsEscape( $i18n.getString( "please_select_a_program" ), "'")' + ']';
+ var i18n_reports = '$encoder.jsEscape( $i18n.getString( "reports" ), "'")';
</script>