← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10482: Display Properties/DataElements box when to design the form in custom entry form / case entry form.

 

------------------------------------------------------------
revno: 10482
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-04-05 09:48:22 +0700
message:
   Display Properties/DataElements box when to design the form in custom entry form / case entry form.
modified:
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewPatientRegistationForm.js
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.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-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-04-02 08:24:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js	2013-04-05 02:48:22 +0000
@@ -8,6 +8,7 @@
 		title: i18n_dataelement,
 		height: 420,
 		width: 480,
+		position: [$("body").width()- 50, 0],
 		autoOpen: false,
 		zIndex:99999
 	});
@@ -16,6 +17,7 @@
 		title: i18n_dataelement_of_orther_program_stage,
 		height: 460,
 		width:jQuery("#otherProgramStageDataElements [id=dataElementIds]").outerWidth() + 50,
+		position: [$("body").width()- 50, 0],
 		autoOpen: false,
 		zIndex:99999
 	});
@@ -35,6 +37,7 @@
 	$("#deleteButton").button("option", "icons", { primary: "ui-icon-trash" });
 	$("#insertButton").button("option", "icons", { primary: "ui-icon-plusthick" });
 	$("#insertImagesButton").button("option", "icons", { primary: "ui-icon-newwin" });
+	$("#insertImageButton").button("option", "icons", { primary: "ui-icon-plusthick" });
 	$("#loadExistForms").button("option", "icons", { primary: "ui-icon-newwin" });
 	$("#insertDataElements").button("option", "icons", { primary: "ui-icon-newwin" });
 	$("#insertOtherDataElements").button("option", "icons", { primary: "ui-icon-newwin" });
@@ -47,7 +50,13 @@
 	})
 	
 	$("#insertImagesButton").click(function() {
-		$("#imageDialog").dialog();
+		$("#imageDialog").dialog({
+			minWidth: 350,
+			minheight: 263,
+			position: [$("body").width()- 50, 0],
+			zIndex: 10000,
+			resizable: false
+		});
 	});
 });
 

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewPatientRegistationForm.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewPatientRegistationForm.js	2013-02-26 07:29:59 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewPatientRegistationForm.js	2013-04-05 02:48:22 +0000
@@ -9,6 +9,7 @@
 	$("#insertButton").button("option", "icons", { primary: "ui-icon-plusthick" });
 	$("#propertiesButton").button("option", "icons", { primary: "ui-icon-newwin" });
 	$("#insertImagesButton").button("option", "icons", { primary: "ui-icon-newwin" });
+	$("#insertImageButton").button("option", "icons", { primary: "ui-icon-plusthick" });
 	
 	$("#imageDialog").bind("dialogopen", function(event, ui) {
 		$("#insertImagesButton").button("disable");
@@ -18,7 +19,12 @@
 	})
 	
 	$("#insertImagesButton").click(function() {
-		$("#imageDialog").dialog();
+		$("#imageDialog").dialog({
+			overlay:{background:'#000000', opacity:0.1},
+			width:400,
+			height:300,
+			position: [$("body").width()- 50, 0],
+		});
 	});
 });
 	
@@ -34,6 +40,7 @@
 			overlay:{background:'#000000', opacity:0.1},
 			width:500,
 			height:460,
+			position: [$("body").width()- 50, 0],
 			close: function(ev, ui) { 
 				$("#propertiesButton").removeClass("ui-state-active2"); 
 			}

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-04-02 08:24:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm	2013-04-05 02:48:22 +0000
@@ -10,6 +10,7 @@
 
 		jQuery('#designTextarea').ckeditor();
 		jQuery("#designTextarea").ckeditorGet().setData('$encoder.jsEscape( $dataEntryValue, "'" )');
+		openDataElementSelector();
 		
 		checkValueIsExist( "name", "validateDataEntryForm.action", { dataEntryFormId: '$!programStage.dataEntryForm.id' } );
 	});

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm	2013-03-07 05:15:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewPatientRegistationForm.vm	2013-04-05 02:48:22 +0000
@@ -5,9 +5,6 @@
 <link href="../favicon.ico" rel="shortcut icon">
 <link rel="stylesheet" type="text/css" href="http://localhost:8080/dhis/dhis-web-commons/ckeditor/skins/kama/editor.css?t=B8DJ5M3"/>
 
-
-
-
 <script type="text/javascript">
   
 	jQuery(document).ready(	function()
@@ -203,9 +200,11 @@
 				<button type="button" id="fixAttrButton" onclick="fixAttrOnClick()">$i18n.getString( "fixed_attributes" )</button>
 				<button type="button" id="identifierTypeButton" onclick="identifierTypeOnClick()">$i18n.getString( "identifier_types" )</button>
 				<button type="button" id="attributesButton" onclick="attributesOnClick()">$i18n.getString( "attributes" )</button>
+				
 				#if($!program)
 					<button type="button" id="programAttrButton" onclick="programAttrOnClick()">$i18n.getString( "program" )</button>
 				#end
+				
 				&nbsp;&nbsp;<span style="color:#606060">|</span>&nbsp;
 				<button type="button" id="insertButton" onclick="insertElement( 'fixedAttr' )" >$i18n.getString( "insert" )</button>
 			</td>
@@ -242,4 +241,7 @@
 	var i18n_date_of_birth = '$encoder.jsEscape( $i18n.getString( "date_of_birth" ) , "'" )';
 	var i18n_properties = '$encoder.jsEscape( $i18n.getString( "properties" ) , "'" )';
 	var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_registration_form" ) , "'" )';
+	jQuery(document).ready(	function(){
+		openPropertiesSelector();
+	});
 </script>