dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18346
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7699: Enable buttons in Nested search function if a program is selected.
------------------------------------------------------------
revno: 7699
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-07-25 16:24:59 +0700
message:
Enable buttons in Nested search function if a program is selected.
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/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 2012-07-18 04:48:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2012-07-25 09:24:59 +0000
@@ -402,3 +402,12 @@
showListPatientDuplicate( messageElement, true );
}
}
+
+function enableBtn(){
+ var programIdAddPatient = getFieldValue('programIdAddPatient');
+ if( programIdAddPatient!='' ){
+ enable('listPatientBtn');
+ enable('addPatientBtn');
+ enable('advancedSearchBtn');
+ }
+}
=== 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 2012-07-24 10:59:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2012-07-25 09:24:59 +0000
@@ -9,13 +9,13 @@
<td rowspan='2' valign='bottom'>
<input type="button" class='large-button' id='listPatientBtn' value="$i18n.getString( 'list_all_patients' )" onclick="javascript:listAllPatient();" disabled >
<input type="button" id='addPatientBtn' name='addPatientBtn' class='large-button' value='$i18n.getString( "add_new" )' onclick="showAddPatientForm();" disabled >
- <input type="button" value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').toggle();" disabled >
+ <input type="button" id='advancedSearchBtn' value='$i18n.getString( "advanced_search" )' onclick="jQuery('#advanced-search').toggle();" >
</td>
</tr>
<tr id='programAddPatientTR'class='hidden'>
<td>$i18n.getString('program')</td>
<td>
- <select id='programIdAddPatient' name='programIdAddPatient'>
+ <select id='programIdAddPatient' name='programIdAddPatient' onchange='enableBtn();'>
<option value='' type='2'>[$i18n.getString("please_select")]</option>
#foreach($program in $programs)
<option value="$program.id" type='$program.type'>$program.name</option>
=== 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 2012-07-23 03:14:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2012-07-25 09:24:59 +0000
@@ -121,4 +121,7 @@
showById('searchDiv');
#end
+ enable('addPatientBtn');
+ enable('listPatientBtn');
+
</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 2012-07-18 03:52:21 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2012-07-25 09:24:59 +0000
@@ -7,6 +7,7 @@
item.remove();
}
});
+ disable('advancedSearchBtn');
});
</script>