← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3312: Work in progress

 

------------------------------------------------------------
revno: 3312
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-04-07 12:29:18 +0200
message:
  Work in progress
added:
  labs/dhis-web-light/src/main/webapp/dhis-web-light/main.vm
modified:
  labs/dhis-web-light/src/main/resources/struts.xml
  labs/dhis-web-light/src/main/webapp/dhis-web-light/dashboard.vm
  labs/dhis-web-light/src/main/webapp/dhis-web-light/inputReportParamsForm.vm
  labs/dhis-web-light/src/main/webapp/dhis-web-light/style/dhis-web-light.css


--
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 'labs/dhis-web-light/src/main/resources/struts.xml'
--- labs/dhis-web-light/src/main/resources/struts.xml	2011-04-07 08:52:20 +0000
+++ labs/dhis-web-light/src/main/resources/struts.xml	2011-04-07 10:29:18 +0000
@@ -9,9 +9,15 @@
   <package name="dhis-web-light" extends="dhis-web-commons" namespace="/dhis-web-light">
 
     <action name="index" class="org.hisp.dhis.light.action.ProvideContentAction">
-	  <result name="success" type="velocity">/dhis-web-light/dashboard.vm</result>
+	  <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+	  <param name="page">/dhis-web-light/dashboard.vm</param>
     </action>
 
+    <action name="getReportParams" class="org.hisp.dhis.light.action.GetReportParamsAction">
+	  <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+	  <param name="page">/dhis-web-light/inputReportParamsForm.vm</param>
+    </action>
+    
     <action name="getChart" class="org.hisp.dhis.light.action.GetChartAction">
       <result name="success" type="chart">
       <param name="width">480</param>
@@ -19,9 +25,5 @@
       </result>
     </action>
     
-    <action name="getReportParams" class="org.hisp.dhis.light.action.GetReportParamsAction">
-      <result name="success" type="velocity">/dhis-web-light/inputReportParamsForm.vm</result>
-    </action>
-    
   </package>
 </struts>
\ No newline at end of file

=== modified file 'labs/dhis-web-light/src/main/webapp/dhis-web-light/dashboard.vm'
--- labs/dhis-web-light/src/main/webapp/dhis-web-light/dashboard.vm	2011-04-07 08:52:20 +0000
+++ labs/dhis-web-light/src/main/webapp/dhis-web-light/dashboard.vm	2011-04-07 10:29:18 +0000
@@ -1,46 +1,12 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd";>
-<html>
-<head>
-  <title>DHIS 2</title>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  
-  <link type="text/css" rel="stylesheet" media="screen" href="style/dhis-web-light.css">
-  
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
-  <script type="text/javascript" src="javascript/dhis-web-light.js"></script>
-  
-</head>
-<head>
-<body>
 
 <div class="headerDiv"><span class="header">DHIS 2</span></div>
 
 <!-- Charts -->
 
 <div class="contentDiv">
-
 #foreach( $id in $charts )
-<div class="contentChartDiv"><img src="getChart.action?id=${id}" style="width:100%"></div>
-#end
-
-#if( $chartAreaA )
-<div class="contentChartDiv"><img src="getChart.action?id=${chartAreaA}" style="width:100%"></div>
-#end
-
-#if( $chartAreaB )
-<div class="contentChartDiv"><img src="getChart.action?id=${chartAreaB}" style="width:100%"></div>
-#end
-
-#if( $chartAreaC )
-<div class="contentChartDiv"><img src="getChart.action?id=${chartAreaC}" style="width:100%"></div>
-#end
-
-#if( $chartAreaD )
-<div class="contentChartDiv"><img src="getChart.action?id=${chartAreaD}" style="width:100%"></div>
-#end
-
+<div class="contentChartDiv"><img src="getChart.action?id=${id}" style="width:100%"></div>
+#end
 </div>
 
 <!-- Report tables -->
@@ -62,6 +28,3 @@
 <div class="contentItemDiv" onclick="">$encoder.htmlEncode( $doc.name )</div>
 #end
 </div>
-
-</body>
-</html>

