← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1940: Minor fixed.

 

------------------------------------------------------------
revno: 1940
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-08-19 17:26:15 +0700
message:
  Minor fixed.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/shortName.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-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2010-08-17 07:26:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/resources/struts.xml	2010-08-19 10:26:15 +0000
@@ -170,7 +170,7 @@
       class="org.hisp.dhis.dataset.action.PeriodTypeListAction">
       <result name="success" type="velocity">/main.vm</result>
       <param name="page">/dhis-web-maintenance-dataset/editDataSet.vm</param>
-      <param name="javascripts">javascript/dataSet.js</param>
+      <param name="javascripts">javascript/shortName.js,javascript/dataSet.js</param>
       <param name="requiredAuthorities">F_DATASET_UPDATE</param>
     </action>
     

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm	2010-08-17 07:26:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/addDataSet.vm	2010-08-19 10:26:15 +0000
@@ -1,7 +1,10 @@
 <script>
 	jQuery(document).ready(	function(){
-			validation( 'addDataSetForm', validateAddDataSet );				
+			validation( 'addDataSetForm', validateAddDataSet );
 	});
+	
+	var previousName = '';
+
 </script>
 
 <h3>$i18n.getString( "add_dataset" )</h3>
@@ -108,6 +111,3 @@
 </form>
 
 <span id="message"></span>
-<script>
-	
-</script>
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm	2010-08-17 07:26:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm	2010-08-19 10:26:15 +0000
@@ -1,7 +1,10 @@
 <script>
 	jQuery(document).ready(	function(){
-			validation( 'editDataSetForm', validateEditDataSet );				
+			validation( 'editDataSetForm', validateEditDataSet );
 	});
+	
+	var previousName = '';
+	
 </script>
 
 <h3>$i18n.getString( "edit_dataset" )</h3>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/shortName.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/shortName.js	2009-12-03 07:59:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/shortName.js	2010-08-19 10:26:15 +0000
@@ -9,13 +9,15 @@
     var shortNameField = document.getElementById( 'shortName' );
     var maxLength = parseInt( shortNameField.maxLength );
     
-    if ( previousName != nameField.value
-        && nameField.value.length <= maxLength
-        && ( shortNameField.value == previousName
-          || shortNameField.value.length == 0 ))
-    {
-            shortNameField.value = nameField.value;
+	if ( nameField.value.length >= 20 )
+	{
+		//if ( (previousName != nameField.value) 
+		//&& (nameField.value.length <= maxLength) 
+		//&& ( shortNameField.value == previousName 
+		//|| shortNameField.value.length == 0 ) )
+		//{}
+		
+		shortNameField.value = nameField.value;
     }
-    
     previousName = nameField.value;
 }