← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17727: typo fix in number validation directive; labels for ou tree and meta-data download progress indic...

 

------------------------------------------------------------
revno: 17727
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-12-18 12:50:32 +0100
message:
  typo fix in number validation directive; labels for ou tree and meta-data download progress indicator
modified:
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/services.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-event-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties	2014-12-09 23:24:16 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/i18n/i18n_app.properties	2014-12-18 11:50:32 +0000
@@ -118,5 +118,7 @@
 posInt=Positive Integer
 negInt=Negative Integer
 zeroPostitiveInt=Zero or Positive Integer
+loading_tree=Loading orgunit tree
+loading_metadata=Loading meta-data
 
 

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2014-12-16 15:44:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/scripts/controllers.js	2014-12-18 11:50:32 +0000
@@ -23,6 +23,7 @@
                 DialogService) {
     //selected org unit
     $scope.selectedOrgUnit = '';
+    $scope.treeLoaded = false;
     
     $scope.calendarSetting = CalendarService.getSetting();
     

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2014-12-17 14:21:45 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2014-12-18 11:50:32 +0000
@@ -1,3 +1,15 @@
+html, body { 
+    height:100%;
+    margin: 0;
+    padding: 0;
+    background-color: white;
+    font-size: 10pt;
+}
+
+.not-for-screen {
+    display: none;
+}
+
 /*----------------------------------------------------------------------------*/
 /* Form
 /*----------------------------------------------------------------------------*/

=== modified 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	2014-12-08 16:37:23 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/home.html	2014-12-18 11:50:32 +0000
@@ -16,11 +16,16 @@
         </ul>
     </div>
     <img id="ouwt_loader" src="../images/ajax-loader-bar.gif"/>
+    <div class="small-horizonal-spacing" ng-if='!treeLoaded'>
+        {{'loading_tree'| translate}}
+    </div>
 </div>
 
 <div class="page" id="mainPage">    
+    
     <div ng-if="!selectedOrgUnit">
-        <img src="../images/ajax-loader-bar.gif" alt="{{'in_progress'| translate}}" ng-if="!selectedOrgUnit"/>
+        <img src="../images/ajax-loader-bar.gif" alt="{{'in_progress'| translate}}" ng-if="!selectedOrgUnit"/><br>
+        {{'loading_metadata'| translate}}
     </div> 
     
     <!-- selection begins-->

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js	2014-12-17 14:17:16 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/directives.js	2014-12-18 11:50:32 +0000
@@ -33,6 +33,11 @@
                         //Disable ou selection until meta-data has downloaded
                         $( "#orgUnitTree" ).addClass( "disable-clicks" );
                         
+                        $timeout(function() {
+                            scope.treeLoaded = true;
+                            scope.$apply();
+                        });
+                        
                         downloadMetaData();
                     });
                 });
@@ -66,6 +71,19 @@
     };
 })
 
+.directive('d2Enter', function () {
+    return function (scope, element, attrs) {
+        element.bind("keydown keypress", function (event) {
+            if(event.which === 13) {
+                scope.$apply(function (){
+                    scope.$eval(attrs.d2Enter);
+                });
+                event.preventDefault();
+            }
+        });
+    };
+})
+
 .directive('d2NumberValidation', function() {
     
     return {
@@ -85,7 +103,7 @@
                     case "negInt":
                         isValid = dhis2.validation.isNegativeInt(value);
                         break;
-                    case "zeroPostitiveInt":
+                    case "zeroPositiveInt":
                         isValid = dhis2.validation.isZeroOrPositiveInt(value);
                         break;
                     case "int":

=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/services.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/services.js	2014-12-16 15:44:11 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/angular/plugins/dhis2/services.js	2014-12-18 11:50:32 +0000
@@ -166,8 +166,9 @@
             var calendarSetting = CalendarService.getSetting();
             dateValue = moment(dateValue, 'YYYY-MM-DD')._d;
             dateValue = Date.parse(dateValue);     
-            dateValue = $filter('date')(dateValue, calendarSetting.keyDateFormat); 
-            return dateValue;
+            //dateValue = $filter('date')(dateValue, calendarSetting.keyDateFormat); 
+            //return dateValue;
+            return $filter('date')(dateValue, calendarSetting.keyDateFormat);
         }
     };
 })