← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3919: Removed old feedback function

 

------------------------------------------------------------
revno: 3919
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-06-16 10:08:02 +0200
message:
  Removed old feedback function
removed:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm
  dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/SendFeedbackAction.java
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
  dhis-2/dhis-web/dhis-web-commons/pom.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml
  dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.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
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm	2011-04-19 11:57:13 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/changeLog.vm	2011-06-16 08:08:02 +0000
@@ -2,6 +2,8 @@
 <h3>$i18n.getString( "change_log" )</h3>
 
 <dl>
+  <dt>$i18n.getString( "release" ) 2.3:</dt>
+  <dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.3"; target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
   <dt>$i18n.getString( "release" ) 2.2:</dt>
   <dd><a href="https://blueprints.launchpad.net/dhis2/+milestone/2.2"; target="_blank">Launchpad $i18n.getString( "online_release_page" )</a></dd>
   <dt>$i18n.getString( "release" ) 2.1:</dt>

=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm	2011-03-15 16:29:07 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/about/feedbackForm.vm	1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-<script type="text/javascript" src="../dhis-web-commons/javascripts/feedbackForm.js"></script>
-<script type="text/javascript">
-	var i18n_enter_message = '$encoder.jsEscape( $i18n.getString( "enter_message" ) , "'")';
-</script>
-
-<h3>$i18n.getString( "send_feedback" )</h3>
-
-<form id="messageForm" action="sendFeedback.action" method="post">
-
-<h4>$i18n.getString( "message_to_the_dhis2_development_team" )</h4>
-
-<p><textarea id="userMessage" name="userMessage" style="width:500px; height:140px"></textarea></p>
-
-<h4>$i18n.getString( "error_message_stack_trace" )</h4>
-
-<p><textarea id="stackTrace" name="stackTrace" style="width:500px; height:150px"></textarea></p>
-
-<p>
-<table>
-<tr>
-<td><input type="button" value="$i18n.getString( 'send' )" onclick="validateForm()" style="width:140px"/></td>
-<td><input type="button" value="$i18n.getString( 'back' )" onclick="window.location.href='$!backUrl'" style="width:140px"/></td>
-</tr>
-</table>
-</p>
-
-</form>
-
-<span id="message"></span>

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css	2011-06-14 19:13:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/css/light_blue/light_blue.css	2011-06-16 08:08:02 +0000
@@ -6,7 +6,7 @@
 * 
 {
   font-family: LiberationSansRegular, arial;
-  line-height: 125%;
+  line-height: 135%;
 }
 
 html,body 

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2011-05-31 17:59:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm	2011-06-16 08:08:02 +0000
@@ -141,7 +141,6 @@
       <div id="menuDropDown3" class="menuDropDownArea">
         <ul class="menuDropDownBox">
 		  <li class="menuDropDownItem" id="menuDropDownHelpCenter">$i18n.getString( "help_center" )&nbsp;</li>
-          <li class="menuDropDownItem" id="menuDropDownFeedBack">$i18n.getString( "feedback" )&nbsp;</li>
           <li class="menuDropDownItem" id="menuDropDownChangeLog">$i18n.getString( "change_log" )&nbsp;</li>
           <li class="menuDropDownItem" id="menuDropDownSupportiveSoftware">$i18n.getString( "supportive_software" )&nbsp;</li>
           <li class="menuDropDownItem" id="menuDropDownUserAccount">$i18n.getString( "user_account" )&nbsp;</li>

=== modified file 'dhis-2/dhis-web/dhis-web-commons/pom.xml'
--- dhis-2/dhis-web/dhis-web-commons/pom.xml	2011-04-19 14:13:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons/pom.xml	2011-06-16 08:08:02 +0000
@@ -117,10 +117,6 @@
       <artifactId>commons-fileupload</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-email</artifactId>
-    </dependency> 
-    <dependency>
       <groupId>com.thoughtworks.xstream</groupId>
       <artifactId>xstream</artifactId>
     </dependency>

