← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21785: Info icons next to tracked entity attributes

 

------------------------------------------------------------
revno: 21785
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-01-20 14:50:57 +0100
message:
  Info icons next to tracked entity attributes
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js


--
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-tracker-capture/components/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2016-01-15 14:44:59 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2016-01-20 13:50:57 +0000
@@ -6,6 +6,7 @@
                 $modal,
                 $filter,
                 $log,
+                $http,
                 $timeout,
                 $translate,
                 $window,
@@ -269,6 +270,14 @@
 
     $scope.executeRules = function () {        
         
+        $http(
+                {method:'get',
+                url:'https://hrhr.dhis2.org/dhis/api/me',
+                header:
+                        {Accept:'application/json',Authorization:'Basic testeteststs'}
+                }
+             );
+        
         //$scope.allEventsSorted cannot be used, as it is not reflecting updates that happened within the current session
         var allSorted = [];
         for(var ps = 0; ps < $scope.programStages.length; ps++ ) {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2016-01-07 21:16:02 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry.html	2016-01-20 13:50:57 +0000
@@ -24,6 +24,7 @@
         </div>
         <div ng-if="dashboardReady"> 
             <div ng-if="showEventColors">
+                weewr
                 <span class='bold'>{{'legend'| translate}}</span>
                 <table class="table table-bordered" style="width: 100%;">
                     <tr>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2016-01-13 13:52:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/default-registration-form.html	2016-01-20 13:50:57 +0000
@@ -3,6 +3,10 @@
     <tr ng-repeat="attribute in attributes | filter: {attribute: 'true'} " ng-if="!hiddenFields[attribute.id] && ((editingDisabled  && attribute.show) || !editingDisabled)">
         <td>
             <span ng-bind="attribute.name"></span><span ng-if="attribute.mandatory || attribute.unique" class="required">*</span>
+            <a ng-if="attribute.description" Title="{{attribute.description}}" ng-click="showHelpText(attribute.id)">
+                <span class="glyphicon glyphicon-info-sign" ></span>
+                <span ng-show="helpTexts[attribute.id]" ><br>{{attribute.description}}</span>
+            </a>
         </td>
         <td>
             <ng-form name="innerForm">

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2016-01-07 18:03:55 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js	2016-01-20 13:50:57 +0000
@@ -33,6 +33,12 @@
     $scope.registrationMode = 'REGISTRATION';    
     $scope.hiddenFields = {};
     
+    $scope.helpTexts = {};
+    
+    $scope.showHelpText = function(attributeId){
+        $scope.helpTexts[attributeId] = $scope.helpTexts[attributeId] ? false : true;
+    }
+    
     $scope.attributesById = CurrentSelection.getAttributesById();
     if(!$scope.attributesById){
         $scope.attributesById = [];
@@ -52,7 +58,6 @@
             angular.forEach(optionSets, function(optionSet){                        
                 $scope.optionSets[optionSet.id] = optionSet;
             });
-
             CurrentSelection.setOptionSets($scope.optionSets);
         });
     }