=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/MenuAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/MenuAction.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/MenuAction.java 2012-01-09 11:55:36 +0000 @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2004-2012, 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 com.opensymphony.xwork2.Action; +import org.hisp.dhis.message.MessageService; + +public class MenuAction + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private MessageService messageService; + + public void setMessageService( MessageService messageService ) + { + this.messageService = messageService; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private long unreadMessageConversationCount; + + public long getUnreadMessageConversationCount() + { + return unreadMessageConversationCount; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() + { + unreadMessageConversationCount = messageService.getUnreadMessageConversationCount(); + + return SUCCESS; + } +} === added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message' === added directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action' === added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessage.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessage.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessage.java 2012-01-09 11:55:36 +0000 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2004-2012, 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.message.action; + +import com.opensymphony.xwork2.Action; +import org.apache.struts2.ServletActionContext; +import org.hisp.dhis.message.Message; +import org.hisp.dhis.message.MessageConversation; +import org.hisp.dhis.message.MessageService; +import org.hisp.dhis.util.ContextUtils; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * @author Morten Olav Hansen + */ +public class GetMessage + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private MessageService messageService; + + public void setMessageService( MessageService messageService ) + { + this.messageService = messageService; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private String conversationId; + + public void setConversationId( String conversationId ) + { + this.conversationId = conversationId; + } + + private String subject; + + public String getSubject() + { + return subject; + } + + private List messages; + + public List getMessages() + { + return messages; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() throws Exception + { + MessageConversation conversation = messageService.getMessageConversation( conversationId ); + + subject = conversation.getSubject(); + messages = new ArrayList( conversation.getMessages() ); + Collections.reverse( messages ); + + return SUCCESS; + } + +} === added file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessages.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessages.java 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/message/action/GetMessages.java 2012-01-09 11:55:36 +0000 @@ -0,0 +1,77 @@ +/* +* Copyright (c) 2004-2012, 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.message.action; + +import com.opensymphony.xwork2.Action; +import org.hisp.dhis.message.MessageConversation; +import org.hisp.dhis.message.MessageService; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * @author Morten Olav Hansen + */ +public class GetMessages + implements Action +{ + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private MessageService messageService; + + public void setMessageService( MessageService messageService ) + { + this.messageService = messageService; + } + + // ------------------------------------------------------------------------- + // Input & Output + // ------------------------------------------------------------------------- + + private List conversations; + + public List getConversations() + { + return conversations; + } + + // ------------------------------------------------------------------------- + // Action Implementation + // ------------------------------------------------------------------------- + + @Override + public String execute() throws Exception + { + conversations = new ArrayList( messageService.getMessageConversations( 0, 10 ) ); + + return SUCCESS; + } +} === renamed directory 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/settings' => 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings' === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/GetSettingsAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/settings/action/GetSettingsAction.java 2012-01-04 12:55:23 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/GetSettingsAction.java 2012-01-09 11:55:36 +0000 @@ -1,5 +1,6 @@ + /* - * Copyright (c) 2004-2011, University of Oslo + * Copyright (c) 2004-2012, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.light.action.settings.action; +package org.hisp.dhis.light.settings.action; import com.opensymphony.xwork2.Action; import org.apache.commons.lang.Validate; @@ -38,7 +39,7 @@ import java.util.*; /** - * @author mortenoh + * @author Morten Olav Hansen */ public class GetSettingsAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java' --- dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/action/settings/action/SaveSettingsFormAction.java 2012-01-04 12:55:23 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/java/org/hisp/dhis/light/settings/action/SaveSettingsFormAction.java 2012-01-09 11:55:36 +0000 @@ -25,7 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -package org.hisp.dhis.light.action.settings.action; +package org.hisp.dhis.light.settings.action; import com.opensymphony.xwork2.Action; import org.apache.commons.lang.StringUtils; === 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 2012-01-05 20:39:23 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/META-INF/dhis/beans.xml 2012-01-09 11:55:36 +0000 @@ -1,6 +1,6 @@ @@ -11,52 +11,59 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -70,45 +77,63 @@ - + - + - + - + - + - + - + + + + + + + + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties' --- dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2011-12-27 12:16:47 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/org/hisp/dhis/light/i18n_module.properties 2012-01-09 11:55:36 +0000 @@ -40,3 +40,5 @@ mark_as_complete=Mark as complete mark_as_not_complete=Mark as not complete + +messages=Messages === 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-12-27 12:16:47 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/resources/struts.xml 2012-01-09 11:55:36 +0000 @@ -1,13 +1,13 @@ + "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" + "http://struts.apache.org/dtds/struts-2.0.dtd"> - + /dhis-web-light/main.vm /dhis-web-light/menu.vm @@ -87,14 +87,39 @@ - + /dhis-web-light/main.vm /dhis-web-light/settings.vm - - /mobile/index.action - - + + /mobile/index.action + + + + + + /dhis-web-light/main.vm + /dhis-web-light/messages.vm + + + + /dhis-web-light/main.vm + /dhis-web-light/message.vm + + + + /mobile/messages.action + + + + /dhis-web-light/main.vm + /dhis-web-light/feedback.vm + + + + /mobile/index.action + + === added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/feedback.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/feedback.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/feedback.vm 2012-01-09 11:55:36 +0000 @@ -0,0 +1,10 @@ + +

$i18n.getString( "feedback" )

+ + === modified 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 2011-12-20 13:57:04 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/menu.vm 2012-01-09 11:55:36 +0000 @@ -3,6 +3,7 @@

=== added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/message.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/message.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/message.vm 2012-01-09 11:55:36 +0000 @@ -0,0 +1,27 @@ + +

$subject

+ +
+
+

Reply

+

+ + +

+
+
+ +#foreach( $message in $messages ) +
+

Reply from $message.sender

+

$message.text

+
+#end + + === added file 'dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm' --- dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/messages.vm 2012-01-09 11:55:36 +0000 @@ -0,0 +1,29 @@ + +

$i18n.getString( "feedback" )

+ +

+

+

+ +

$i18n.getString( "conversations" )

+ +

+

+

+ + === modified 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 2011-10-26 08:43:56 +0000 +++ dhis-2/dhis-web/dhis-web-light/src/main/webapp/dhis-web-light/style/light.css 2012-01-09 11:55:36 +0000 @@ -135,7 +135,7 @@ padding-right: 0; margin-bottom: 0; margin-top: 0; - + } body div#footer ul li { @@ -157,7 +157,7 @@ * BASIC ELEMENTS * */ - + /*body required as early browsers don't understand p by itself */ body p { margin-top: 0; @@ -175,7 +175,7 @@ } /* * LINK STATES - * + * */ a:link { color:#003399; @@ -199,7 +199,7 @@ body h1 { font-size: 1.0em; padding-left: 2%; - padding-right: 2%; + padding-right: 2%; margin-top: 0; margin-bottom: 0.4em; line-height: normal; @@ -268,7 +268,7 @@ } /* * IMAGE WITH OPTIONAL CAPTION - * + * */ body img.captioned { margin: 0 0 0 2%; @@ -282,7 +282,7 @@ } /* * BLOCKQUOTE - * + * */ blockquote { margin: 0 4% 0.4em 4%; @@ -297,7 +297,7 @@ } /* * LISTS - * + * */ /* compensates for smaller Opera Mini margins */ ol, ul, dl { @@ -306,7 +306,7 @@ } ul li { - list-style-type: none; + list-style-type: none; } dd { @@ -320,7 +320,7 @@ } /* * BREADCRUMBS - * + * */ body ul.breadcrumbs { padding-top: 0; @@ -340,7 +340,7 @@ } /* * FORMS - * + * */ body fieldset { margin: 0; @@ -366,7 +366,7 @@ font-size: 1.15em; } -body input { +body input { font-size: 1.15em; padding: 0.2em; margin-bottom: .5em; @@ -387,7 +387,7 @@ display: block; } -body form input[type='radio'], body form input[type='checkbox'] { +body form input[type='radio'], body form input[type='checkbox'] { font-size: 1.15em; margin:0.1em 0em; padding: 0; @@ -454,7 +454,7 @@ */ body div.box p.box-text { border: 1px solid #D8D8D8; - width: 92%; + width: 96%; margin: 0 auto 0.6em auto; padding: 0.4em 0.4em; background-color: #F6F6F6; @@ -463,7 +463,7 @@ body div.header-box p { font-size: 0.6em; border: 1px solid #C8DBEA; - width: 92%; + width: 96%; margin: 0 auto 0.6em auto; padding: 0.4em 0.4em; background-color: #E8E8E8; @@ -471,9 +471,9 @@ /* 2px border is required to ensure header is flush with the box */ body div.header-box h3 { - font-size: 0.8em; - border: 2px solid #D8D8D8; - width: 92%; + font-size: 0.9em; + border: 2px solid #CBDDEB; + width: 96%; margin: 0em auto; padding: 0.3em 0.3em; background-color: #CBDDEB; @@ -482,7 +482,7 @@ /* * BACK TO TOP/HOME - * + * */ p.top { font-size: small; @@ -495,6 +495,7 @@ margin-bottom: 0.6em; clear: both; } + p.home { font-size: small; background-color: #F6F6F6; @@ -506,6 +507,7 @@ margin-bottom: 0.6em; clear: both; } + p.top a, p.home a { color: #333333; text-decoration: none;