← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3938: Made the chart popup in web pivot table a modal dialog

 

------------------------------------------------------------
revno: 3938
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-06-17 19:53:38 +0200
message:
  Made the chart popup in web pivot table a modal dialog
modified:
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/pivot.js
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.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-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js	2011-06-14 08:04:40 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dropdown.js	2011-06-17 17:53:38 +0000
@@ -1,3 +1,4 @@
+
 function setAreaItem( area, item )
 {
     $.get( "setAreaItem.action", {
@@ -24,13 +25,13 @@
     var width = 700 + 20;
     var height = 500 + 20;
 
-    $( '#chartImage' ).attr( 'src', url );
-    $( '#chartView' ).dialog( {
+    $( "#chartImage" ).attr( "src", url );
+    $( "#chartView" ).dialog( {
         autoOpen : true,
         modal : true,
         height : height + 35,
         width : width,
         resizable : false,
-        title : 'Viewing Chart'
+        title : "Viewing Chart"
     } );
 }

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2011-06-17 10:58:25 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm	2011-06-17 17:53:38 +0000
@@ -81,6 +81,6 @@
 </tr>
 </table>
 
-<div id="chartView" style="display: none; padding: 0; margin: 0;'">
+<div id="chartView" style="display:none; padding:0; margin:0;">
 	<img id="chartImage" src="" style="padding: 10px;"></img>
 </div>

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/pivot.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/pivot.js	2011-04-29 06:08:08 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/pivot.js	2011-06-17 17:53:38 +0000
@@ -178,7 +178,20 @@
   
   hideDropDown();
   
-  window.open( url, "_blank", "directories=no, height=550, width=" + chartWidth + ", location=no, menubar=no, status=no, toolbar=no, scrollbars=no" );
+  openChartDialog( url, chartWidth );  
+}
+
+function openChartDialog( url, width )
+{
+    $( "#chartImage" ).attr( "src", url );
+    $( "#chartView" ).dialog( {
+        autoOpen : true,
+        modal : true,
+        height : 570,
+        width : width,
+        resizable : false,
+        title : "Chart"
+    } );
 }
 
 /**

=== modified file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm	2011-04-29 06:08:08 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm	2011-06-17 17:53:38 +0000
@@ -201,3 +201,7 @@
 <table id="pivotTable" class="pivot"></table>
 
 </div>
+
+<div id="chartView" style="display:none; padding:0; margin:0;">
+	<img id="chartImage" src="" style="padding: 10px;"></img>
+</div>