← Back to team overview

dhis2-devs team mailing list archive

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

 

------------------------------------------------------------
revno: 3578
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-05-11 14:54:08 +0200
message:
  minor fix
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.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-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-11 12:12:30 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js	2011-05-11 12:54:08 +0000
@@ -71,10 +71,9 @@
 
 function insertIndicator() {
 	var oEditor = $("#designTextarea").ckeditorGet();
-	var $option = $("#indicatorSelector option:selected").first();
+	var $option = $("#indicatorSelector option:selected");
 
-	if( $option !== undefined )
-	{
+	if( $option.length !== 0 ) {
 		var id = $option.data("id");
 		var title = $option.val();
 		var template = '<input id="indicator' + id + '" value="[ ' + title + ' ]" title="' + title + '" name="indicator" indicatorid="' + id + '" style="width:10em;text-align:center;" readonly="readonly" />';
@@ -91,10 +90,9 @@
 
 function insertDataElement() {
 	var oEditor = $("#designTextarea").ckeditorGet();
-	var $option = $("#dataElementSelector option:selected").first();
+	var $option = $("#dataElementSelector option:selected");
 
-	if( $option !== undefined )
-	{
+	if( $option.length !== 0 ) {
 		var dataElementId = $option.data("dataelement-id");
 		var dataElementName = $option.data("dataelement-name");
 		var dataElementType = $option.data("dataelement-type");

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-11 08:58:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm	2011-05-11 12:54:08 +0000
@@ -13,7 +13,7 @@
 		jQuery("#designTextarea").ckeditorGet().setData('$encoder.jsEscape( $dataEntryValue, "'" )');
 
 		jQuery("#selectionDialog").dialog({
-			minWidth: 460,
+			minWidth: 560,
 			minHeight: 250,
 			position: [900, 60]
 		});
@@ -228,9 +228,7 @@
 					<button type="button" id="indicatorsButton">Indicators</button>&nbsp;&nbsp;<span style="color:#606060">|</span>&nbsp;
 					<button type="button" id="insertButton">Insert</button>
 				</td>
-				<td>
-					<span id="message_"></span>
-				</td>
+				<td><span id="message_"></span></td>
 			</tr>
 		</table>		
 	</div>