← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3856: minor fixes to target line

 

------------------------------------------------------------
revno: 3856
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-06-08 11:02:26 +0200
message:
  minor fixes to target line
modified:
  dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.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-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm'
--- dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm	2011-06-07 16:12:23 +0000
+++ dhis-2/dhis-web/dhis-web-reporting/src/main/webapp/dhis-web-reporting/addChartForm.vm	2011-06-08 09:02:26 +0000
@@ -1,15 +1,16 @@
 <script type="text/javascript">
 	jQuery(document).ready(function() {
-		if( jQuery("#targetLine").attr("checked") !== true )
+		if( jQuery("#targetLine").attr("checked") === undefined )
 		{
 			jQuery("#targetLineValue").attr("disabled", "disabled");
 			jQuery("#targetLineLabel").attr("disabled", "disabled");
 		}
 
 		jQuery("#targetLine").change(function() {
-			if(jQuery("#targetLineValue").attr("disabled")) {
+			if( jQuery("#targetLine").attr("checked") !== undefined ) {
 				jQuery("#targetLineValue").removeAttr("disabled");
 				jQuery("#targetLineLabel").removeAttr("disabled");
+				jQuery("#targetLineValue").focus();
 			} else {
 				jQuery("#targetLineValue").attr("disabled", "disabled");
 				jQuery("#targetLineLabel").attr("disabled", "disabled");