← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5872: Option name should be removed after clicking Add option button; add option for none in Add Data e...

 

------------------------------------------------------------
revno: 5872
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-02-07 10:20:10 +0700
message:
  Option name should be removed after clicking Add option button; add option for none in Add Data element form;  (default) is removed from data element names in case-entry form.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/optionSet.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.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-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm	2012-02-06 02:56:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/addOptionSetForm.vm	2012-02-07 03:20:10 +0000
@@ -33,12 +33,12 @@
 	</tr>
 	<tr>
 	  <td><label>$i18n.getString( "option" )</label></td>
-	  <td colspan="3"><input type="text" id="option" name="option" style="width:25em"/></td>
+	  <td colspan="3"><input type="text" id="option" name="option" style="width:25em" /></td>
     </tr>
     <tr>
       <td></td>
       <td colspan="3">
-      	<input type="button" value="$i18n.getString( 'add_option' )" onclick="addOption()" style="width:200px"/>
+      	<input type="button" value="$i18n.getString( 'add_option' )" onclick="addOption();" style="width:200px"/>
       </td>
     </tr>
     <tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/optionSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/optionSet.js	2012-02-06 02:56:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/optionSet.js	2012-02-07 03:20:10 +0000
@@ -41,4 +41,7 @@
 	{
 		addOptionById( 'options', value, value );
 	}
+	
+	setFieldValue('option', '');
+	$("#option").focus();
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm	2012-02-06 02:56:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/updateOptionSetForm.vm	2012-02-07 03:20:10 +0000
@@ -32,12 +32,12 @@
 	</tr>
 	<tr>
 	  <td><label>$i18n.getString( "option" )</label></td>
-	  <td><input type="text" id="option" name="option" style="width:25em"/></td>
+	  <td><input type="text" id="option" name="option" style="width:25em" /></td>
     </tr>
     <tr>
       <td></td>
       <td colspan="2">
-      	<input type="button" value="$i18n.getString( 'add_option' )" onclick="addOption()" style="width:200px"/>
+      	<input type="button" value="$i18n.getString( 'add_option' )" onclick="addOption();" style="width:200px"/>
       </td>
     </tr>
     <tr>

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm	2012-02-06 02:56:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementForm.vm	2012-02-07 03:20:10 +0000
@@ -134,6 +134,7 @@
 		<td>$i18n.getString( 'option_set' )</td>			
 		<td>
 			<select id="selectedOptionSetId" name="selectedOptionSetId" style="min-width: 244px;">
+				<option value="0">[$i18n.getString('please_select')]</option>
 				#foreach ( $optionSet in $optionSets )
 				<option value="$optionSet.id">$optionSet.name</option>
 				#end