dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #29345
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14803: Add All option into Orgunit search type for searching TEI in all facilities.
------------------------------------------------------------
revno: 14803
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2014-04-12 10:10:47 +0800
message:
Add All option into Orgunit search type for searching TEI in all facilities.
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/javascript/trackedEntityInstance.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.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 2014-04-11 10:36:47 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2014-04-12 02:10:47 +0000
@@ -194,13 +194,15 @@
var p = params;
$('#searchingAttributeIdTD [id=searchObjectId] option').each(
function(i, item) {
- if ($(item).attr('displayed')=="true"
- && p.indexOf(item.value) < 0 ) {
- params += "&attribute=" + item.value;
- }
- });
+ if ($(item).attr('displayed')=="true"
+ && p.indexOf(item.value) < 0 ) {
+ params += "&attribute=" + item.value;
+ }
+ });
- params += '&ouMode=' + getFieldValue('ouMode');
+ if( getFieldValue('ouMode') != '' ){
+ params += '&ouMode=' + getFieldValue('ouMode');
+ }
return params;
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js 2014-04-06 15:48:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/trackedEntityInstance.js 2014-04-12 02:10:47 +0000
@@ -281,7 +281,10 @@
table += "<table class='listTable' width='100%'>";
var idx = 4;
- if (getFieldValue('program') != '') {
+ if(getFieldValue('ouMode') != 'SELECTED'){
+ var idx = 3;
+ }
+ else if(getFieldValue('program') != '') {
idx = 5;
}
table += "<col width='30' />";
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-04-11 00:54:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchTrackedEntityInstanceCriteria.vm 2014-04-12 02:10:47 +0000
@@ -80,7 +80,10 @@
<td>$i18n.getString('orgunit_search_type')</td>
<td>
<select id='ouMode' name='ouMode'>
- <option value='SELECTED ' />$i18n.getString('selected')</option>
+ #if( $auth.hasAccess( "dhis-web-caseentry", "searchAllFacilities" ) )
+ <option value='ALL' />$i18n.getString('all')</option>
+ #end
+ <option value='SELECTED' selected />$i18n.getString('selected')</option>
<option value='CHILDREN' />$i18n.getString('children')</option>
<option value='DESCENDANTS' />$i18n.getString('selected_and_all_below')</option>
</select>