------------------------------------------------------------ revno: 17536 committer: Abyot Asalefew Gizaw <aby...@gmail.com> branch nick: dhis2 timestamp: Wed 2014-11-19 13:45:44 +0100 message: minor modified: dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.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-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-11-19 12:00:31 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/services.js 2014-11-19 12:45:44 +0000 @@ -392,6 +392,8 @@ ' typeahead="option.name as option.name for option in optionSets.'+optionSetId+'.options | filter:$viewValue | limitTo:20"' + ' typeahead-editable="false" ' + ' d2-typeahead-validation ' + + ' class="typeahead" ' + + ' placeholder=" " ' + ' typeahead-open-on-focus ng-required="prStDes.'+deId+'.compulsory"> ' + '<span ng-show="outerForm.submitted && outerForm.'+ deId +'.$invalid" class="required">{{\'option_required\'| translate}}</span>'; } @@ -576,7 +578,7 @@ this.translate = function(){ var profile = storage.get('USER_PROFILE'); - if( profile ){ + if( profile && profile.settings ){ $translate.uses(profile.settings.keyUiLocale); } }; === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-11-19 12:00:31 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html 2014-11-19 12:45:44 +0000 @@ -31,42 +31,44 @@ ng-model="currentEvent.eventDate" ng-disabled="editingEventInFull" ng-required="true" - name="eventDate"/> + name="eventDate" + style="width:99%;"/> <span ng-show="outerForm.submitted && outerForm.eventDate.$invalid" class="required">{{'date_required'| translate}}</span> </td> </tr> <tr ng-if="selectedProgramStage.captureCoordinates"> <td> - {{'lat_lng' | translate}} + {{'latitude'| translate}} </td> <td> - <span class="coordinate-container"> - <input type="number" - ng-model="currentEvent.coordinate.latitude" - placeholder="{{'latitude' | translate}}" + <input type="number" + ng-model="currentEvent.coordinate.latitude" name="latitude" min="-90" max="90" ng-required="false" - style="min-width:128px"/> - <span ng-show="outerForm.submitted && outerForm.latitude.$invalid" class="required">{{'int_required'| translate}} [-90 ... 90]</span> - </span> - <span class="coordinate-container"> - <input type="number" + style="width:99%;"/> + <span ng-show="outerForm.submitted && outerForm.latitude.$invalid" class="required">{{'int_required'| translate}} [-90 ... 90]</span> + </td> + </tr> + <tr ng-if="selectedProgramStage.captureCoordinates"> + <td> + {{'longitude'| translate}} + </td> + <td> + <input type="number" ng-model="currentEvent.coordinate.longitude" - placeholder="{{'longitude' | translate}}" name="longitude" min="-180" max="180" ng-required="false" - style="min-width:128px"/> - <span ng-show="outerForm.submitted && outerForm.longitude.$invalid" class="required">{{'int_required'| translate}}[-180 ... 180]</span> - </span> - <!--<span class='pull-right'> - <a href ng-click="showMap(currentEvent)" title="{{'get_from_map'| translate}}"><i class="fa fa-map-marker fa-2x"></i></a> - </span>--> - </td> - </tr> + style="width:99%;"/> + <span ng-show="outerForm.submitted && outerForm.longitude.$invalid" class="required">{{'int_required'| translate}}[-180 ... 180]</span> + </td> + </tr> + <!--<span class='pull-right'> + <a href ng-click="showMap(currentEvent)" title="{{'get_from_map'| translate}}"><i class="fa fa-map-marker fa-2x"></i></a> + </span>--> <tr ng-repeat="eventGridColumn in eventGridColumns" ng-if="eventGridColumn.id !== 'comment' && eventGridColumn.id !== 'uid' && eventGridColumn.id !== 'event_date'"> <td > {{eventGridColumn.name}} @@ -261,10 +263,12 @@ </div> <div ng-switch-when="string"> <div class="container-fluid" ng-if="prStDes[de.dataElement.id].dataElement.optionSet"> - <span ng-if="!selectedProgram.dataEntryMethod || prStDes[de.dataElement.id].dataElement.optionSet.options.length > 8"> + <span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length > 8"> <input type="text" + class="typeahead" + placeholder=" " ng-model="currentEvent[de.dataElement.id]" - typeahead="option.name as option.name for option in prStDes[de.dataElement.id].dataElement.optionSet.options | filter:$viewValue | limitTo:20" + typeahead="option.name as option.name for option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter:$viewValue | limitTo:20" typeahead-open-on-focus typeahead-editable="false" d2-typeahead-validation @@ -281,7 +285,7 @@ ng-model="currentEvent[de.dataElement.id]" value=""> {{'no_value' | translate}}<br> </label> - <label ng-repeat="option in prStDes[de.dataElement.id].dataElement.optionSet.options"> + <label ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options"> <input type="radio" name={{de.dataElement.id}} ng-required={{prStDes[de.dataElement.id].compulsory}}
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp