← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17345: disable datepicker animation; capturing coordinates through google map - WIP

 

------------------------------------------------------------
revno: 17345
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-11-03 12:11:25 +0100
message:
  disable datepicker animation; capturing coordinates through google map - WIP
added:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/column-display-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/header-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/map-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/notes-controller.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/map.html
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.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
=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/column-display-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/column-display-controller.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/column-display-controller.js	2014-11-03 11:11:25 +0000
@@ -0,0 +1,24 @@
+//Controller for column show/hide
+eventCaptureControllers.controller('ColumnDisplayController', 
+    function($scope, 
+            $modalInstance, 
+            hiddenGridColumns,
+            eventGridColumns){
+    
+    $scope.eventGridColumns = eventGridColumns;
+    $scope.hiddenGridColumns = hiddenGridColumns;
+    
+    $scope.close = function () {
+      $modalInstance.close($scope.eventGridColumns);
+    };
+    
+    $scope.showHideColumns = function(gridColumn){
+       
+        if(gridColumn.show){                
+            $scope.hiddenGridColumns--;            
+        }
+        else{
+            $scope.hiddenGridColumns++;            
+        }      
+    };    
+});
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js	2014-11-03 10:34:14 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/directives.js	2014-11-03 11:11:25 +0000
@@ -169,7 +169,9 @@
                 yearRange: '-120:+30',
                 minDate: minDate,
                 maxDate: maxDate,
