← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 2366
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2010-12-14 10:45:27 +0700
message:
  Minor fixed
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.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-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2010-12-13 07:15:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/commons.js	2010-12-14 03:45:27 +0000
@@ -375,7 +375,7 @@
  */
 function getFieldValue( fieldId )
 {
-	if ( getTypeById( fieldId ) == 'select-multiple' )
+	if ( getTypeById( fieldId, 'multiple' ) )
 	{
 		return jQuery("#" + fieldId).val()[0];
 	}
@@ -389,9 +389,9 @@
  * @param fieldId the identifier of the element.
  * @return the type of the element with the given identifier.
  */
-function getTypeById( fieldId )
+function getTypeById( fieldId, attribute )
 {
-	return byId(fieldId).type;	
+	return jQuery("#" + fieldId).attr( attribute );
 }
 
 /**