dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19148
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8242: Remove unused class; re-organize reminder function.
------------------------------------------------------------
revno: 8242
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-09-25 09:50:39 +0700
message:
Remove unused class; re-organize reminder function.
removed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGatewayAction.java
renamed:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetOutboundSmsListAction.java => dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetProgramTrackingListAction.java
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.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
=== removed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGatewayAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGatewayAction.java 2012-08-16 13:46:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetGatewayAction.java 1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2004-2009, 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.caseentry.action.reminder;
-
-import java.util.Map;
-
-import org.hisp.dhis.sms.outbound.OutboundSmsTransportService;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.opensymphony.xwork2.Action;
-
-/**
- * @author Chau Thu Tran
- *
- * @version GetGatewayAction.java 10:57:08 AM Aug 9, 2012 $
- */
-public class GetGatewayAction
- implements Action
-{
- // -------------------------------------------------------------------------
- // Dependencies
- // -------------------------------------------------------------------------
-
- @Autowired
- private OutboundSmsTransportService transportService;
-
- // -------------------------------------------------------------------------
- // Input/Output
- // -------------------------------------------------------------------------
-
- public Map<String, String> gatewayMap;
-
- public Map<String, String> getGatewayMap()
- {
- return gatewayMap;
- }
-
- // -------------------------------------------------------------------------
- // Action implementation
- // -------------------------------------------------------------------------
-
- @Override
- public String execute()
- throws Exception
- {
- gatewayMap = transportService.getGatewayMap();
-
- return SUCCESS;
- }
-
-}
=== renamed file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetOutboundSmsListAction.java' => 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/reminder/GetProgramTrackingListAction.java'
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-09-23 09:30:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2012-09-25 02:50:39 +0000
@@ -945,15 +945,10 @@
</bean>
<!-- SMS Reminder -->
-
- <bean id="org.hisp.dhis.caseentry.action.reminder.GetGatewayAction"
- class="org.hisp.dhis.caseentry.action.reminder.GetGatewayAction"
- scope="prototype">
- </bean>
-
+
<bean
- id="org.hisp.dhis.caseentry.action.reminder.GetOutboundSmsListAction"
- class="org.hisp.dhis.caseentry.action.reminder.GetOutboundSmsListAction"
+ id="org.hisp.dhis.caseentry.action.reminder.GetProgramTrackingListAction"
+ class="org.hisp.dhis.caseentry.action.reminder.GetProgramTrackingListAction"
scope="prototype">
<property name="programStageInstanceService"
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-24 08:35:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-25 02:50:39 +0000
@@ -897,20 +897,13 @@
<param name="stylesheets">style/style.css</param>
</action>
- <action name="getOutboundSmsList"
- class="org.hisp.dhis.caseentry.action.reminder.GetOutboundSmsListAction">
+ <action name="programTrackingList"
+ class="org.hisp.dhis.caseentry.action.reminder.GetProgramTrackingListAction">
<result name="success" type="velocity">/content.vm</result>
<param name="page">/dhis-web-caseentry/programTrackingList.vm</param>
<param name="stylesheets">style/style.css</param>
</action>
-
- <action name="getGateway"
- class="org.hisp.dhis.caseentry.action.reminder.GetGatewayAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-caseentry/sendSmsForm.vm</param>
- <param name="stylesheets">style/style.css</param>
- </action>
-
+
<action name="sendSMS"
class="org.hisp.dhis.caseentry.action.reminder.SendSmsAction">
<result name="success" type="velocity-json">/dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-09-24 06:41:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-09-25 02:50:39 +0000
@@ -106,10 +106,10 @@
// program tracking form
// --------------------------------------------------------------------
-function getOutboundSmsList( programStageInstanceId, isSendSMS )
+function programTrackingList( programStageInstanceId, isSendSMS )
{
setFieldValue('sendToList', "false");
- $('#smsManagementDiv' ).load("getOutboundSmsList.action",
+ $('#smsManagementDiv' ).load("programTrackingList.action",
{
programStageInstanceId: programStageInstanceId
}
@@ -144,22 +144,6 @@
// Send SMS
// --------------------------------------------------------------------
-function showSendSmsForm(programStageName, programStageInstanceId)
-{
- setFieldValue( 'programStageInstanceId', programStageInstanceId );
- setFieldValue( 'programStageName', programStageName );
- $('#sendSmsFormDiv' ).load("getGateway.action").dialog(
- {
- title:i18n_send_sms,
- maximize:true,
- closable:true,
- modal:true,
- overlay:{background:'#000000', opacity:0.1},
- width:400,
- height:250
- });
-}
-
function sendSMS()
{
var sendToList = getFieldValue('sendToList');
@@ -204,7 +188,7 @@
function showCommentList( programStageInstanceId, isSendSMS )
{
setFieldValue('sendToList', "false");
- $('#smsManagementDiv' ).load("getOutboundSmsList.action",
+ $('#smsManagementDiv' ).load("programTrackingList.action",
{
programStageInstanceId: programStageInstanceId
}
@@ -230,7 +214,6 @@
}
}
-
// --------------------------------------------------------------------
// Dashboard
// --------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2012-09-24 05:02:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingRecords.vm 2012-09-25 02:50:39 +0000
@@ -91,7 +91,7 @@
status='$statusMap.get( $programStageInstance.id )'
class='stage-object'
value='$programStageInstance.programStage.name $valueDate'
- title="$title" onclick='javascript:getOutboundSmsList( $programStageInstance.id, false );'>
+ title="$title" onclick='javascript:programTrackingList( $programStageInstance.id, false );'>
<script>
var status = $statusMap.get( $programStageInstance.id );
var dueDate = "$format.formatDate($programStageInstance.dueDate)";