← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15195: minor

 

------------------------------------------------------------
revno: 15195
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Thu 2014-05-08 11:34:02 +0200
message:
  minor
removed:
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/selection.html
added:
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html
modified:
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js	2014-04-04 11:55:55 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/app.js	2014-05-08 09:34:02 +0000
@@ -21,7 +21,7 @@
     delete $httpProvider.defaults.headers.common['X-Requested-With'];
     
     $routeProvider.when('/', {
-        templateUrl:'views/selection.html',
+        templateUrl:'views/home.html',
         controller: 'SelectionController'
     }).when('/dashboard',{
         templateUrl:'views/dashboard.html',

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-04-08 15:37:00 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js	2014-05-08 09:34:02 +0000
@@ -417,8 +417,7 @@
                     }
                 }); 
             
-                $scope.programStages = [];
-
+                $scope.programStages = [];        
                 angular.forEach($scope.selectedProgram.programStages, function(stage){
                    $scope.programStages.push(storage.get(stage.id)); 
                 });
@@ -433,6 +432,10 @@
             });            
         }        
     };
+    
+    $scope.enroll = function(){        
+        console.log('Enrollment', $scope.selectedEntity, ' ', $scope.selectedProgram);
+    };
 })
 
 //Controller for the data entry section

=== added file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/home.html	2014-05-08 09:34:02 +0000
@@ -0,0 +1,131 @@
+<script src="../dhis-web-commons/ouwt/ouwt.js"></script>
+<script src="scripts/tracker-capture.js"></script>
+
+<div id="leftBar">
+    <div id="orgUnitTree" style="margin-top:20px">
+        <ul>
+        </ul>
+    </div>
+    <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
+</div>
+<div class="page" id="mainPage">
+    <h1>
+        <span ng-show="!selectedProgram">
+            {{'search'| translate}} {{selectedProgram.trackedEntity.name}}
+        </span>
+        <span ng-show="selectedProgram">
+            {{'search_for'| translate}} {{selectedProgram.trackedEntity.name}}
+        </span>            
+        <a href ng-click="getHelpContent()" title="{{'help'| translate}}"><i class="fa fa-question-circle"></i></a>
+    </h1>
+
+    <div class="row">
+        <input type="text" selected-org-unit ng-model="selectedOrgUnit.name" ng-hide=true>
+        <div class="input-group col-md-6">
+            <input type="text" class="form-control" ng-focus="hideSearch()">
+            <span class="input-group-btn">
+                <button class="btn btn-default" type="button" title="{{'more' | translate}}" ng-click="showSearch()"><i class="fa fa-caret-down"></i></button>
+            </span>                
+        </div>
+        <div class="btn-group col-md-6">
+            <button type="button" class="btn btn-default">{{'search'| translate}}</button>
+            <button type="button" class="btn btn-default" ng-click="loadTrackedEntities()">{{'list_all_entities'| translate}}</button>
+            <button type="button" class="btn btn-default" ng-click="showRegisteration()">{{'add_new'| translate}}</button>
+        </div>
+    </div>
+    <div class="row" ng-show="showSearchDiv">
+        <div class="col-md-6">
+            <div ng-include="'views/search.html'" ng-controller='SearchController'></div>             
+        </div>
+    </div>
+
+
+    <!-- entity grid begins -->
+    <div ng-show="trackedEntityList">
+        <div id="listDiv" ng-switch="trackedEntityList">                    
+            <div ng-switch-when=""></div>
+            <div ng-switch-default>
+                <h2>
+                    {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}
+                </h2>
+                <div ng-switch="trackedEntityList.rows.length">
+                    <div ng-switch-when="undefined">
+                        <p>
+                            {{'empty'| translate}} {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}                        
+                        </p>
+                    </div>
+                    <div ng-switch-when="0">
+                        <p>
+                            {{'empty'| translate}} {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}
+                        </p>
+                    </div>
+                    <div ng-switch-default>
+
+                        <!-- entity begins -->
+                        <table class="listTable dhis2-table-striped-border dhis2-table-hover">                    
+                            <thead>                        
+                                <tr>
+                                    <th ng-show="!gridColumn.hide" 
+                                        class="max-column-width"                                                
+                                        ng-repeat="gridColumn in gridColumns">
+
+                                        <!-- sort icon begins -->
+                                        <span ng-hide="gridColumn.showFilter" class="bold" ng-click="sortGrid(gridColumn)">
+                                            <i ng-show="sortHeader == gridColumn.id && !reverse" class="fa fa-sort-desc"></i>
+                                            <i ng-show="sortHeader == gridColumn.id && reverse" class="fa fa-sort-asc"></i>
+                                            {{gridColumn.name}}
+                                        </span>
+                                        <!-- sort icon ends -->
+
+                                        <!-- filter icon begins -->
+                                        <span class='pull-right'>
+                                            <span ng-show="gridColumn.type !== 'date'">
+                                                <a href ng-click="filterInGrid(gridColumn)" title="{{'filter'| translate}}"><span ng-class="{true: 'filter - without - content', false: 'filter - with - content'} [filterText[gridColumn.id] == undefined || filterText[gridColumn.id] == '']"><i class="fa fa-filter"></i></span></a>
+                                            </span>
+                                            <span ng-show="gridColumn.type === 'date'">
+                                                <a href ng-click="filterInGrid(gridColumn)" title="{{'filter'| translate}}"><span ng-class="{true: 'filter - without - content', false: 'filter - with - content'} [(filterText[gridColumn.id].start == 'undefined' || filterText[gridColumn.id].start == '') && (filterText[gridColumn.id].end == 'undefined' || filterText[gridColumn.id].end == '')]"><i class="fa fa-filter"></i></span></a>
+                                            </span>                                                    
+                                        </span>
+                                        <!-- filter icon ends -->
+
+                                        <!-- filter input field begins -->
+                                        <div ng-show="gridColumn.showFilter">
+                                            <span ng-show="gridColumn.type !== 'date'">
+                                                <input type="text" ng-model="filterText[gridColumn.id]" ng-blur="filterInGrid(gridColumn)">
+                                            </span>                                                    
+                                            <span ng-show="gridColumn.type === 'date'">
+                                                <input placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-ng-date readonly="readonly">
+                                                <span ng-hide="filterText[gridColumn.id].start == 'undefined' || filterText[gridColumn.id].start == ''">
+                                                    <a href ng-click='removeStartFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>                                                        
+                                                </span>
+                                                <input placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-ng-date readonly="readonly">
+                                                <span ng-hide="filterText[gridColumn.id].end == 'undefined' || filterText[gridColumn.id].end == ''">
+                                                    <a href ng-click='removeEndFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>                                                        
+                                                </span>
+                                            </span>
+                                        </div>
+                                        <!-- filter input field ends -->
+                                    </th>                                    
+                                </tr>                        
+                            </thead>
+                            <tbody id="list">
+                                <tr ng-repeat="trackedEntity in trackedEntityList.rows| paginate:rowsPerPage | orderBy:sortHeader:reverse | gridFilter:filterText:currentFilter" 
+                                    ng-click="showDashboard(trackedEntity)">
+                                    <td class="max-column-width"                                              
+                                        ng-repeat="gridColumn in gridColumns">                                                
+                                        {{trackedEntity[gridColumn.id]}}                                                
+                                    </td>
+                                </tr>
+                            </tbody>        
+                        </table>
+                        <paginator></paginator>
+                        <!-- entity ends -->                            
+                    </div>
+                </div>                        
+            </div>
+        </div> 
+    </div>
+    <!-- entity grid ends -->
+</div>           
+
+