-                calendar: calendar, 
+                calendar: calendar,
+                duration: "fast",
+                showAnim: "",
                 renderer: $.calendars.picker.themeRollerRenderer,
                 onSelect: function(date) {
                     //scope.date = date;

=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/header-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/header-controller.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/header-controller.js	2014-11-03 11:11:25 +0000
@@ -0,0 +1,13 @@
+//Controller for the header section
+eventCaptureControllers.controller('HeaderController',
+        function($scope,                
+                DHIS2URL,
+                TranslationService) {
+
+    TranslationService.translate();
+    
+    $scope.home = function(){        
+        window.location = DHIS2URL;
+    };
+    
+});
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/map-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/map-controller.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/map-controller.js	2014-11-03 11:11:25 +0000
@@ -0,0 +1,26 @@
+//controller for dealing with google map
+eventCaptureControllers.controller('MapController',
+        function($scope, 
+                $modalInstance,
+                DHIS2URL,
+                TranslationService,
+                geoJsons,
+                location) {
+
+    TranslationService.translate();
+    
+    $scope.home = function(){        
+        window.location = DHIS2URL;
+    };
+    
+    $scope.location = location;
+    $scope.geoJsons = geoJsons;
+    
+    $scope.close = function () {
+        $modalInstance.close();
+    };
+    
+    $scope.captureCoordinate = function(){        
+        $modalInstance.close($scope.location);
+    };
+});
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/notes-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/notes-controller.js	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/notes-controller.js	2014-11-03 11:11:25 +0000
@@ -0,0 +1,12 @@
+//Controller for notes
+eventCaptureControllers.controller('NotesController', 
+    function($scope, 
+            $modalInstance, 
+            dhis2Event){
+    
+    $scope.dhis2Event = dhis2Event;
+    
+    $scope.close = function () {
+        $modalInstance.close();
+    };      
+});
\ No newline at end of file

=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	2014-11-03 11:11:25 +0000
@@ -0,0 +1,101 @@
+<script src="../dhis-web-commons/ouwt/ouwt.js"></script>
+<script src="scripts/event-capture.js"></script>
+
+<div id="leftBar"> 
+
+    <div style="margin-top:20px">
+
+
+        <img id="searchIcon" src="../images/search.png" style="cursor: pointer" title="{{ 'locate_organisation_unit_by_name' | translate}}">
+
+        <span id="searchSpan" style="width:100%;display:none;">
+            <input type="text" id="searchField" name="key" style="width:160px" />
+            <input type="button" value="Find" onclick="selection.findByName()" />
+        </span>
+    </div>
+
+    <div id="orgUnitTree">
+        <ul>
+        </ul>
+    </div>
+    <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
+</div>
+
+<div class="page" id="mainPage" ng-show="selectedOrgUnit">
+    <h3>
+        {{'event_capture'| translate}}
+    </h3>
+
+    <!-- selection begins-->
+    <div>
+        <table>
+            <tr>
+                <td><label>{{'registering_unit'| translate}}</label></td>
+                <td><input type="text" class="fixed-width-text" selected-org-unit ng-model="selectedOrgUnit.name" value="{{selectedOrgUnit.name|| 'please_select'| translate}}" disabled="" style="height:14px"></td>                        	                            
+            </tr>
+            <tr>
+                <td><label>{{'program'| translate}}</label></td>
+                <td>
+                    <select id="programId" 
+                            class="fixed-width-select"
+                            name="programId" 
+                            ng-model="selectedProgram" 
+                            ng-options="program as program.name for program in programs | orderBy: 'name'" 
+                            ng-change="loadEvents()"
+                            ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid">
+                        <option value="">{{'please_select'| translate}}</option>
+                    </select>      
+                </td>
+                <td style='padding-left: 10px;'>
+                    <button class="button button-std not-printable"
+                            ng-show="selectedProgramStage" 
+                            ng-click="showEventRegistration()" 
+                            ng-disabled="eventRegistration || editingEventInFull || editingEventInGrid">
+                        {{'register_event'| translate}}
+                    </button>  
+                </td>
+                <td ng-if="(editingEventInFull || eventRegistration) && customForm" style='padding-left: 10px;'>
+                    <button class="button button-std not-printable"
+                            ng-click="switchDataEntryForm()">
+                        {{displayCustomForm ? 'use_default_form' : 'use_custom_form'| translate}}
+                    </button>  
+                </td>
+                <td ng-if="dhis2Events.length > 0" style='padding-left: 10px;'>
+                    <button class="button button-std not-printable"
+                            onclick="javascript:window.print()">
+                        <span ng-if="!eventRegistration && !editingEventInFull">{{'print_list'| translate}}</span>
+                        <span ng-if="eventRegistration">{{'print_form'| translate}}</span>
+                        <span ng-if="editingEventInFull">{{'print_details'| translate}}</span>
+                    </button>  
+                </td> 
+            </tr>                       
+        </table>
+    </div>
+    <!-- selection ends -->
+    <div id="hideTypeAheadPopUp" ng-hide="true"></div>
+    <!-- event grid begins -->
+    <div ng-include="'views/eventList.html'"></div>
+    <!-- event grid ends -->
+
+    <!-- event update in full / registration begins-->
+    <div>                
+        <form name="outerForm" novalidate>
+            <div ng-if="editingEventInFull || eventRegistration">
+                <h3>
+                    <span ng-if="editingEventInFull">{{'event_details'| translate}}</span>                       
+                    <span ng-if="eventRegistration">{{'new_event'| translate}}</span>                            
+                </h3>                            
+
+                <div class="bordered-div" ng-if="displayCustomForm">
+                    <div ng-include="'views/customForm.html'"></div>  
+                </div>
+
+                <div class="bordered-div container-default-form" ng-if="!displayCustomForm">
+                    <div ng-include="'views/defaultForm.html'"></div>                
+                </div>
+
+            </div>
+        </form>
+    </div>
+    <!-- event update / registration ends -->                
+</div>            

=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/map.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/map.html	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/map.html	2014-11-03 11:11:25 +0000
@@ -0,0 +1,13 @@
+<div class="modal-header page">
+    <h3>
+        {{'point_and_click_for_coordinate'| translate}}
+        <span id='polygon-label' class="pull-right"></span>
+    </h3>
+</div>
+<div class="modal-body page">
+    <d2-google-map location="location" id="map-container" geojsons="geoJsons"></d2-google-map>
+</div>
+<div class="modal-footer page">
+    <button class="big-button grey" data-ng-click="captureCoordinate()">{{'capture'| translate}}</button>
+    <button class="big-button grey" data-ng-click="close()">{{'cancel'| translate}}</button>        
+</div>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js	2014-10-23 14:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/directives.js	2014-11-03 11:11:25 +0000
@@ -164,6 +164,8 @@
                 minDate: minDate,
                 maxDate: maxDate,
                 calendar: calendar, 
+                duration: "fast",
+                showAnim: "",
                 renderer: $.calendars.picker.themeRollerRenderer,
                 onSelect: function(date) {
                     //scope.date = date;