← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4364: Showing data div when opening pivot table

 

------------------------------------------------------------
revno: 4364
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-08-19 10:01:56 +0200
message:
  Showing data div when opening pivot table
removed:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/criteria.js
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml
  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-reporting/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2011-07-27 10:24:35 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/resources/struts.xml	2011-08-19 08:01:56 +0000
@@ -427,7 +427,7 @@
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-reporting/viewPivotTableForm.vm</param>
       <param name="menu">/dhis-web-reporting/menu.vm</param>
-      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/pivot.js,javascript/criteria.js</param>
+      <param name="javascripts">../dhis-web-commons/oust/oust.js,javascript/pivot.js</param>
     </action>
 
     <action name="getPivotTable" class="org.hisp.dhis.reporting.pivottable.action.GetPivotTableAction">

=== removed file 'dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/criteria.js'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/criteria.js	2011-06-23 14:38:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/criteria.js	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-// -------------------------------------------------------------------------
-// Public methods
-// -------------------------------------------------------------------------
-
-function toggleDataType()
-{
-    $( "#indicatorGroupDiv" ).toggle();
-    $( "#dataElementGroupDiv" ).toggle();
-}
-
-function showCriteria()
-{
-    $( "div#criteria" ).show( "fast" );
-}
-
-function hideCriteria()
-{
-    $( "div#criteria" ).hide( "fast" );
-}
-
-function showPivot()
-{
-    $( "div#pivot" ).show( "fast" );
-}
-
-function hidePivot()
-{
-    $( "div#pivot" ).hide( "fast" );
-}
-
-function hideDivs()
-{
-    hideCriteria();
-    hidePivot();
-}

=== 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-06-23 14:38:00 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/javascript/pivot.js	2011-08-19 08:01:56 +0000
@@ -197,8 +197,9 @@
  */
 function viewChartMenu( indicatorId, periodId, orgunitId )
 {
-    if ( currentDataType == DATA_TYPE_INDICATOR ) // Currently indicators only
-                                                    // supported
+	// Currently only indicators supported
+	
+    if ( currentDataType == DATA_TYPE_INDICATOR ) 
     {
         currentIndicator = indicatorId;
         currentPeriod = periodId;
@@ -208,15 +209,6 @@
     }
 }
 
-/**
- * Loads the event listeners for the pivot table. Called after page is loaded.
- */
-function loadListeners()
-{
-    var table = document.getElementById( "pivotTable" );
-    table.addEventListener( "click", setPosition, false );
-}
-
 // -----------------------------------------------------------------------------
 // Supportive methods
 // -----------------------------------------------------------------------------
@@ -556,3 +548,39 @@
     data.length = 0;
     sizes.length = 0;
 }
+
+// -------------------------------------------------------------------------
+// Public methods
+// -------------------------------------------------------------------------
+
+function toggleDataType()
+{
+    $( "#indicatorGroupDiv" ).toggle();
+    $( "#dataElementGroupDiv" ).toggle();
+}
+
+function showCriteria()
+{
+    $( "div#criteria" ).show( "fast" );
+}
+
+function hideCriteria()
+{
+    $( "div#criteria" ).hide( "fast" );
+}
+
+function showPivot()
+{
+    $( "div#pivot" ).show( "fast" );
+}
+
+function hidePivot()
+{
+    $( "div#pivot" ).hide( "fast" );
+}
+
+function hideDivs()
+{
+    hideCriteria();
+    hidePivot();
+}

=== 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-07-01 08:11:03 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/viewPivotTableForm.vm	2011-08-19 08:01:56 +0000
@@ -1,7 +1,8 @@
 <script type="text/javascript">
    jQuery(document).ready(function(){
 		
-		loadListeners();
+		$( "#pivotTable" ).click( setPosition );
+		showCriteria();
 
 		selectionTreeSelection.setMultipleSelectionAllowed( false );
 		selectionTreeSelection.setListenerFunction( organisationUnitSelected );
@@ -39,6 +40,8 @@
   background-color: #d9ece1;
   padding-left: 20px;
   margin-bottom: 6px;
+  border-radius: 3px;
+  -moz-border-radius: 3px; /* Firefox */
 }
 
 div#pivot
@@ -51,6 +54,8 @@
   background-color: #d9ece1;
   padding-left: 20px;
   margin-bottom: 6px;
+  border-radius: 3px;
+  -moz-border-radius: 3px; /* Firefox */
 }
 
 div.inputSection