← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16050: tracker and event capture apps now respect programs assinged to logged in user

 

------------------------------------------------------------
revno: 16050
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Wed 2014-07-09 11:33:55 +0200
message:
  tracker and event capture apps now respect programs assinged to logged in user
modified:
  dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.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/relationship/relationship.html
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.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-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js'
--- dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2014-07-06 12:46:18 +0000
+++ dhis-2/dhis-web/dhis-web-event-capture/src/main/webapp/dhis-web-event-capture/scripts/event-capture.js	2014-07-09 09:33:55 +0000
@@ -188,7 +188,7 @@
     $.ajax({
         url: '../api/programs.json',
         type: 'GET',
-        data:'type=3&paging=false&fields=id,name,version,programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+        data:'type=3&userFilter=true&paging=false&fields=id,name,version,programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
     }).done( function(response) {          
         var programs = [];
         _.each( _.values( response.programs ), function ( program ) { 

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html	2014-07-07 15:04:56 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/notes/notes.html	2014-07-09 09:33:55 +0000
@@ -13,7 +13,9 @@
         </span>        
     </div>
     <div ng-show="notesWidget.expand" class="panel-body dashboard-widget-container">
-
+        <div ng-show="selectedEnrollment && !selectedEnrollment.notes" class="alert alert-info">{{'empty_notes'| translate}}</div> 
+        <div ng-show="!selectedEnrollment" class="alert alert-warning">{{'not_yet_enrolled_note'| translate}}</div>
+        
         <div class="add-note" ng-show="addNoteField">
             <textarea class="form-control" rows="3" ng-model="note" placeholder="{{'add_your_note_here'| translate}}"></textarea> 
             <button type="button" 
@@ -33,21 +35,19 @@
             <table class="table table-with-fixed-layout">
                 <tr ng-repeat="note in selectedEnrollment.notes| filter:noteSearchText">
                     <td class="over-flow-hidden">
-                <d2-pop-over content="note" template="note.html" details="{{'details'| translate}}">
-                    <div>{{note.value}}</div>
-                </d2-pop-over>
-                <script type="text/ng-template" id="note.html">
-                    <p>{{content.value}}</p>
-                    <hr>
-                    <p><strong>{{'created_by' | translate}}: </strong>{{content.storedBy}}</p>
-                    <p><strong>{{'date' | translate}}: </strong>{{content.storedDate}}</p>                           
-                </script>
-                </td> 
+                        <d2-pop-over content="note" template="note.html" details="{{'details'| translate}}">
+                            <div>{{note.value}}</div>
+                        </d2-pop-over>
+                        <script type="text/ng-template" id="note.html">
+                            <p>{{content.value}}</p>
+                            <hr>
+                            <p><strong>{{'created_by' | translate}}: </strong>{{content.storedBy}}</p>
+                            <p><strong>{{'date' | translate}}: </strong>{{content.storedDate}}</p>                           
+                        </script>
+                    </td> 
                 </tr>
             </table>
         </div>
 
-        <div ng-show="!selectedEnrollment" class="alert alert-warning">{{'not_yet_enrolled_note'| translate}}</div>
-        <div ng-show="selectedEnrollment && !selectedEnrollment.notes" class="alert alert-info">{{'empty_notes'| translate}}</div> 
     </div>
 </div>
\ No newline at end of file

=== 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-03 11:30:22 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/profile/profile.html	2014-07-09 09:33:55 +0000
@@ -12,7 +12,7 @@
             <a class="small-horizonal-spacing" href ng-click="removeWidget(profileWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>            
         </span>        
     </div>
-    <div ng-show="profileWidget.expand" class="widget-content-container">
+    <div ng-show="profileWidget.expand" class="panel-body dashboard-widget-container">
         <table class="table-borderless table-striped">
             <tr ng-repeat="attribute in selectedTei.attributes" ng-show="attribute.show">
                 <td>

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html	2014-07-07 11:46:45 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship.html	2014-07-09 09:33:55 +0000
@@ -12,7 +12,7 @@
             <a class="small-horizonal-spacing" href ng-click="removeWidget(relationshipWidget)" title="{{'remove'| translate}}"><i class="fa fa-times-circle"></i></a>            
         </span>        
     </div>
-    <div ng-show="relationshipWidget.expand" class="panel-body dashboard-element-container">
+    <div ng-show="relationshipWidget.expand" class="panel-body dashboard-widget-container">
         <div ng-show="selectedTei && !selectedTei.relationships" class="alert alert-info">{{'no_relationship'| translate}}</div> 
         <div ng-show="!selectedTei" class="alert alert-info">{{'relationship_not_possible'| translate}}</div> 
         

=== 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-08 08:30:39 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/tracker-capture.js	2014-07-09 09:33:55 +0000
@@ -287,7 +287,7 @@
     $.ajax({
         url: '../api/programs.json',
         type: 'GET',
-        data:'type=1&paging=false&fields=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,attribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
+        data:'type=1&userFilter=true&paging=false&fields=id,name,version,programTrackedEntityAttributes[displayInList,mandatory,attribute[id]],programStages[id,version,programStageDataElements[dataElement[id,optionSet[id,version]]]]'
     }).done( function(response) {          
         var programs = [];
         _.each( _.values( response.programs ), function ( program ) {