dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14101
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4654: added simple mobile interface to select orgunit/dataset/period (no dataentry yet, just a mockup)
------------------------------------------------------------
revno: 4654
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2011-09-23 15:11:20 +0200
message:
added simple mobile interface to select orgunit/dataset/period (no dataentry yet, just a mockup)
added:
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetDataSetsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetOrganisationUnitsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetPeriodsAction.java
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectOrganisationUnit.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css
modified:
dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java
--
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
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetDataSetsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetDataSetsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetDataSetsAction.java 2011-09-23 13:11:20 +0000
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.light.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetDataSetsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer organisationUnitId;
+
+ public void setOrganisationUnitId( Integer organisationUnitId )
+ {
+ this.organisationUnitId = organisationUnitId;
+ }
+
+ public Integer getOrganisationUnitId()
+ {
+ return organisationUnitId;
+ }
+
+ private List<DataSet> dataSets = new ArrayList<DataSet>();
+
+ public List<DataSet> getDataSets()
+ {
+ return dataSets;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String execute()
+ {
+ if ( organisationUnitId != null )
+ {
+ OrganisationUnit organisationUnit = organisationUnitService.getOrganisationUnit( organisationUnitId );
+ dataSets = new ArrayList<DataSet>( organisationUnit.getDataSets() );
+ }
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetOrganisationUnitsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetOrganisationUnitsAction.java 2011-09-23 13:11:20 +0000
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+package org.hisp.dhis.light.action;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.organisationunit.OrganisationUnitService;
+import org.hisp.dhis.user.CurrentUserService;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetOrganisationUnitsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private CurrentUserService currentUserService;
+
+ public void setCurrentUserService( CurrentUserService currentUserService )
+ {
+ this.currentUserService = currentUserService;
+ }
+
+ private OrganisationUnitService organisationUnitService;
+
+ public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
+ {
+ this.organisationUnitService = organisationUnitService;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private List<OrganisationUnit> organisationUnits = new ArrayList<OrganisationUnit>();
+
+ public List<OrganisationUnit> getOrganisationUnits()
+ {
+ return organisationUnits;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String execute()
+ {
+ List<OrganisationUnit> userOrganisationUnits = new ArrayList<OrganisationUnit>( currentUserService
+ .getCurrentUser().getOrganisationUnits() );
+
+ for ( OrganisationUnit unit : userOrganisationUnits )
+ {
+ organisationUnits.addAll( organisationUnitService.getOrganisationUnitWithChildren( unit.getId() ) );
+ }
+
+// Collections.sort( organisationUnits, new OrganisationUnitNameComparator() );
+ organisationUnits = organisationUnits.subList( 0, 50 );
+
+ return SUCCESS;
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetPeriodsAction.java'
--- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetPeriodsAction.java 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/GetPeriodsAction.java 2011-09-23 13:11:20 +0000
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2004-2011, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ * be used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package org.hisp.dhis.light.action;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+import org.hisp.dhis.dataset.DataSet;
+import org.hisp.dhis.dataset.DataSetService;
+import org.hisp.dhis.i18n.I18nFormat;
+import org.hisp.dhis.period.CalendarPeriodType;
+import org.hisp.dhis.period.Period;
+import org.hisp.dhis.period.PeriodService;
+import org.hisp.dhis.period.PeriodType;
+
+import com.opensymphony.xwork2.Action;
+
+/**
+ * @author mortenoh
+ */
+public class GetPeriodsAction
+ implements Action
+{
+ // -------------------------------------------------------------------------
+ // Dependencies
+ // -------------------------------------------------------------------------
+
+ private DataSetService dataSetService;
+
+ public void setDataSetService( DataSetService dataSetService )
+ {
+ this.dataSetService = dataSetService;
+ }
+
+ private PeriodService periodService;
+
+ public void setPeriodService( PeriodService periodService )
+ {
+ this.periodService = periodService;
+ }
+
+ private I18nFormat format;
+
+ public void setFormat( I18nFormat format )
+ {
+ this.format = format;
+ }
+
+ // -------------------------------------------------------------------------
+ // Input & Output
+ // -------------------------------------------------------------------------
+
+ private Integer organisationUnitId;
+
+ public void setOrganisationUnitId( Integer organisationUnitId )
+ {
+ this.organisationUnitId = organisationUnitId;
+ }
+
+ public Integer getOrganisationUnitId()
+ {
+ return organisationUnitId;
+ }
+
+ private Integer dataSetId;
+
+ public void setDataSetId( Integer dataSetId )
+ {
+ this.dataSetId = dataSetId;
+ }
+
+ public Integer getDataSetId()
+ {
+ return dataSetId;
+ }
+
+ private List<Period> periods = new ArrayList<Period>();
+
+ public List<Period> getPeriods()
+ {
+ return periods;
+ }
+
+ // -------------------------------------------------------------------------
+ // Action Implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public String execute()
+ {
+ if ( dataSetId != null )
+ {
+ DataSet dataSet = dataSetService.getDataSet( dataSetId );
+ CalendarPeriodType periodType = (CalendarPeriodType) dataSet.getPeriodType();
+ periods = periodType.generatePeriods( new Date() );
+ }
+
+ for ( Period period : periods )
+ {
+ period.setName( format.formatPeriod( period ) );
+ }
+
+ return SUCCESS;
+ }
+}
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2011-09-22 10:22:37 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2011-09-23 13:11:20 +0000
@@ -5,6 +5,20 @@
<bean id="org.hisp.dhis.light.action.NoAction" class="org.hisp.dhis.light.action.NoAction" />
+ <bean id="org.hisp.dhis.light.action.GetOrganisationUnitsAction" class="org.hisp.dhis.light.action.GetOrganisationUnitsAction">
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
+ <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.light.action.GetDataSetsAction" class="org.hisp.dhis.light.action.GetDataSetsAction">
+ <property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ </bean>
+
+ <bean id="org.hisp.dhis.light.action.GetPeriodsAction" class="org.hisp.dhis.light.action.GetPeriodsAction">
+ <property name="dataSetService" ref="org.hisp.dhis.dataset.DataSetService" />
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService" />
+ </bean>
+
<bean id="org.hisp.dhis.light.action.ProvideContentAction" class="org.hisp.dhis.light.action.ProvideContentAction"
scope="prototype">
<property name="dashboardManager" ref="org.hisp.dhis.dashboard.DashboardManager" />
@@ -26,4 +40,4 @@
<property name="selectionTreeManager" ref="org.hisp.dhis.oust.manager.SelectionTreeManager" />
</bean>
-</beans>
\ No newline at end of file
+</beans>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-09-22 10:22:37 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2011-09-23 13:11:20 +0000
@@ -9,6 +9,27 @@
<action name="index" class="org.hisp.dhis.light.action.NoAction">
<result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/menu.vm</param>
+ </action>
+
+ <action name="selectOrganisationUnit" class="org.hisp.dhis.light.action.GetOrganisationUnitsAction">
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/selectOrganisationUnit.vm</param>
+ </action>
+
+ <action name="selectDataSet" class="org.hisp.dhis.light.action.GetDataSetsAction">
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/selectDataSet.vm</param>
+ </action>
+
+ <action name="selectPeriod" class="org.hisp.dhis.light.action.GetPeriodsAction">
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/selectPeriod.vm</param>
+ </action>
+
+ <action name="dataEntry" class="org.hisp.dhis.light.action.NoAction">
+ <result name="success" type="velocity">/dhis-web-light/main.vm</result>
+ <param name="page">/dhis-web-light/dataEntry.vm</param>
</action>
<action name="dashboard" class="org.hisp.dhis.light.action.ProvideContentAction">
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/dataEntry.vm 2011-09-23 13:11:20 +0000
@@ -0,0 +1,43 @@
+
+<h2>Immunization</h2>
+
+<form>
+
+<div class="header-box">
+ <h3>BCG doses given</h3>
+ <p>
+ <label>Fixed | < 12 mths</label> <input type="text" size="24" /><br />
+ <label>Fixed | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | < 12 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ </p>
+</div>
+
+<div class="header-box">
+ <h3>Fully Immunized child</h3>
+ <p>
+ <label>Fixed | < 12 mths</label> <input type="text" size="24" /><br />
+ <label>Fixed | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | < 12 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ </p>
+</div>
+
+<div class="header-box">
+ <h3>LLITN given at Penta3</h3>
+ <p>
+ <label>Fixed | < 12 mths</label> <input type="text" size="24" /><br />
+ <label>Fixed | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | < 12 mths</label> <input type="text" size="24" /> <br />
+ <label>Outreach | 12 to 59 mths</label> <input type="text" size="24" /> <br />
+ </p>
+</div>
+
+<div class="header-box">
+ <p>
+ <input type="submit" style="width: 48%" value="Submit"/>
+ <input type="reset" style="width: 48%" value="Reset"/>
+ </p>
+</div>
+
+</form>
=== modified file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm 2011-09-22 10:22:37 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/main.vm 2011-09-23 13:11:20 +0000
@@ -3,83 +3,29 @@
<head>
<title>DHIS 2</title>
<meta name="viewport" content="width=device-width, user-scalable=yes" />
-
-<style type="text/css">
-html,body
-{
- background-color: #1d5288;
- color: white;
- font-size: 1.1em;
- width: 100%;
- font-family: verdana, sans, sans-serif;
-
- padding: 0;
- margin: 0;
-}
-
-.header {
- border-bottom: 1px solid #eee;
- font-size: 1.2em;
- font-weight: bold;
- background-color: black;
- color: white;
- width: 100%;
- padding-top: 5px;
- padding-bottom: 5px;
-}
-
-.header span {
- padding-left: 5px;
-}
-
-.footer {
- border-top: 1px solid #eee;
- font-size: 0.8em;
- background-color: black;
- color: white;
- width: 100%;
- padding-top: 5px;
- padding-bottom: 5px;
- text-align: right;
-}
-
-.footer a {
- padding-right: 5px;
-}
-
-input {
- font-size: 1em;
- font-family: verdana, sans, sans-serif;
- width: 96%;
-}
-
-table {
- width: 100%;
-}
-
-a:link, a:visited, a:active, a:hover {
- color: white;
-}
-
-ul li {
- list-style-type: none;
-}
-</style>
-
+<link rel="stylesheet" href="style/light.css" />
</head>
<body>
-<div class="header">
+<div id="wrap">
+
+<div id="header">
<span>DHIS 2</span>
</div>
-<ul>
- <li><a href="dashboard.action">Dashboard</a></li>
-</ul>
-
-<div class="footer">
- <a href="../dhis-web-commons-security/logout.action">Logout</a>
+<div id="content">
+
+#parse( $page )
+
+</div>
+
+<div id="footer">
+ <ul>
+ <li><a href="../dhis-web-commons-security/logout.action">Logout</a></li>
+ </ul>
+</div>
+
</div>
</body>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2011-09-23 13:11:20 +0000
@@ -0,0 +1,7 @@
+
+<h2>Menu</h2>
+
+<ul>
+ <li><a href="dashboard.action">Dashboard</a></li>
+ <li><a href="selectOrganisationUnit.action">Data Entry</a></li>
+</ul>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectDataSet.vm 2011-09-23 13:11:20 +0000
@@ -0,0 +1,11 @@
+
+<h2>Select DataSet</h2>
+<h3>Available DataSets</h3>
+
+<p>
+ <ul>
+ #foreach( $dataSet in $dataSets )
+ <li><a href="selectPeriod.action?organisationUnitId=$organisationUnitId&dataSetId=$dataSet.id">$!encoder.jsonEncode( ${dataSet.name} )</a></li>
+ #end
+ </ul>
+</p>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectOrganisationUnit.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectOrganisationUnit.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectOrganisationUnit.vm 2011-09-23 13:11:20 +0000
@@ -0,0 +1,11 @@
+
+<h2>Select OrganisationUnit</h2>
+<h3>Available Organisation Units</h3>
+
+<p>
+ <ul>
+ #foreach( $organisationUnit in $organisationUnits )
+ <li><a href="selectDataSet.action?organisationUnitId=$organisationUnit.id">$!encoder.jsonEncode( ${organisationUnit.name} )</a></li>
+ #end
+ </ul>
+</p>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/selectPeriod.vm 2011-09-23 13:11:20 +0000
@@ -0,0 +1,11 @@
+
+<h2>Select Period</h2>
+<h3>Available Periods</h3>
+
+<p>
+ <ul>
+ #foreach( $period in $periods )
+ <li><a href="dataEntry.action?organisationUnitId=$organisationUnitId&dataSetId=$dataSetId&periodId=$period.getExternalId()">$!encoder.jsonEncode( ${period.name} )</a></li>
+ #end
+ </ul>
+</p>
=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css'
--- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css 2011-09-23 13:11:20 +0000
@@ -0,0 +1,494 @@
+@charset "UTF-8";
+/* CSS Document */
+/*
+ * RESET
+ *
+ */
+
+html, body, div, span, object, blockquote, pre,
+abbr, acronym, address, big, cite, code, dfn, em, font, img, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center, dl, dt, dd, fieldset, form, label, legend,
+caption, tr, th, td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font-weight: normal;
+ vertical-align: baseline;
+ background: transparent;
+}
+
+p {
+ border: 0;
+ font-size: 100%;
+ font-weight: normal;
+ vertical-align: baseline;
+ background: transparent;
+}
+a {
+ margin: 0;
+ padding: 0;
+ font-weight: normal;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ vertical-align: baseline;
+ background: transparent;
+}
+
+body table {
+ margin: 0;
+ padding: 0;
+ font-size: 100%;
+ font-weight: normal;
+ vertical-align: baseline;
+ background: transparent;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+/*
+ * DEFAULT STYLES
+ *
+ */
+body {
+ color: #333333;
+ font-weight: normal;
+ font-family: sans-serif;
+}
+/*removes horizontal overflow on certain devices*/
+body div#wrap {
+ width: 100%;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ padding: 0;
+}
+/*
+ * HEADER
+ *
+ */
+body div#header {
+ height: 2.0em;
+ background-color: #D8D8D8;
+ border-bottom: 4px solid #44AA33;
+ margin-bottom: .5em;
+}
+
+body div#header span {
+ font-size: 1.5em;
+ font-weight: bold;
+ padding-left: 2%;
+ padding-right: 2%;
+ color: blue;
+ margin-bottom: .4em;
+ margin-top: .4em;
+}
+
+/*
+ * FOOTER
+ *
+ */
+body div#footer {
+ background-color: #F6F6F6;
+ border-top: 1px solid #D8D8D8;
+ padding: .7em 0em;
+ clear: both;
+ height: 1.5em;
+ display: block;
+}
+
+body div#footer ul {
+ margin-left: 2em;
+ padding-left: 0;
+ margin-bottom: 0;
+ margin-top: 0;
+}
+
+body div#footer ul li {
+ margin-left: 0;
+ padding-left: 0;
+}
+
+body div#footer p {
+ margin-left: 2%;
+ margin-top: .3em;
+ padding: 0;
+}
+
+body div#footer ul li {
+ list-style-type: none;
+ text-align: right;
+ padding-right: 1em;
+}
+
+/*
+ * BASIC ELEMENTS
+ *
+ */
+
+/*body required as early browsers don't understand p by itself */
+body p {
+ margin-top: 0;
+ margin-bottom: 0.6em;
+ padding: 0 2% 0 2%;
+ font-size: 100%;
+}
+
+strong {
+ font-weight: bold;
+}
+em {
+ font-style: normal;
+ font-weight: bold;
+}
+/*
+ * LINK STATES
+ *
+ */
+a:link {
+ color:#003399;
+}
+
+a:visited {
+ color:#006600;
+}
+a:hover {
+ color:#FF9900;
+}
+
+a:active {
+ color:#990000;
+}
+
+/*
+ * HEADERS
+ *
+ */
+body h1 {
+ font-size: 1.4em;
+ padding-left: 2%;
+ padding-right: 2%;
+ margin-top: 0;
+ margin-bottom: 0.4em;
+ line-height: normal;
+ clear: both;
+}
+
+body h2 {
+ font-size: 1.3em;
+ padding-left: 2%;
+ padding-right: 2%;
+ color: white;
+ background-color: #44AA33;
+ border-top: 1px solid #67DD30;
+ border-bottom: 2px solid #378C29;
+ margin-top: 0;
+ margin-bottom: 0.4em;
+ line-height: normal;
+ clear: both;
+}
+
+body h3 {
+/* font-size: 1.2em;
+ padding-left: 2%;
+ padding-right: 2%;
+ background-color: #0038E1;
+ color: #FFFFFF;
+ margin-top: 0;
+ margin-bottom: 0.4em;
+ border-top: 1px solid #0081CA;
+ border-bottom: 2px solid #000C30;
+ */
+ font-size: 0.8em;
+ border: 2px solid #0038E1;
+ width: 95%;
+ margin: 0em auto;
+ padding: 0.3em 0.3em;
+ background-color: #0038E1;
+ color: white;
+}
+
+body h4 {
+ font-size: 1.1em;
+ padding-left: 2%;
+ padding-right: 2%;
+ color: #CC0066;
+ margin-top: 0;
+ margin-bottom: 0.4em;
+ font-weight: bold;
+}
+
+body h5 {
+ font-size: 1.0em;
+ background-color: #F6F6F6;
+ border-bottom: 1px solid #D8D8D8;
+ border-top: 1px solid #D8D8D8;
+ padding-left: 2%;
+ padding-right: 2%;
+ padding-top: .3em;
+ padding-bottom: .3em;
+ margin-top: 0;
+ margin-bottom: 0.6em;
+
+/* padding-left: 2%;
+ padding-right: 2%;
+ color: #333333;
+ margin-top: 0;
+ margin-bottom: 0.4em; */
+}
+
+body h6 {
+ font-size: 0.9em;
+ background-color: #F6F6F6;
+ border-bottom: 1px solid #D8D8D8;
+ border-top: 1px solid #D8D8D8;
+ padding-left: 2%;
+ padding-right: 2%;
+ padding-top: .3em;
+ padding-bottom: .3em;
+ margin-top: 0;
+ margin-bottom: 0.6em;
+}
+/*
+ * IMAGE WITH OPTIONAL CAPTION
+ *
+ */
+body img.captioned {
+ margin: 0 0 0 2%;
+}
+
+body p.caption-image {
+ font-size: small;
+ margin-top: 0;
+ margin-bottom: 0.6em;
+ padding-left: 2%;
+}
+/*
+ * BLOCKQUOTE
+ *
+ */
+blockquote {
+ margin: 0 4% 0.4em 4%;
+ padding: .6em 0 .3em 0;
+ border-top: 1px solid #D8D8D8;
+ border-bottom: 1px solid #D8D8D8;
+}
+blockquote p {
+ margin: .0;
+ padding: 0 0 0.6em 0;
+ border-bottom: 1px solid #D8D8D8;
+}
+/*
+ * LISTS
+ *
+ */
+/* compensates for smaller Opera Mini margins */
+ol, ul, dl {
+ margin-left: 2%;
+ padding-left: 5px;
+}
+
+ul li {
+ list-style-type: none;
+}
+
+dd {
+ margin-left: 2%;
+}
+/*forces native margin*/
+body ul, body ol, body dl {
+ margin-top: 0;
+ margin-bottom: 0.6em;
+ font-size: 100%;
+}
+/*
+ * BREADCRUMBS
+ *
+ */
+body ul.breadcrumbs {
+ padding-top: 0;
+ padding-bottom: .5em;
+ padding-left: 0;
+ padding-right: .5em;
+ font-size: small;
+ list-style-type: none;
+ margin-bottom: 0.6em;
+ margin-top: 0;
+ margin-left: 2%;
+}
+
+body ul.breadcrumbs li {
+ display: inline;
+ line-height: 1em;
+}
+/*
+ * FORMS
+ *
+ */
+body fieldset {
+ margin: 0;
+ padding: 0;
+ border: none;
+}
+
+body form {
+ margin: 0;
+ color: #333333;
+}
+
+body form label {
+ font-size: medium;
+ width: 100%;
+ margin-bottom: .5em;
+ margin-top: .5em;
+}
+
+body form input {
+ width: 100%;
+}
+
+body input[type='text'] {
+ padding: 0.2em;
+ margin-bottom: .5em;
+ display: block;
+}
+
+body textarea {
+ padding: 0.2em;
+ margin-bottom: .7em;
+ display: block;
+}
+
+body form input[type='radio'], body form input[type='checkbox'] {
+ margin:0.1em 0em;
+ padding: 0;
+}
+
+body select {
+ margin-bottom: 0;
+}
+
+body input[type='button'] {
+ padding: 1em 1.3em;
+ color: #D8D8D8;
+ margin: 1em 0em;
+}
+
+
+/*
+ * TABLES
+ *
+ */
+body table {
+ border: 1px solid #D8D8D8;
+ margin: 0;
+ width: 100%;
+ color: #333333;
+ font-size: 80%;
+}
+
+body td {
+ padding-left: .3em;
+ padding-right: .3em;
+ padding-top: .2em;
+ padding-bottom: .2em;
+ line-height: 1.5em;
+ border: 1px solid #D8D8D8;
+}
+
+/*compensates for lack of consistent header support*/
+body td.table-header {
+ color: #0033CC;
+ font-weight: bold;
+ background-color: #F6F6F6;
+}
+
+body tr {
+ height: 1.5em;
+}
+
+body table td.odd {
+ background-color: #F6F6F6;
+}
+
+/*caption-side unlikely to be supported*/
+body caption {
+ caption-side: bottom;
+ padding-top: 0.3em;
+ padding-bottom: 0.3em;
+ margin-left: .5em;
+ font-size: small;
+ text-align: left;
+ font-style: normal;
+}
+
+/*
+ * CONTAINER BOXES
+ *
+ */
+body div.box p.box-text {
+ border: 1px solid #D8D8D8;
+ width: 92%;
+ margin: 0 auto 0.6em auto;
+ padding: 0.4em 0.4em;
+ background-color: #F6F6F6;
+}
+
+body div.header-box p {
+ font-size: 0.6em;
+ border: 1px solid #D8D8D8;
+ width: 92%;
+ margin: 0 auto 0.6em auto;
+ padding: 0.4em 0.4em;
+ background-color: #F6F6F6;
+}
+
+/* 2px border is required to ensure header is flush with the box */
+body div.header-box h3 {
+ font-size: 0.8em;
+ border: 2px solid #0038E1;
+ width: 92%;
+ margin: 0em auto;
+ padding: 0.3em 0.3em;
+ background-color: #0038E1;
+ color: white;
+}
+
+/*
+ * BACK TO TOP/HOME
+ *
+ */
+p.top {
+ font-size: small;
+ background-color: #F6F6F6;
+ border-bottom: 1px solid #D8D8D8;
+ border-top: 1px solid #D8D8D8;
+ padding-top: .3em;
+ padding-bottom: .3em;
+ margin-top: 0;
+ margin-bottom: 0.6em;
+ clear: both;
+}
+p.home {
+ font-size: small;
+ background-color: #F6F6F6;
+ border-bottom: 1px solid #D8D8D8;
+ border-top: 1px solid #D8D8D8;
+ padding-top: .3em;
+ padding-bottom: .3em;
+ margin-top: 0;
+ margin-bottom: 0.6em;
+ clear: both;
+}
+p.top a, p.home a {
+ color: #333333;
+ text-decoration: none;
+ width: 100%;
+ display: block;
+}
+
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2011-09-21 15:41:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitAction.java 2011-09-23 13:11:20 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.attribute.Attribute;
import org.hisp.dhis.attribute.AttributeService;
-import org.hisp.dhis.attribute.comparator.AttributeNameComparator;
import org.hisp.dhis.attribute.comparator.AttributeSortOrderComparator;
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.DataSetService;