dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26739
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13215: update quick send sms
------------------------------------------------------------
revno: 13215
committer: Hong Em <em.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-12-13 14:04:37 +0700
message:
update quick send sms
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ProcessingSendQuickSMSAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm
dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.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-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ProcessingSendQuickSMSAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ProcessingSendQuickSMSAction.java 2013-12-10 11:23:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/java/org/hisp/dhis/mobile/action/incoming/ProcessingSendQuickSMSAction.java 2013-12-13 07:04:37 +0000
@@ -155,6 +155,7 @@
public String execute()
throws Exception
{
+
gatewayId = transportService.getDefaultGateway();
if ( gatewayId == null || gatewayId.trim().length() == 0 )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml 2013-09-08 08:36:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/META-INF/dhis/beans.xml 2013-12-13 07:04:37 +0000
@@ -161,6 +161,9 @@
<property name="patientMobileSettingService"
ref="org.hisp.dhis.mobile.service.PatientMobileSettingService" />
</bean>
+
+ <bean id="org.hisp.dhis.mobile.action.incoming.ProcessingSendQuickSMSAction"
+ class="org.hisp.dhis.mobile.action.incoming.ProcessingSendQuickSMSAction" scope="prototype"/>
<!-- <bean id="org.hisp.dhis.mobile.action.MobilePhonesPatternAction" class="org.hisp.dhis.mobile.action.MobilePhonesPatternAction"
scope="prototype"> </bean> -->
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml 2013-12-10 11:23:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/resources/struts.xml 2013-12-13 07:04:37 +0000
@@ -18,7 +18,7 @@
<!-- Sending SMS Action -->
<action name="sendSMS"
- class="org.hisp.dhis.mobile.action.ProcessingSendQuickSMSAction">
+ class="org.hisp.dhis.mobile.action.incoming.ProcessingSendQuickSMSAction">
<result name="success" type="velocity-json">../dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<result name="error" type="velocity-json">../dhis-web-commons/ajax/jsonResponseError.vm</result>
<param name="onExceptionReturn">plainTextError</param>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm 2013-12-10 11:23:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-mobile/src/main/webapp/dhis-web-maintenance-mobile/receiveSMSPage.vm 2013-12-13 07:04:37 +0000
@@ -143,16 +143,22 @@
);
}
};
- function sendQuickSMS(message, originator)
+ function sendQuickSMS(idMessage, originator)
{
var p = {};
- p.recipients.push( originator );
-
- jQuery.postUTF8( sendSMS.action,
+ p.recipients = [];
+ p.recipients.push( "+" + originator );
+
+
+
+ jQuery.postUTF8( 'sendSMS.action',
{
- recipient: JSON.stringify( p.recipients ),
- text: getFieldValue('sm' + message),
- sendTarget: 'phone',
+ recipients: JSON.stringify( p.recipients ),
+
+
+ text: getFieldValue('sm' + idMessage),
+
+ sendTarget: 'phone'
}, function ( json )
{
if ( json.response == "success" ) {
@@ -255,8 +261,8 @@
<a id="$incomingSms.id" href="#" onclick="show($velocityCount)" >$incomingSms.originator</a><br/>
<div id="dv$velocityCount" style="display: none;">
<textarea name="textArea" id="sm$velocityCount" rows="3" style="width:160px;"></textarea><br/>
- <input type="submit" name="send" value="$i18n.getString( 'send' )" style="float: center;" onclick="sendQuickSMS($velocityCount, $incomingSms.originator)"/>
- <input type="submit" name="btnCancel" value="$i18n.getString( 'cancel' )" style="float: center;"/>
+ <input type="button" name="send" value="$i18n.getString( 'send' )" style="float: center;" onclick="sendQuickSMS($velocityCount, $incomingSms.originator)"/>
+ <input type="submit" name="btnClose" value="$i18n.getString( 'close' )" style="float: center;"/>
</div>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java'
--- dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java 2013-11-12 08:46:01 +0000
+++ dhis-2/dhis-web/dhis-web-sms/src/main/java/org/hisp/dhis/sms/outcoming/ProcessingSendSMSAction.java 2013-12-13 07:04:37 +0000
@@ -265,6 +265,7 @@
TaskId taskId = new TaskId( TaskCategory.SENDING_SMS, currentUser );
notifier.clear( taskId );
+ System.out.println("text: " + text);
sendSmsTask.setTaskId( taskId );
sendSmsTask.setCurrentUser( currentUser );