← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19341: event-capture: some style change

 

------------------------------------------------------------
revno: 19341
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2015-06-10 13:58:22 +0200
message:
  event-capture: some style change
modified:
  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/defaultForm.html
  dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html
  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/scripts/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/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2015-05-22 10:23:04 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/styles/style.css	2015-06-10 11:58:22 +0000
@@ -3,7 +3,6 @@
     margin: 0;
     padding: 0;
     background-color: white;
-    font-size: 10pt;
 }
 
 .not-for-screen {
@@ -24,7 +23,7 @@
 }
 
 .fixed-width-select{
-    width: 264px;
+    width: 262px;
 }
 
 /*----------------------------------------------------------------------------*/
@@ -809,8 +808,8 @@
     display: none;
     float: left;
     min-width: 160px;
-    padding: 4px 1px;
-    margin: 2px 0 0;
+    padding: 0;
+    margin: 0;
     font-size: 9pt;
     list-style: none;
     background-color: #fff;
@@ -833,7 +832,7 @@
 }
 .dropdown-menu > li > a {
     display: block;
-    padding: 3px 20px;
+    padding: 5px;
     clear: both;
     font-weight: normal;
     line-height: 1.428571429;
@@ -868,12 +867,14 @@
     cursor: pointer;
 }
 
-input[type=number] {
-    border: 1px solid #aaa;
-    padding: 4px 1px;
+input[type=number], input[type=text], input[type=password], input[type=email], textarea
+{
+  border: 1px solid #aaa;
+  padding: 5px 0 !important;
 }
+
 select {
-    padding: 3px;
+    padding: 3px 0 !important;
 }
 
 .clear {
@@ -938,7 +939,11 @@
     margin-left: 5px;    
 }
 
-form.ng-submitted .ng-invalid {
-    border-color: red;
-    border-width: 2px;
+.form-control {
+    width: 100%;
+}
+
+div#orgUnitTree {
+    height: 50%;
+    border: 1px solid #e3e3e3;
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-06-03 12:18:22 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/defaultForm.html	2015-06-10 11:58:22 +0000
@@ -1,5 +1,5 @@
-<div ng-if='!selectedProgramStage.programStageSections.length'>
-    <table class="dhis2-list-table-striped">                    
+<div  ng-if='!selectedProgramStage.programStageSections.length'>
+    <table class="dhis2-list-table-striped">
         <thead>                        
             <tr>
                 <th>
@@ -16,7 +16,7 @@
                     {{'form_id' | translate}}
                 </td>
                 <td>
-                    <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" style="width:99%;">
+                    <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" class="form-control">
                 </td>
             </tr>
             <tr>
@@ -34,7 +34,7 @@
                            d2-date-validator
                            name="eventDate" 
                            input-field-id='eventDate' 
-                           style="width:99%;">
+                           class="form-control">
                     <div ng-messages="outerForm.eventDate.$error" ng-if="interacted(outerForm.eventDate)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                                         
                     </div>
                 </td>
@@ -48,7 +48,7 @@
                            name="latitude"
                            d2-coordinate-validator
                            ng-required="false"
-                           style="width:99%;"/>
+                           class="form-control"/>
                     <div ng-messages="outerForm.latitude.$error" ng-if="interacted(outerForm.latitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                        
                     </div>
                 </td>                                            
@@ -63,7 +63,7 @@
                            name="longitude" 
                            d2-coordinate-validator
                            ng-required="false"
-                           style="width:99%;"/>
+                           class="form-control"/>
                     <div ng-messages="outerForm.longitude.$error" ng-if="interacted(outerForm.longitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
                     </div>
                 </td>                                                            
@@ -75,9 +75,9 @@
                 <td >
                     <ng-form name="innerForm">
                         <div ng-if="prStDes[eventGridColumn.id].dataElement.optionSetValue">
-                            <span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length >= 7">
+                            <div ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length >= 7">                                
                                 <input type="text"
-                                       class="typeahead"
+                                       class="typeahead form-control"
                                        placeholder="&#xf0d7;&nbsp;&nbsp;"                                                 
                                        ng-model="currentEvent[eventGridColumn.id]"                                          
                                        typeahead="option.name as option.name for option in optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options | filter:$viewValue | limitTo:20" 
@@ -85,10 +85,9 @@
                                        typeahead-editable=false
                                        ng-required={{eventGridColumn.compulsory}}
                                        name="foo" 
-                                       input-field-id={{eventGridColumn.id}} 
-                                       style="width:98%;"/>
-                            </span>                                    
-                            <span ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length < 7">                                    
+                                       input-field-id={{eventGridColumn.id}}/>                                
+                            </div>                                    
+                            <div ng-if="selectedProgram.dataEntryMethod && optionSets[prStDes[eventGridColumn.id].dataElement.optionSet.id].options.length < 7">                                    
                                 <label>
                                     <input type="radio" 
                                            name="foo"  
@@ -105,7 +104,7 @@
                                            ng-model="currentEvent[eventGridColumn.id]"
                                            value={{option.name}}> {{option.name}}<br>                                        
                                 </label>
-                            </span>
+                            </div>
                         </div>
                         <div ng-if="!prStDes[eventGridColumn.id].dataElement.optionSetValue" ng-switch="eventGridColumn.type">
                             <div ng-switch-when="int">
@@ -116,7 +115,7 @@
                                        ng-required={{eventGridColumn.compulsory}}
                                        name="foo" 
                                        input-field-id={{eventGridColumn.id}} 
-                                       style="width:99%;"/>
+                                       class="form-control"/>
                             </div>
                             <div ng-switch-when="string">     
                                 <span ng-if="eventGridColumn.textType==='longText'">
@@ -125,7 +124,7 @@
                                         ng-required={{eventGridColumn.compulsory}}
                                         name="foo" 
                                         input-field-id={{eventGridColumn.id}} 
-                                        style="width:99%;">
+                                        class="form-control">
                                     </textarea>
                                 </span>
                                 <span ng-if="eventGridColumn.textType!=='longText'">
@@ -134,7 +133,7 @@
                                         ng-required={{eventGridColumn.compulsory}}
                                         name="foo" 
                                         input-field-id={{eventGridColumn.id}} 
-                                        style="width:99%;"/>                  
+                                        class="form-control"/>                  
                                 </span>                                              
                             </div>
                             <div ng-switch-when="bool">
@@ -142,7 +141,7 @@
                                         ng-required={{eventGridColumn.compulsory}}
                                         name="foo" 
                                         input-field-id={{eventGridColumn.id}} 
-                                        style="width:99%;">
+                                        class="form-control">
                                 <option value="">{{'please_select'| translate}}</option>                        
                                 <option value="false">{{'no'| translate}}</option>
                                 <option value="true">{{'yes'| translate}}</option>
@@ -158,7 +157,7 @@
                                        ng-required={{eventGridColumn.compulsory}}
                                        name="foo" 
                                        input-field-id={{eventGridColumn.id}} 
-                                       style="width:99%;"/>
+                                       class="form-control">
                             </div>
                             <div ng-switch-when="trueOnly">
                                 <input type="checkbox"                                         
@@ -173,7 +172,7 @@
                                     ng-required={{eventGridColumn.compulsory}}
                                     name="foo" 
                                     input-field-id={{eventGridColumn.id}} 
-                                    style="width:99%;"/> 
+                                    class="form-control"> 
                             </div>
                         </div>                        
                         <div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                                         
@@ -186,7 +185,7 @@
 </div>
 
 
-<div ng-class="" ng-if='selectedProgramStage.programStageSections.length'>
+<div ng-if='selectedProgramStage.programStageSections.length'>
     <table class="dhis2-list-table-striped">        
         <tbody>
             <tr ng-if="selectedProgramStage.preGenerateUID && currentEvent['uid']">
@@ -194,7 +193,7 @@
                     {{'form_id' | translate}}
                 </td>
                 <td>
-                    <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" style="width:99%;">
+                    <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" class="form-control">
                 </td>
             </tr>
             <tr>
@@ -212,7 +211,7 @@
                            d2-date-validator
                            name="eventDate" 
                            input-field-id='eventDate' 
-                           style="width:99%;">
+                           class="form-control">
                     <div ng-messages="outerForm.eventDate.$error" ng-if="interacted(outerForm.eventDate)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                                         
                     </div>
                 </td>
@@ -227,7 +226,7 @@
                            name="latitude"
                            d2-coordinate-validator
                            ng-required="false"
-                           style="width:99%;"/>
+                           class="form-control"/>
                     <div ng-messages="outerForm.latitude.$error" ng-if="interacted(outerForm.latitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                        
                     </div>
                 </td>                                            
@@ -242,7 +241,7 @@
                            name="longitude" 
                            d2-coordinate-validator
                            ng-required="false"
-                           style="width:99%;"/>
+                           class="form-control"/>
                     <div ng-messages="outerForm.longitude.$error" ng-if="interacted(outerForm.longitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
                     </div>
                 </td>                                            
@@ -271,7 +270,7 @@
                                 <div ng-if="prStDes[de.dataElement.id].dataElement.optionSetValue">
                                     <span ng-if="!selectedProgram.dataEntryMethod || optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options.length > 8">
                                         <input type="text"
-                                               class="typeahead"
+                                               class="typeahead form-control"
                                                placeholder="&#xf0d7;&nbsp;&nbsp;"                                                         
                                                ng-model="currentEvent[de.dataElement.id]"
                                                typeahead="option.name as option.name for option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options | filter:$viewValue | limitTo:20" 
@@ -279,8 +278,7 @@
                                                typeahead-editable=false
                                                ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                name="foo" 
-                                               input-field-id={{de.dataElement.id}} 
-                                               style="width:98%;"/>
+                                               input-field-id={{de.dataElement.id}}>
                                     </span>
                                     <span ng-if="selectedProgram.dataEntryMethod && prStDes[de.dataElement.id].dataElement.optionSet.options.length < 7">                                    
                                         <label>
@@ -289,7 +287,7 @@
                                                    input-field-id={{de.dataElement.id}} 
                                                    ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                    ng-model="currentEvent[de.dataElement.id]"
-                                                   value=""> {{'no_value' | translate}}<br>
+                                                   value="">{{'no_value' | translate}}<br>
                                         </label>                                    
                                         <label ng-repeat="option in optionSets[prStDes[de.dataElement.id].dataElement.optionSet.id].options">
                                             <input type="radio" 
@@ -310,7 +308,7 @@
                                                ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                name="foo" 
                                                input-field-id={{de.dataElement.id}} 
-                                               style="width:99%;"/>
+                                               class="form-control"/>
                                     </div>
                                     <div ng-switch-when="string">
                                         <span ng-if="prStDes[de.dataElement.id].dataElement.textType==='longText'">
@@ -319,7 +317,7 @@
                                                 ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                 name="foo" 
                                                 input-field-id={{de.dataElement.id}} 
-                                                style="width:99%;">
+                                                class="form-control">
                                             </textarea>
                                         </span>
                                         <span ng-if="prStDes[de.dataElement.id].dataElement.textType!=='longText'">
@@ -328,7 +326,7 @@
                                                 ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                 name="foo" 
                                                 input-field-id={{de.dataElement.id}} 
-                                                style="width:99%;"/>                  
+                                                class="form-control">                  
                                         </span>
                                     </div>
                                     <div ng-switch-when="bool">
@@ -336,7 +334,7 @@
                                                 ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                 name="foo" 
                                                 input-field-id={{de.dataElement.id}} 
-                                                style="width:99%;">
+                                                class="form-control">
                                         <option value="">{{'please_select'| translate}}</option>                        
                                         <option value="false">{{'no'| translate}}</option>
                                         <option value="true">{{'yes'| translate}}</option>
@@ -352,7 +350,7 @@
                                                ng-required={{prStDes[de.dataElement.id].compulsory}}
                                                name="foo" 
                                                input-field-id={{de.dataElement.id}} 
-                                               style="width:99%;"/>
+                                               class="form-control"/>
                                     </div>
                                     <div ng-switch-when="trueOnly">
                                         <input type="checkbox"                                                  
@@ -367,7 +365,7 @@
                                             ng-required={{prStDes[de.dataElement.id].compulsory}}
                                             name="foo" 
                                             input-field-id={{de.dataElement.id}} 
-                                            style="width:99%;"/>
+                                            class="form-control"/>
                                     </div>
                                 </div>
                                 <div ng-messages="innerForm.foo.$error" ng-if="interacted(innerForm.foo)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                                         
@@ -385,7 +383,7 @@
 <h4>
     {{'comments'| translate}}
 </h4>
-<textarea rows="3" ng-model="note.value" placeholder="{{'add_your_comment_here'| translate}}" style="width:99%;"></textarea>
+<textarea rows="3" ng-model="note.value" placeholder="{{'add_your_comment_here'| translate}}" class="form-control"></textarea>
 <div ng-if="currentEvent.notes">    
     <table class="listTable dhis2-list-table-striped"> 
         <thead>

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html	2015-06-02 12:25:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-event-capture/views/ec-custom-form.html	2015-06-10 11:58:22 +0000
@@ -4,7 +4,7 @@
             {{'form_id'| translate}}
         </td>
         <td>
-            <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" style="width:99%;">
+            <input type="text" ng-disabled="true" ng-model="currentEvent['uid']" class="form-control">
         </td>
     </tr>
     <tr ng-if="!customForm.hasEventDate">
@@ -23,7 +23,7 @@
                     d2-date-validator
                     name="eventDate" 
                     input-field-id='eventDate' 
-                    style="width:99%;">
+                    class="form-control">
             <div ng-messages="outerForm.eventDate.$error" ng-if="interacted(outerForm.eventDate)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                                         
             </div>
         </td>
@@ -33,12 +33,11 @@
             {{'latitude'| translate}}<span class="pull-right"><a href ng-click="showMap(currentEvent)" title="{{'get_from_map'| translate}}"><i class="fa fa-map-marker fa-2x"></i></a></span>
         <td>
             <input type="number" 
-                   ng-model="currentEvent.coordinate.latitude"   
-                   
+                   ng-model="currentEvent.coordinate.latitude"                    
                    name="latitude"
                    d2-coordinate-validator
                    ng-required="false"
-                   style="width:99%;"/>
+                   class="form-control"/>
             <div ng-messages="outerForm.latitude.$error" ng-if="interacted(outerForm.latitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">                        
             </div>
         </td>                                            
@@ -49,12 +48,11 @@
         </td>
         <td>
             <input type="number" 
-                   ng-model="currentEvent.coordinate.longitude"   
-                   
+                   ng-model="currentEvent.coordinate.longitude"                    
                    name="longitude" 
                    d2-coordinate-validator
                    ng-required="false"
-                   style="width:99%;"/>
+                   class="form-control"/>
             <div ng-messages="outerForm.longitude.$error" ng-if="interacted(outerForm.longitude)" class="required" ng-messages-include="../dhis-web-commons/angular-forms/error-messages.html">
             </div>
         </td>                                                            

=== 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	2015-06-10 11:54:34 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js	2015-06-10 11:58:22 +0000
@@ -203,6 +203,7 @@
                 $scope.eventsByStage[newEvent.programStage].push(newEvent);
                 $scope.currentEvent = newEvent;
                 sortEventsByStage('ADD');
+                $scope.currentEvent = null;
                 $scope.showDataEntry(newEvent, false);
             }            
         }, function () {

=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-06-03 07:12:11 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js	2015-06-10 11:58:22 +0000
@@ -904,10 +904,12 @@
                 if(val){                    
                     if( type === 'number' ){
                         if(dhis2.validation.isNumber(val)){                            
-                            val = new Number(val);
+                            //val = new Number(val);
+                            val = parseInt(val);                            
                         }
                         else{
-                            val = new Number('0');
+                            //val = new Number('0');
+                            val = parseInt('0');      
                         }
                     }
                     if(type === 'date'){