=== modified file 'labs/dhis-web-light/src/main/webapp/dhis-web-light/inputReportParamsForm.vm'
--- labs/dhis-web-light/src/main/webapp/dhis-web-light/inputReportParamsForm.vm	2011-04-07 08:52:20 +0000
+++ labs/dhis-web-light/src/main/webapp/dhis-web-light/inputReportParamsForm.vm	2011-04-07 10:29:18 +0000
@@ -1,22 +1,3 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd";>
-<html>
-<head>
-  <title>DHIS 2</title>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  
-  <link type="text/css" rel="stylesheet" media="screen" href="../dhis-web-commons/css/widgets.css">
-  <link type="text/css" rel="stylesheet" media="screen" href="style/dhis-web-light.css">
-  
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
-  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
-  <script type="text/javascript" src="../dhis-web-commons/oust/oust.js"></script>
-  <script type="text/javascript" src="../request.js"></script>
-  <script type="text/javascript" src="javascript/dhis-web-light.js"></script>
-  
-</head>
-<head>
-<body>
 
 <script type="text/javascript">
 	jQuery(document).ready(function() {
@@ -30,71 +11,48 @@
 	var i18n_please_select_unit = '$encoder.jsEscape( $i18n.getString( "select_organisation_unit" ), "'")';
 </script>
 
-<h3>$i18n.getString( "report_table_parameters" )</h3>
+<div class="headerDiv"><span class="header">$i18n.getString( "report_table_parameters" )</span></div>
 
 <input type="hidden" id="id" name="id" value="$!id" />
 
-<table>
-	
-    <!-- Reporting month -->
-    
-    #if ( $!reportParams.isParamReportingMonth() )
-    
-    <tr>
-        <th>$i18n.getString( "reporting_month" )</th>
-    </tr>
-    <tr>
-        <td>
-            <select id="reportingPeriod" name="reportingPeriod" style="width:325px">               
-                #foreach ( $key in $reportingPeriods.keySet() )
-                    <option value="$key">$reportingPeriods.get( $key )</option>
-                #end
-            </select>
-        </td>
-    </tr>
-    <tr>
-        <td colspan="4" style="height:10px"></td>
-    </tr>
-    
-    #end
-    
-    <!-- OrganisationUnit -->
-    
-    #if ( $!reportParams.isParamGrandParentOrganisationUnit() || $!reportParams.isParamParentOrganisationUnit() || $!reportParams.isParamOrganisationUnit() )
-        
-	<tr>
-        <th>$i18n.getString( "organisation_unit" )</th>
-    </tr>
-    <tr>
-	    <td>
-			<div id="selectionTree" style="width:325px; height:200px"></div>	            
-			<script type="text/javascript">
-				selectionTreeSelection.setMultipleSelectionAllowed( false );
-				selectionTreeSelection.setListenerFunction( paramOrganisationUnitSet );
-				selectionTree.clearSelectedOrganisationUnits();
-			    selectionTree.buildSelectionTree();
-			</script>
-	    </td>
-	</tr>
-    <tr>
-        <td colspan="4" style="height:10px"></td>
-    </tr>
-    
-    #end
-    
-    <!-- Submit -->
-    
-    <tr>
-        <td>
-    	#if( $!reportParams.isSet() )
-        <input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport()" style="width:140px" />
-        <input type="button" value="$i18n.getString( 'back' )" onclick="javascript:window.location.href='displayManageTableForm.action'" style="width:140px" />
-        #end
-        </td>
-    </tr>
-</table>
+<!-- Reporting month -->
+
+#if ( $!reportParams.isParamReportingMonth() )
+
+<div class="labelDiv">$i18n.getString( "reporting_month" )</div>
+
+<div class="pageDiv">
+<select id="reportingPeriod" name="reportingPeriod" style="width:300px">               
+#foreach ( $key in $reportingPeriods.keySet() )
+<option value="$key">$reportingPeriods.get( $key )</option>
+#end
+</select>
+</div>
+
+#end
+
+<!-- OrganisationUnit -->
+
+#if ( $!reportParams.isParamGrandParentOrganisationUnit() || $!reportParams.isParamParentOrganisationUnit() || $!reportParams.isParamOrganisationUnit() )
+
+<div class="labelDiv">$i18n.getString( "organisation_unit" )</div>
+
+<div class="pageDiv" id="selectionTree" style="width:300px; height:200px"></div>	            
+<script type="text/javascript">
+	selectionTreeSelection.setMultipleSelectionAllowed( false );
+	selectionTreeSelection.setListenerFunction( paramOrganisationUnitSet );
+	selectionTree.clearSelectedOrganisationUnits();
+	selectionTree.buildSelectionTree();
+</script>
+
+#end
+
+<!-- Submit -->
+
+<div class="labelDiv">
+#if( $!reportParams.isSet() )
+<input type="button" value="$i18n.getString( 'get_report' )" onclick="generateReport()" style="width:150px" />
+#end
+</div>
 
 <span id="message"></span>
-
-</body>
-</html>

=== added file 'labs/dhis-web-light/src/main/webapp/dhis-web-light/main.vm'
--- labs/dhis-web-light/src/main/webapp/dhis-web-light/main.vm	1970-01-01 00:00:00 +0000
+++ labs/dhis-web-light/src/main/webapp/dhis-web-light/main.vm	2011-04-07 10:29:18 +0000
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd";>
+<html>
+<head>
+  <title>DHIS 2</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  
+  <link type="text/css" rel="stylesheet" media="screen" href="style/dhis-web-light.css">
+  
+  <meta name="viewport" content="width=320"/>
+  <meta name="viewport" content="initial-scale=1.0"/>
+  <meta name="viewport" content="user-scalable=true"/>
+  
+  <script type="text/javascript" src="../dhis-web-commons/javascripts/jQuery/jquery.min.js"></script>
+  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.js"></script>
+  <script type="text/javascript" src="../dhis-web-commons/javascripts/commons.ajax.js"></script>
+  <script type="text/javascript" src="../dhis-web-commons/oust/oust.js"></script>
+  <script type="text/javascript" src="../request.js"></script>
+  <script type="text/javascript" src="javascript/dhis-web-light.js"></script>
+  
+</head>
+<head>
+<body>
+
+#parse( $page )
+
+</body>
+</html>

=== modified file 'labs/dhis-web-light/src/main/webapp/dhis-web-light/style/dhis-web-light.css'
--- labs/dhis-web-light/src/main/webapp/dhis-web-light/style/dhis-web-light.css	2011-04-07 08:52:20 +0000
+++ labs/dhis-web-light/src/main/webapp/dhis-web-light/style/dhis-web-light.css	2011-04-07 10:29:18 +0000
@@ -3,24 +3,27 @@
 /* Dashboard                                                                  */
 /*----------------------------------------------------------------------------*/
 
-html, body {
-  font-family: sans-serif;
-}
-
 body {
   margin: 0px;
   padding: 0px;
+  font-family: sans-serif;
+  background-color: #35699f;
+  color: #ffffff;
+}
+
+table th {
+  text-align: left;
 }
   
 .headerDiv {
   position: relative;
   width: 100%;
-  font-size: 2em;
-  color: #ffffff;
+  font-size: 1em;
   background-color: #000000;
   padding-top: 0.6em;
   padding-bottom: 0.6em;
-  border-bottom: 1px solid #e0e0e0;
+  border-top: 1px solid #ffffff;
+  border-bottom: 1px solid #ffffff;
 }
 
 .header {
@@ -33,32 +36,39 @@
 }
 
 .contentChartDiv {
-  margin-top: 1.5em;
+  margin-top: 1em;
   padding-top: 1.5em;
   padding-bottom: 1.5em;
-  margin-bottom: 1.5em;
-  border-bottom: 1px solid #e0e0e0;
+  margin-bottom: 1em;
+  background-color: #ffffff;
 }
 
 .contentItemDiv {
-  color: #ffffff;
-  font-size: 2em;
-  padding: 1.5em;
+  font-size: 1em;
+  padding: 1.2em;
   border-bottom: 1px solid #e0e0e0;
-  background-color: #35699f;
   cursor: pointer;
 }
 
+.labelDiv {
+  font-size: 1em;
+  margin-top: 1em;
+  margin-bottom: 0.4em;
+  margin-left: 0.3em;
+}
+
+.pageDiv { 
+  margin-left: 0.3em;
+}
+
 /*----------------------------------------------------------------------------*/
 /* Organisation Unit Selection Tree                                           */
 /*----------------------------------------------------------------------------*/
 
 div#selectionTree 
 {
-  font-size: 9pt; /* Size to change */
+  font-size: 1em; /* Size to change */
   background-color: white;
-  height: 300px;
-  width:595px;  
   overflow:auto;
   border:1px solid #cccccc;   
 }
@@ -82,7 +92,7 @@
 div#selectionTree span.toggle 
 {
   font-family: courier new, monospace;
-  font-size: 9pt; /* Size to change */
+  font-size: 1em; /* Size to change */
   cursor: pointer;
 }