dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21415
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10132: Minor fix for case entry.
------------------------------------------------------------
revno: 10132
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-03-11 14:46:26 +0700
message:
Minor fix for case entry.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.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/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-03-09 04:40:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-03-11 07:46:26 +0000
@@ -490,6 +490,8 @@
enable('listPatientBtn');
enable('addPatientBtn');
enable('advancedSearchBtn');
+ enable('scheduled7DaysBtn');
+ enable('scheduled30DaysBtn');
jQuery('#advanced-search :input').each( function( idx, item ){
enable(this.id);
});
@@ -499,6 +501,8 @@
disable('listPatientBtn');
disable('addPatientBtn');
disable('advancedSearchBtn');
+ disable('scheduled7DaysBtn');
+ disable('scheduled30DaysBtn');
jQuery('#advanced-search :input').each( function( idx, item ){
disable(this.id);
});
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2013-03-07 15:11:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/multiDataEntrySelect.vm 2013-03-11 07:46:26 +0000
@@ -2,7 +2,7 @@
jQuery(document).ready( function(){
jQuery("#programIdAddPatient option").each(function(){
var item = jQuery(this);
- if( item.attr('type')!=1 || item.val()=='' ){
+ if( item.attr('type')!=1 && item.val()!='' ){
item.remove();
}
});
@@ -11,10 +11,6 @@
hideById('addPatientBtn');
jQuery("#searchObjectId [value=prg]").remove();
registration = false;
- if(jQuery("#programIdAddPatient option").length > 0){
- enable('listPatientBtn');
- enable('advancedSearchBtn');
- }
var i18n_scheduled_today = '$encoder.jsEscape( $i18n.getString( "scheduled_today" ) , "'")';
setFieldValue('listPatientBtn', i18n_scheduled_today);
showById('scheduled7DaysBtn');
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-08 09:15:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-11 07:46:26 +0000
@@ -13,8 +13,8 @@
</td>
<td rowspan='2' valign='bottom'>
<input type="button" style='width:130px' id='listPatientBtn' style='260px;' value="$i18n.getString( 'list_all_patients' )" onclick="javascript:listAllPatient();" disabled >
- <input type="button" style='width:130px' class='hidden' id='scheduled7DaysBtn' style='260px;' value="$i18n.getString( 'scheduled_7_days' )" onclick="javascript:scheduled7Days();" >
- <input type="button" style='width:130px' class='hidden' id='scheduled30DaysBtn' style='260px;' value="$i18n.getString( 'scheduled_30_days' )" onclick="javascript:scheduled30Days();" >
+ <input type="button" style='width:130px' class='hidden' id='scheduled7DaysBtn' style='260px;' value="$i18n.getString( 'scheduled_7_days' )" onclick="javascript:scheduled7Days();" disabled >
+ <input type="button" style='width:130px' class='hidden' id='scheduled30DaysBtn' style='260px;' value="$i18n.getString( 'scheduled_30_days' )" onclick="javascript:scheduled30Days();" disabled >
<input type="button" style='width:130px' id='addPatientBtn' name='addPatientBtn' class='large-button' value='$i18n.getString( "add_new" )' onclick="showAddPatientForm();" disabled >
<input type="button" style='width:130px' id='advancedSearchBtn' value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').toggle();" disabled>
</td>
@@ -23,7 +23,7 @@
<td>$i18n.getString('program')</td>
<td>
<select id='programIdAddPatient' name='programIdAddPatient' onchange='enableBtn();'>
- <option value='' type='2'>[$i18n.getString("view_all")]</option>
+ <option value='' type='2' id='emptyProgramOption'>[$i18n.getString("please_select")]</option>
#foreach($program in $programs)
<option value="$program.id" type='$program.type'>$program.displayName</option>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-03-07 15:11:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-03-11 07:46:26 +0000
@@ -134,5 +134,5 @@
#end
setFieldValue('startDueDate','');
setFieldValue('endDueDate','');
-
+ jQuery('#emptyProgramOption').text('[' + '$i18n.getString("view_all")' + ']');
</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-03-07 15:11:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-03-11 07:46:26 +0000
@@ -2,7 +2,7 @@
jQuery(document).ready( function(){
jQuery("#programIdAddPatient option").each(function(){
var item = jQuery(this);
- if(item.attr('type')!=2 || item.val()==''){
+ if(item.attr('type')!=2 && item.val()==''){
item.remove();
}
});
@@ -11,11 +11,6 @@
setFieldValue('isSearchByProgram', true);
registration = false;
$("#searchObjectId option[value='prg']").remove();
- if(jQuery("#programIdAddPatient option").length > 0){
- enable('listPatientBtn');
- enable('addPatientBtn');
- enable('advancedSearchBtn');
- }
setFieldValue('startDueDate','');
setFieldValue('endDueDate','');
});