dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32028
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16356: changes to options reflected in tracker capture
------------------------------------------------------------
revno: 16356
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-08 16:59:22 +0200
message:
changes to options reflected in tracker capture
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html
--
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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-07-13 13:08:50 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/dataentry/default-form.html 2014-08-08 14:59:22 +0000
@@ -34,7 +34,7 @@
ng-class='getInputNotifcationClass(prStDe.dataElement.id,false)'
ng-model="currentEvent[prStDe.dataElement.id]"
ng-required={{prStDe.compulsory}}
- typeahead="option for option in prStDe.dataElement.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead="option.code as option.name for option in prStDe.dataElement.optionSet.options | filter:$viewValue | limitTo:20"
typeahead-open-on-focus
ng-blur="saveDatavalue(prStDe)"
name="foo"/>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-07-25 10:09:00 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html 2014-08-08 14:59:22 +0000
@@ -44,7 +44,7 @@
name="foo"
class="form-control"
ng-model="attribute.value"
- typeahead="option for option in attributes[attribute.attribute].optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead="option.code as option.name for option in attributes[attribute.attribute].optionSet.options | filter:$viewValue | limitTo:20"
typeahead-open-on-focus
ng-disabled="!editProfile" ng-required="attribute.mandatory"/>
<span ng-show="outerForm.submitted && innerForm.foo.$invalid" class="error">{{'required'| translate}} - {{attribute.type}}</span>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-07-25 10:09:00 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/registration/registration.html 2014-08-08 14:59:22 +0000
@@ -47,7 +47,7 @@
name="foo"
class="form-control"
ng-model="attribute.value"
- typeahead="option for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead="option.code as option.name for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
typeahead-open-on-focus
ng-required="attribute.mandatory"
/>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html 2014-07-04 14:36:11 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/registration.html 2014-08-08 14:59:22 +0000
@@ -54,7 +54,7 @@
name="foo"
class="form-control"
ng-model="attribute.value"
- typeahead="option for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
+ typeahead="option.code as option.name for option in attribute.optionSet.options | filter:$viewValue | limitTo:20"
typeahead-open-on-focus
ng-required="attribute.mandatory"
/>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2014-07-04 14:36:11 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/search.html 2014-08-08 14:59:22 +0000
@@ -15,12 +15,13 @@
{{'program' | translate}}
</td>
<td>
- <select ng-model="selectedProgramForRelative"
+ <select ng-model="program"
class="form-control"
- ng-change='setAttributesForSearch(selectedProgramForRelative)'
- ng-options="program as program.name for program in programs | orderBy: 'name'">
- <option value="">{{'please_select_a_program'| translate}}</option>
- </select>
+ ng-options="program as program.name for program in programs | orderBy: 'name'"
+ ng-disabled="programs.length < 1"
+ ng-change="setAttributesForSearch(program)">
+ <option value="">{{programs.length > 0 ? 'please_select_a_program' : 'no_program_exists' | translate}}</option>
+ </select>
</td>
</tr>
<tr ng-if="selectedProgramForRelative">
@@ -91,7 +92,7 @@
</div>
<div ng-switch-when="optionSet">
<select multiple ui-select2 ng-model="attribute.value" data-placeholder="{{'please_select'| translate}}" style="width:100%;">
- <option ng-repeat="option in attribute.optionSet.options" value="{{option}}">{{option}}</option>
+ <option ng-repeat="option in attribute.optionSet.options" value="{{option.code}}">{{option.name}}</option>
</select>
</div>
<div ng-switch-when="bool">
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-07-23 12:21:33 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-08-08 14:59:22 +0000
@@ -763,7 +763,7 @@
' ng-class="getInputNotifcationClass(' + deId + ',true)"' +
' ng-required="programStageDataElements.' + deId + '.compulsory"' +
' ng-blur="saveDatavalue(programStageDataElements.'+ deId + ')"' +
- ' typeahead="option for option in programStageDataElements.'+deId+'.dataElement.optionSet.options | filter:$viewValue | limitTo:20"' +
+ ' typeahead="option.code as option.name for option in programStageDataElements.'+deId+'.dataElement.optionSet.options | filter:$viewValue | limitTo:20"' +
' typeahead-open-on-focus ng-required="programStageDataElements.'+deId+'.compulsory">';
}
if(programStageDataElements[deId].dataElement.type == "bool"){
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-07-21 09:39:19 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js 2014-08-08 14:59:22 +0000
@@ -516,7 +516,7 @@
return $.ajax( {
url: '../api/optionSets.json',
type: 'GET',
- data: 'filter=id:eq:' + id +'&fields=id,name,version,options'
+ data: 'filter=id:eq:' + id +'&fields=id,name,version,options[id,name,code]'
}).done( function( response ){
_.each( _.values( response.optionSets ), function( optionSet ) {
dhis2.tc.store.set( 'optionSets', optionSet );
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-07-21 09:42:16 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/search.html 2014-08-08 14:59:22 +0000
@@ -78,11 +78,11 @@
</div>
<div ng-switch-when="optionSet">
<select multiple ui-select2 ng-model="attribute.value" data-placeholder="{{'please_select'| translate}}" style="width:100%;">
- <option ng-repeat="option in attribute.optionSet.options" value="{{option}}">{{option}}</option>
+ <option ng-repeat="option in attribute.optionSet.options" value="{{option.code}}">{{option.name}}</option>
</select>
</div>
<div ng-switch-when="bool">
- <select multiple ui-select2 ng-model="attribute.value" data-placeholder="{{'please_select'| translate}}" style="width:100%;">
+ <select ui-select2 ng-model="attribute.value" data-placeholder="{{'please_select'| translate}}" style="width:100%;">
<option ng-repeat="option in boolOperators" value="{{option}}">{{option| translate}}</option>
</select>
</div>