← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 15110
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-04-29 20:14:01 +0545
message:
  minor fix
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm


--
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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2014-04-29 14:28:33 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/dhis2/dhis2.period.js	2014-04-29 14:29:01 +0000
@@ -82,8 +82,6 @@
   var $fromEl = $(fromEl);
   var $toEl = $(toEl);
 
-  console.log($fromEl, $toEl);
-
   mergedOptions.onSelect = function( dates ) {
     $fromEl.calendarsPicker("option", "maxDate", dates[0] || null);
     $toEl.calendarsPicker("option", "minDate", dates[0] || null);

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2014-04-22 16:33:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitForm.vm	2014-04-29 14:29:01 +0000
@@ -29,12 +29,13 @@
 
     checkValueIsExistWarning("name", "validateOrganisationUnit.action");
     checkValueIsExist("code", "validateOrganisationUnit.action");
-    datePickerValid('openingDate', false);
 
-		jQuery( "div[id=dynamicAttributesContainer] table tr td:first-child" ).attr( "style", "width: 120px" );
-		jQuery( "div[id=dynamicAttributesContainer] table tr td:last-child *" ).attr( "style", "" );
+    jQuery( "div[id=dynamicAttributesContainer] table tr td:first-child" ).attr( "style", "width: 120px" );
+    jQuery( "div[id=dynamicAttributesContainer] table tr td:last-child *" ).attr( "style", "" );
 
     jQuery("#name").focus();
+
+    dhis2.period.picker.createInstance('#openingDate');
 	});
 </script>
 
@@ -90,7 +91,7 @@
     <tr>
         <td><label for="url">$i18n.getString( "url" )</label></td>
         <td><input type="text" id="url" name="url"></td>
-    </tr>	
+    </tr>
 </table>
 
 #tblDynamicAttributes( { "attributes": $attributes } )
@@ -118,7 +119,7 @@
     <tr>
         <td><label for="phoneNumber">$i18n.getString( "phone_number" )</label></td>
         <td><input type="text" id="phoneNumber" name="phoneNumber"></td>
-    </tr>	
+    </tr>
 
 	<tr>
 		<td style="height:15px" colspan="2">
@@ -159,7 +160,7 @@
     </tr>
 	#foreach ( $groupSet in $groupSets )
     <tr>
-		<td><label>$encoder.htmlEncode( $groupSet.name )</label></td>			
+		<td><label>$encoder.htmlEncode( $groupSet.name )</label></td>
 		<td>
 			<select id="selectedGroups" name="selectedGroups">
 				<option value="-1">[ $i18n.getString( "select_group" ) ]</option>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2014-04-22 16:33:23 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/updateOrganisationUnitForm.vm	2014-04-29 14:29:01 +0000
@@ -15,14 +15,10 @@
         checkValueIsExistWarning( "name", "validateOrganisationUnit.action", { id : $organisationUnit.id } );
         checkValueIsExist( "code", "validateOrganisationUnit.action", { id : $organisationUnit.id } );
 
-		#if ( $numberOfChildren == 0 )
-		datePickerInRange( 'openingDate', 'closedDate', false, false );
-		#else
-		datePickerValid( 'openingDate', false );
-		#end
+      dhis2.period.picker.createRangedInstance('#openingDate', '#closedDate');
 
-		jQuery( "div[id=dynamicAttributesContainer] table tr td:first-child" ).attr( "style", "width: 120px" );
-		jQuery( "div[id=dynamicAttributesContainer] table tr td:last-child *" ).attr( "style", "" );
+      jQuery( "div[id=dynamicAttributesContainer] table tr td:first-child" ).attr( "style", "width: 120px" );
+      jQuery( "div[id=dynamicAttributesContainer] table tr td:last-child *" ).attr( "style", "" );
 	});
 	
 	var previousName = '$encoder.jsEscape( $organisationUnit.name, "'" )';
@@ -62,12 +58,10 @@
 		<td><input type="text" id="openingDate" name="openingDate" value="$!format.formatDate( $organisationUnit.openingDate )"></td>
 		<td></td>
 	</tr>
-	#if( $numberOfChildren == 0 )
 	<tr>
 		<td><label for="closedDate">$i18n.getString( "closed_date" )</label></td>
 		<td><input type="text" id="closedDate" name="closedDate" value="$!format.formatDate( $organisationUnit.closedDate )"></td>
 	</tr>
-	#end
 	<tr>
 		<td><label for="active">$i18n.getString( "registers_data" )</label></td>
 		<td>