=== removed file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/SendFeedbackAction.java'
--- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/SendFeedbackAction.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/about/action/SendFeedbackAction.java	1970-01-01 00:00:00 +0000
@@ -1,141 +0,0 @@
-package org.hisp.dhis.about.action;
-
-/*
- * Copyright (c) 2004-2010, 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.
- */
-
-import org.apache.commons.mail.DefaultAuthenticator;
-import org.apache.commons.mail.EmailException;
-import org.apache.commons.mail.SimpleEmail;
-import org.hisp.dhis.user.CurrentUserService;
-import org.hisp.dhis.user.User;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Lars Helge Overland
- * @version $Id$
- */
-public class SendFeedbackAction
-    implements Action
-{
-    private static final String LINEBREAK = "\n";
-    private static final String DOUBLE_LINEBREAK = "\n\n";
-
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-
-    private CurrentUserService currentUserService;
-
-    public void setCurrentUserService( CurrentUserService currentUserService )
-    {
-        this.currentUserService = currentUserService;
-    }
-
-    // -------------------------------------------------------------------------
-    // Input
-    // -------------------------------------------------------------------------
-
-    private String userMessage;
-
-    public void setUserMessage( String userMessage )
-    {
-        this.userMessage = userMessage;
-    }    
-    
-    private String stackTrace;
-    
-    public void setStackTrace( String stackTrace )
-    {
-        this.stackTrace = stackTrace;
-    }
-
-    // -------------------------------------------------------------------------
-    // Action implementation
-    // -------------------------------------------------------------------------
-
-    public String execute()
-    {
-        SimpleEmail mail = new SimpleEmail();
-        
-        try
-        {
-            mail.setAuthenticator( new DefaultAuthenticator( "dhis2hisp", "userfeedback" ) );
-            
-            mail.setHostName( "smtp.gmail.com" );
-            mail.addTo( "dhis2-userfeedback@xxxxxxxxxxxxxxxx" );
-            mail.setFrom( "dhis2-userfeedback@xxxxxxxxx" );
-            mail.setSubject( "DHIS 2 User Feedback" );
-            mail.setMsg( getMessage( userMessage, stackTrace ) );
-            
-            mail.setSSL( true );
-            mail.setSslSmtpPort( "465" );
-            
-            mail.send();
-        }
-        catch ( EmailException ex )
-        {
-            throw new RuntimeException( "Failed to send mail", ex );
-        }
-        
-        return SUCCESS;
-    }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private String getMessage( String message, String stackTrace )
-    {
-        StringBuffer buffer = new StringBuffer();
-        
-        User user = currentUserService.getCurrentUser();
-        
-        String userName = currentUserService.getCurrentUsername();
-        
-        buffer.append( "Sender" + DOUBLE_LINEBREAK );
-        
-        buffer.append( "Name: " + format( user.getFirstName() ) + " " + format( user.getSurname() + LINEBREAK ) );        
-        buffer.append( "Email: " + format( user.getEmail() ) + LINEBREAK );
-        buffer.append( "User name: " + format( userName ) + LINEBREAK  );
-        
-        buffer.append( DOUBLE_LINEBREAK + "Message" + DOUBLE_LINEBREAK );
-
-        buffer.append( format( message ) + LINEBREAK );
-        
-        buffer.append( DOUBLE_LINEBREAK + "Error message" + DOUBLE_LINEBREAK );
-        
-        buffer.append( format( stackTrace ) );
-        
-        return buffer.toString();
-    }
-    
-    private String format( String string )
-    {
-        return string != null ? string : new String();
-    }
-}

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2011-06-14 13:59:43 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/beans.xml	2011-06-16 08:08:02 +0000
@@ -308,11 +308,6 @@
     <property name="localeManager" ref="org.hisp.dhis.i18n.locale.LocaleManager" />
   </bean>
 
-  <bean id="org.hisp.dhis.about.action.SendFeedbackAction" class="org.hisp.dhis.about.action.SendFeedbackAction"
-    scope="prototype">
-    <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
-  </bean>
-
   <bean id="org.hisp.dhis.help.action.GetHelpContentAction" class="org.hisp.dhis.help.action.GetHelpContentAction"
     scope="prototype">
     <property name="helpManager" ref="org.hisp.dhis.options.help.HelpManager" />

=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2011-06-14 13:59:43 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/dhis-web-commons.xml	2011-06-16 08:08:02 +0000
@@ -627,10 +627,6 @@
       <param name="menu">/dhis-web-commons/about/menu.vm</param>
     </action>
 
-    <action name="sendFeedback" class="org.hisp.dhis.about.action.SendFeedbackAction">
-      <result name="success" type="redirect">about.action</result>
-    </action>
-
     <action name="help" class="org.hisp.dhis.commons.action.NoAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-commons/about/help.vm</param>

=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java	2011-06-08 22:04:42 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/java/org/hisp/dhis/dashboard/message/action/SendFeedbackAction.java	2011-06-16 08:08:02 +0000
@@ -1,5 +1,32 @@
 package org.hisp.dhis.dashboard.message.action;
 
+/*
+ * Copyright (c) 2004-2010, 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.
+ */
+
 import org.hisp.dhis.message.Message;
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.user.CurrentUserService;
@@ -7,6 +34,9 @@
 
 import com.opensymphony.xwork2.Action;
 
+/**
+ * @author Lars Helge Overland
+ */
 public class SendFeedbackAction
     implements Action
 {