dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19326
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8378: Change program-tracking event form.
------------------------------------------------------------
revno: 8378
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-10-05 10:06:42 +0700
message:
Change program-tracking event form.
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/programTrackingList.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css
--
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-10-04 15:38:22 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/smsReminder.js 2012-10-05 03:06:42 +0000
@@ -160,17 +160,6 @@
});
}
-function sendSMS()
-{
- var sendToList = getFieldValue('sendToList');
- if( sendToList == 'false'){
- sendSmsOnePatient()
- }
- else{
- sendSmsToList();
- }
-}
-
function sendSmsToList()
{
params = getSearchParams();
@@ -201,27 +190,6 @@
// Post Comments
// --------------------------------------------------------------------
-function showCommentList( programStageInstanceId, isSendSMS )
-{
- setFieldValue('sendToList', "false");
- $('#smsManagementDiv' ).load("programTrackingList.action",
- {
- programStageInstanceId: programStageInstanceId
- }
- , function(){
- hideById('smsManagementForm');
- }).dialog(
- {
- title:i18n_sms_message_management,
- maximize:true,
- closable:true,
- modal:false,
- overlay:{background:'#000000', opacity:0.1},
- width:800,
- height:500
- });
-}
-
function keypress(event, field, programStageInstanceId )
{
var key = getKeyCode( event );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2012-10-04 15:05:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingList.vm 2012-10-05 03:06:42 +0000
@@ -1,12 +1,3 @@
-<script type="text/javascript">
- jQuery(document).ready( function(){
- $('#smsManagementForm').tabs();
- validation( 'sendSMSForm', function(form){
- sendSMS();
- });
- setFieldValue('programStageName', "$programStageInstance.programStage.name");
- });
-</script>
<h3>
<a href="javascript:onClickBackBtn();">$i18n.getString( 'program_tracking' )</a>
@@ -16,192 +7,219 @@
<input type='hidden' id='currentUsername' name='currentUsername' value='$currentUsername'>
<input type='hidden' id='programInstanceId' name='programInstanceId' value='$programStageInstance.programInstance.id'>
+<table class="mainPageTable">
+ <tr>
+ <td>
+ <table>
+ <tr>
+ <td class="bold">$i18n.getString( "full_name" ):</td>
+ <td>$programStageInstance.programInstance.patient.getFullName()<td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString( "gender" ):</td>
+ <td>$programStageInstance.programInstance.patient.gender<td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString( "date_of_birth" ):</td>
+ <td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate )<td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString( "age" ):</td>
+ <td>$programStageInstance.programInstance.patient.getAge()<td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString("phone_number")</td>
+ <td>
+ #if($!programStageInstance.programInstance.patient.phoneNumber && $!programStageInstance.programInstance.patient.phoneNumber!='')
+ $!programStageInstance.programInstance.patient.phoneNumber
+ #else
+ [$i18n.getString('none')]
+ #end
+ </td>
+ </tr>
+ <tr>
+ <td class="bold">$i18n.getString("health_worker")</td>
+ <td>
+ #if($!programStageInstance.programInstance.patient.healthWorker )
+ $!programStageInstance.programInstance.patient.healthWorker.name
+ #else
+ [$i18n.getString('none')]
+ #end
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <br>
+ #set($status = $programStageInstance.getEventStatus())
+ #if( $programStageInstance.irregular!='true' && ($status==3 || $status==4 || $status==5 ) )
+ <input type="button" value="$i18n.getString('remove_this_event')" onclick="javascript:removeEvent($programStageInstance.id, true)" title='$i18n.getString( "remove_this_event" )'></a>
+ #end
+ </td>
+ </tr>
+ </table>
+ </td>
+
+ <td align='right'>
+
+ </td>
+ </tr>
+</table>
+
<table>
- <tr>
- <td class="bold">$i18n.getString( "full_name" ):</td>
- <td>$programStageInstance.programInstance.patient.getFullName()<td>
- </tr>
- <tr>
- <td class="bold">$i18n.getString( "gender" ):</td>
- <td>$programStageInstance.programInstance.patient.gender<td>
- </tr>
- <tr>
- <td class="bold">$i18n.getString( "date_of_birth" ):</td>
- <td>$format.formatDate( $programStageInstance.programInstance.patient.birthDate )<td>
- </tr>
- <tr>
- <td class="bold">$i18n.getString( "age" ):</td>
- <td>$programStageInstance.programInstance.patient.getAge()<td>
- </tr>
- <tr>
- <td class="bold">$i18n.getString("phone_number")</td>
- <td>
- #if($!programStageInstance.programInstance.patient.phoneNumber && $!programStageInstance.programInstance.patient.phoneNumber!='')
- $!programStageInstance.programInstance.patient.phoneNumber
- #else
- [$i18n.getString('none')]
- #end
- </td>
- </tr>
- <tr>
- <td class="bold">$i18n.getString("health_worker")</td>
- <td>
- #if($!programStageInstance.programInstance.patient.healthWorker )
- $!programStageInstance.programInstance.patient.healthWorker.name
- #else
- [$i18n.getString('none')]
- #end
- </td>
- </tr>
- <tr>
- <td>
- <br>
- #set($status = $programStageInstance.getEventStatus())
- #if( $programStageInstance.irregular!='true' && ($status==3 || $status==4 || $status==5 ) )
- <input type="button" value="$i18n.getString('remove_this_event')" onclick="javascript:removeEvent($programStageInstance.id, true)" title='$i18n.getString( "remove_this_event" )'></a>
- #end
- </td>
- </tr>
+ <tr>
+ <td>
+ <div class="event-tracking-area">
+ <table width='100%'>
+ <tr>
+ <th>$i18n.getString("reschedule_and_set_status")</th>
+ </tr>
+ </table>
+
+ <div class="content-event-tracking-area">
+ <table width='100%' id='progarmStageListDiv' name='progarmStageListDiv' >
+ <tr>
+ <td>$i18n.getString( "reschedule_due_date" )</td>
+ #set( $duedateId = "value_" + $programStageInstance.id + "_date" )
+ <td>
+ <input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.name )' )" />
+ <input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
+ <input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
+ <script type="text/javascript">
+ #if($status==1 || $status==5 )
+ disable('$duedateId');
+ #else
+ datePicker( '$duedateId' );
+ #end
+ </script>
+ </td>
+ </tr>
+ <tr>
+ <td>$i18n.getString( "status" )</td>
+ <td>
+ <select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
+ #if($status==4)
+ <option value='4'>$i18n.getString("overdue")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
+ #elseif($status==3)
+ <option value='3'>$i18n.getString("scheduled_in_future")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
+ #elseif($status==5)
+ <option value='4'>$i18n.getString("overdue")</option>
+ <option value='3'>$i18n.getString("scheduled_in_future")</option>
+ <option value='5'>$i18n.getString("skipped")</option>
+ #else
+ <option value='1'>$i18n.getString("completed")</option>
+ <option value='2'>$i18n.getString("incompleted")</option>
+ #end
+ </select>
+ <script>
+ setFieldValue("stat_$programStageInstance.id", $status);
+ </script>
+ </td>
+ </tr>
+ <tr>
+ <td>$i18n.getString( "post_comment" )</td>
+ <td>
+ <input type='text' id='commentText' name='commentText' onkeypress="keypress(event,this,'$programStageInstance.id');">
+ <input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment( byId('commentText'),'$programStageInstance.id');">
+ </td>
+ </tr>
+ <tr>
+ <td>$i18n.getString( "message" )</td>
+ <td>
+ <textarea id="smsMessage" name="smsMessage" style="width:260px;height:100px;" class="{validate:{required:true,maxlength:160}}"></textarea>
+ <input type="button" value="»" class='tiny-button' onclick="sendSmsOnePatient( byId('smsMessage'),'$programStageInstance.id' );"/>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td id="smsError" style="color:red;"></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+
+ <td>
+ <div class="event-tracking-area" style="width:600px;">
+ <table width='100%'>
+ <col width="100px"/>
+ <col width="150px"/>
+ <col width="80px"/>
+ <col/>
+ <tr>
+ <th>$i18n.getString( "date" )</th>
+ <th>$i18n.getString( "program_stage" )</th>
+ <th>$i18n.getString( "sender" )</th>
+ <th>$i18n.getString( "message" )</th>
+ </tr>
+ </table>
+
+ <div class="content-event-tracking-area" style="width:600px;">
+ <table width='100%' id='progarmStageListDiv' name='progarmStageListDiv' >
+ <col width="100px"/>
+ <col width="150px"/>
+ <col width="80px"/>
+ <col/>
+ <tbody id='commentTB'>
+ #set($index = 0)
+ #foreach( $comment in $comments )
+ #if( $index < 5 )
+ <tr id="comment_$comment.id">
+ <td>$format.formatDateTime($comment.createdDate)</td>
+ <td>$programStageInstance.programStage.name</td>
+ <td>$comment.creator</td>
+ <td>$comment.commentText</td>
+ #set($index = $index + 1)
+ </tr>
+ #end
+ #end
+ #foreach( $sms in $outboundSms )
+ #if( $index < 5 )
+ <tr id="tr${sms.id}" >
+ <td>$format.formatDateTime($!sms.date)</td>
+ <td>$programStageInstance.programStage.name</td>
+ <td>$sms.sender</td>
+ <td>$sms.message</td>
+ </tr>
+ #end
+ #end
+ #foreach( $comment in $comments )
+ #if( $index >= 5 )
+ <tr id="comment_$comment.id" class='hidden'>
+ <td>$format.formatDateTime($comment.createdDate)</td>
+ <td>$programStageInstance.programStage.name</td>
+ <td>$comment.creator</td>
+ <td>$comment.commentText</td>
+ </tr>
+ #end
+ #end
+
+ #foreach( $sms in $outboundSms )
+ #if( $index >= 5 )
+ <tr id="tr${sms.id}" class='hidden' >
+ <td>$format.formatDateTime($sms.date)</td>
+ <td>$programStageInstance.programStage.name</td>
+ <td>$sms.sender</td>
+ <td>$sms.message</td>
+ </tr>
+ #end
+ #end
+ </tbody>
+ </table>
+ <br>
+ #set($count = $comments.size() + $outboundSms.size() )
+ <input type='button' id="showCommentBtn" name="showCommentBtn" value='$i18n.getString("show_hide_more")' #if($count && $count<=5) class='hidden' #end onclick='commentDivToggle(false);'>
+ <input type='button' id="hideCommentBtn" name="hideCommentBtn" value='$i18n.getString("show_hide_more")' class='hidden' onclick='commentDivToggle(true);'>
+ </div>
+ </div>
+ </td>
+ </tr>
</table>
-<div id="smsManagementForm">
- <ul>
- <li><a href="#tab-1">$i18n.getString("reschedule_and_set_status")</a></li>
- <li><a href="#tab-2">$i18n.getString("tracking_history")</a></li>
- </ul>
-
- <div id="tab-1">
- <table class='mainPageTable' id='progarmStageListDiv' name='progarmStageListDiv' >
- <tr>
- <td>$i18n.getString( "reschedule_due_date" )</td>
- #set( $duedateId = "value_" + $programStageInstance.id + "_date" )
- <td>
- <input type="text" id="$duedateId" value="$!format.formatDate( $programStageInstance.dueDate )" onchange="saveDueDate( $programInstance.id, $programStageInstance.id, '$encoder.jsEncode( $programStageInstance.programStage.name )' )" />
- <input type="hidden" name="enrollmentDate" id="enrollmentDate" value="$!format.formatDate( $programInstance.enrollmentDate )">
- <input type="hidden" name="dateOfIncident" id="dateOfIncident" value="$!format.formatDate( $programInstance.dateOfIncident )">
- <script type="text/javascript">
- #if($status==1 || $status==5 )
- disable('$duedateId');
- #else
- datePicker( '$duedateId' );
- #end
- </script>
- </td>
- </tr>
- <tr>
- <td>$i18n.getString( "status" )</td>
- <td>
- <select id="stat_$programStageInstance.id" name="status_$programStageInstance.id" onchange="setEventStatus(this, $programStageInstance.id)">
- #if($status==4)
- <option value='4'>$i18n.getString("overdue")</option>
- <option value='5'>$i18n.getString("skipped")</option>
- #elseif($status==3)
- <option value='3'>$i18n.getString("scheduled_in_future")</option>
- <option value='5'>$i18n.getString("skipped")</option>
- #elseif($status==5)
- <option value='4'>$i18n.getString("overdue")</option>
- <option value='3'>$i18n.getString("scheduled_in_future")</option>
- <option value='5'>$i18n.getString("skipped")</option>
- #else
- <option value='1'>$i18n.getString("completed")</option>
- <option value='2'>$i18n.getString("incompleted")</option>
- #end
- </select>
- <script>
- setFieldValue("stat_$programStageInstance.id", $status);
- </script>
- </td>
- </tr>
- <tr>
- <td>$i18n.getString( "post_comment" )</td>
- <td>
- <input type='text' id='commentText' name='commentText' onkeypress="keypress(event,this,'$programStageInstance.id');">
- <input type='button' value="+" class='tiny-button' title='$i18n.getString("post_comment")' onclick="addComment( byId('commentText'),'$programStageInstance.id');">
- </td>
- </tr>
- <tr>
- <td>$i18n.getString( "message" )</td>
- <td>
- <textarea id="smsMessage" name="smsMessage" style="width:260px;height:100px;" class="{validate:{required:true,maxlength:160}}"></textarea>
- <input type="button" value="»" class='tiny-button' onclick="sendSmsOnePatient( byId('smsMessage'),'$programStageInstance.id' );"/>
- </td>
- </tr>
- <tr>
- <td></td>
- <td id="smsError" style="color:red;"></td>
- </tr>
- </table>
- </div>
-
- <div id="tab-2">
- <table class="mainPageTable">
- <col width="160px"/>
- <col width="300px"/>
- <col/>
- <tr><td> </td></tr>
- <tr>
- <th>$i18n.getString( "date" )</th>
- <th>$i18n.getString( "program_stage" )</th>
- <th>$i18n.getString( "sender" )</th>
- <th>$i18n.getString( "message" )</th>
- </tr>
-
- <tbody id='commentTB'>
- #set($index = 0)
- #foreach( $comment in $comments )
- #if( $index < 5 )
- <tr id="comment_$comment.id">
- <td>$format.formatDateTime($comment.createdDate)</td>
- <td>$programStageInstance.programStage.name</td>
- <td>$comment.creator</td>
- <td>$comment.commentText</td>
- #set($index = $index + 1)
- </tr>
- #end
- #end
-
- #foreach( $sms in $outboundSms )
- #if( $index < 5 )
- <tr id="tr${sms.id}" >
- <td>$format.formatDateTime($!sms.date)</td>
- <td>$programStageInstance.programStage.name</td>
- <td>$sms.sender</td>
- <td>$sms.message</td>
- </tr>
- #end
- #end
- #foreach( $comment in $comments )
- #if( $index >= 5 )
- <tr id="comment_$comment.id" class='hidden'>
- <td>$format.formatDateTime($comment.createdDate)</td>
- <td>$programStageInstance.programStage.name</td>
- <td>$comment.creator</td>
- <td>$comment.commentText</td>
- </tr>
- #end
- #end
-
- #foreach( $sms in $outboundSms )
- #if( $index >= 5 )
- <tr id="tr${sms.id}" class='hidden' >
- <td>$format.formatDateTime($sms.date)</td>
- <td>$programStageInstance.programStage.name</td>
- <td>$sms.sender</td>
- <td>$sms.message</td>
- </tr>
- #end
- #end
- </tbody>
- </table>
- <br>
- #set($count = $comments.size() + $outboundSms.size() )
- <input type='button' id="showCommentBtn" name="showCommentBtn" value='$i18n.getString("show_hide_more")' #if($count && $count<=5) class='hidden' #end onclick='commentDivToggle(false);'>
- <input type='button' id="hideCommentBtn" name="hideCommentBtn" value='$i18n.getString("show_hide_more")' class='hidden' onclick='commentDivToggle(true);'>
- </div>
-</div>
-
<script type="text/javascript">
jQuery(document).ready( function(){
+ setFieldValue('programStageName', "$programStageInstance.programStage.name");
setFieldValue( "programStageInstanceId", "$!programStageInstance.id" );
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-10-03 07:54:14 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-10-05 03:06:42 +0000
@@ -425,4 +425,29 @@
padding-right:1px;
padding-left:1px;
padding-bottom:1px;
-}
\ No newline at end of file
+}
+
+
+
+
+
+div.event-tracking-area
+{
+ border:1px solid #d0d0d0;
+ padding-top:1px;
+ padding-right:1px;
+ padding-left:1px;
+ padding-bottom:0px;
+ height: 270px;
+ width: 450px;
+ overflow:hidden;
+ position:relative;
+}
+
+.content-event-tracking-area
+{
+ height: 270px;
+ width: 450px;
+ overflow-y: auto;
+ overflow-x:hidden;
+}