dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18581
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7880: Update the number of messages after sending.
------------------------------------------------------------
revno: 7880
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-08-09 16:11:28 +0700
message:
Update the number of messages after sending.
modified:
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/smsPatientRecords.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
=== 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-08-09 08:57:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-08-09 09:11:28 +0000
@@ -87,11 +87,12 @@
});
}
-function sendSMS( programStageInstanceId )
+function sendSMS()
{
+ programStageInstanceId = getFieldValue( 'programStageInstanceId' );
jQuery.postUTF8( 'sendSMS.action',
{
- programStageInstanceId: getFieldValue( 'programStageInstanceId' ),
+ programStageInstanceId: programStageInstanceId,
gatewayId: getFieldValue( 'gatewayId' ),
msg: getFieldValue( 'smsMessage' )
}, function ( json )
@@ -100,11 +101,13 @@
showSuccessMessage( json.message );
jQuery('#smsManagementList').prepend("<tr><td>" + getFieldValue('currentDate') + "</td><td>" + getFieldValue('smsMessage') + "</td></tr>");
$('#sendSmsFormFiv' ).dialog("close");
+ var noMessage = eval( getInnerHTML('noMessageDiv_' + programStageInstanceId)) + 1;
+ jQuery('#noMessageDiv_' + programStageInstanceId).html(noMessage);
}
else {
showErrorMessage( json.message, 7000 );
}
- } );
+ } );
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm 2012-08-09 08:57:01 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/smsPatientRecords.vm 2012-08-09 09:11:28 +0000
@@ -49,7 +49,7 @@
</tr>
<tr>
<td>
- ($programStageInstance.outboundSms.size() $i18n.getString('messages') )<br/>
+ (<span id='noMessageDiv_$programStageInstance.id'>$programStageInstance.outboundSms.size()</span> $i18n.getString('messages') )<br/>
<img src='images/sms_list.gif' style="width:32px" title="$i18n.getString('send_message')" onclick='setFieldValue( "programStageInstanceId", "$!programStageInstance.id" );showSendSMSForm();'/>
<img src='images/new_sms.gif' style="width:32px" title="$i18n.getString('sms_message_management')" onclick='javascript:getOutboundSmsList( $programStageInstance.id );' />
</td>