=== removed file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/selection.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/selection.html	2014-04-11 07:13:54 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/views/selection.html	1970-01-01 00:00:00 +0000
@@ -1,133 +0,0 @@
-<script src="../dhis-web-commons/ouwt/ouwt.js"></script>
-<script src="scripts/tracker-capture.js"></script>
-
-<div id="leftBar">
-    <br/>
-    <br/>
-    <div id="orgUnitTree">
-        <ul>
-        </ul>
-    </div>
-    <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
-</div>
-<div class="page" id="mainPage">
-    <h1>
-        <span ng-show="!selectedProgram">
-            {{'search'| translate}} {{selectedProgram.trackedEntity.name}}
-        </span>
-        <span ng-show="selectedProgram">
-            {{'search_for'| translate}} {{selectedProgram.trackedEntity.name}}
-        </span>            
-        <a href ng-click="getHelpContent()" title="{{'help'| translate}}"><i class="fa fa-question-circle"></i></a>
-    </h1>
-
-    <div class="row">
-        <input type="text" selected-org-unit ng-model="selectedOrgUnit.name" ng-hide=true>
-        <div class="input-group col-md-6">
-            <input type="text" class="form-control" ng-focus="hideSearch()">
-            <span class="input-group-btn">
-                <button class="btn btn-default" type="button" title="{{'more' | translate}}" ng-click="showSearch()"><i class="fa fa-caret-down"></i></button>
-            </span>                
-        </div>
-        <div class="btn-group col-md-6">
-            <button type="button" class="btn btn-default">{{'search'| translate}}</button>
-            <button type="button" class="btn btn-default" ng-click="loadTrackedEntities()">{{'list_all_entities'| translate}}</button>
-            <button type="button" class="btn btn-default" ng-click="showRegisteration()">{{'add_new'| translate}}</button>
-        </div>
-    </div>
-    <div class="row" ng-show="showSearchDiv">
-        <div class="col-md-6">
-            <div ng-include="'views/search.html'" ng-controller='SearchController'></div>             
-        </div>
-    </div>
-
-
-    <!-- entity grid begins -->
-    <div ng-show="trackedEntityList">
-        <div id="listDiv" ng-switch="trackedEntityList">                    
-            <div ng-switch-when=""></div>
-            <div ng-switch-default>
-                <h2>
-                    {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}
-                </h2>
-                <div ng-switch="trackedEntityList.rows.length">
-                    <div ng-switch-when="undefined">
-                        <p>
-                            {{'empty'| translate}} {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}                        
-                        </p>
-                    </div>
-                    <div ng-switch-when="0">
-                        <p>
-                            {{'empty'| translate}} {{selectedProgram.trackedEntity.name|| 'entity' | translate}} {{'list'| translate}}
-                        </p>
-                    </div>
-                    <div ng-switch-default>
-
-                        <!-- entity begins -->
-                        <table class="listTable dhis2-table-striped-border dhis2-table-hover">                    
-                            <thead>                        
-                                <tr>
-                                    <th ng-show="!gridColumn.hide" 
-                                        class="max-column-width"                                                
-                                        ng-repeat="gridColumn in gridColumns">
-
-                                        <!-- sort icon begins -->
-                                        <span ng-hide="gridColumn.showFilter" class="bold" ng-click="sortGrid(gridColumn)">
-                                            <i ng-show="sortHeader == gridColumn.id && !reverse" class="fa fa-sort-desc"></i>
-                                            <i ng-show="sortHeader == gridColumn.id && reverse" class="fa fa-sort-asc"></i>
-                                            {{gridColumn.name}}
-                                        </span>
-                                        <!-- sort icon ends -->
-
-                                        <!-- filter icon begins -->
-                                        <span class='pull-right'>
-                                            <span ng-show="gridColumn.type !== 'date'">
-                                                <a href ng-click="filterInGrid(gridColumn)" title="{{'filter'| translate}}"><span ng-class="{true: 'filter - without - content', false: 'filter - with - content'} [filterText[gridColumn.id] == undefined || filterText[gridColumn.id] == '']"><i class="fa fa-filter"></i></span></a>
-                                            </span>
-                                            <span ng-show="gridColumn.type === 'date'">
-                                                <a href ng-click="filterInGrid(gridColumn)" title="{{'filter'| translate}}"><span ng-class="{true: 'filter - without - content', false: 'filter - with - content'} [(filterText[gridColumn.id].start == 'undefined' || filterText[gridColumn.id].start == '') && (filterText[gridColumn.id].end == 'undefined' || filterText[gridColumn.id].end == '')]"><i class="fa fa-filter"></i></span></a>
-                                            </span>                                                    
-                                        </span>
-                                        <!-- filter icon ends -->
-
-                                        <!-- filter input field begins -->
-                                        <div ng-show="gridColumn.showFilter">
-                                            <span ng-show="gridColumn.type !== 'date'">
-                                                <input type="text" ng-model="filterText[gridColumn.id]" ng-blur="filterInGrid(gridColumn)">
-                                            </span>                                                    
-                                            <span ng-show="gridColumn.type === 'date'">
-                                                <input placeholder="{{'start_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].start" data-ng-date readonly="readonly">
-                                                <span ng-hide="filterText[gridColumn.id].start == 'undefined' || filterText[gridColumn.id].start == ''">
-                                                    <a href ng-click='removeStartFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>                                                        
-                                                </span>
-                                                <input placeholder="{{'end_date'| translate}}" type="text" ng-model="filterText[gridColumn.id].end" data-ng-date readonly="readonly">
-                                                <span ng-hide="filterText[gridColumn.id].end == 'undefined' || filterText[gridColumn.id].end == ''">
-                                                    <a href ng-click='removeEndFilterText(gridColumn.id)'><span class='black'><i class="fa fa-trash-o"></i></span></a>                                                        
-                                                </span>
-                                            </span>
-                                        </div>
-                                        <!-- filter input field ends -->
-                                    </th>                                    
-                                </tr>                        
-                            </thead>
-                            <tbody id="list">
-                                <tr ng-repeat="trackedEntity in trackedEntityList.rows| paginate:rowsPerPage | orderBy:sortHeader:reverse | gridFilter:filterText:currentFilter" 
-                                    ng-click="showDashboard(trackedEntity)">
-                                    <td class="max-column-width"                                              
-                                        ng-repeat="gridColumn in gridColumns">                                                
-                                        {{trackedEntity[gridColumn.id]}}                                                
-                                    </td>
-                                </tr>
-                            </tbody>        
-                        </table>
-                        <paginator></paginator>
-                        <!-- entity ends -->                            
-                    </div>
-                </div>                        
-            </div>
-        </div> 
-    </div>
-    <!-- entity grid ends -->
-</div>           
-
-