dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12142
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3658: Reverted r 3644
------------------------------------------------------------
revno: 3658
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-05-19 10:14:24 +0200
message:
Reverted r 3644
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroupList.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientIdentifierType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipTypeList.vm
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.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/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-05-19 08:13:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/struts.xml 2011-05-19 08:14:24 +0000
@@ -22,19 +22,14 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/relationshipType.vm</param>
<param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
- <param name="javascripts">javascript/commons.js,javascript/relationship.js</param>
- </action>
-
- <action name="relationshipTypeList"
- class="org.hisp.dhis.patient.action.relationship.GetRelationshipTypeListAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-maintenance-patient/relationshipTypeList.vm</param>
+ <param name="javascripts">javascript/relationship.js</param>
</action>
<action name="getRelationshipType"
class="org.hisp.dhis.patient.action.relationship.GetRelationshipTypeAction">
<result name="success" type="velocity-xml">
/dhis-web-maintenance-patient/responseRelationshipType.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="removeRelationshipType"
@@ -46,28 +41,32 @@
<action name="addRelationshipType"
class="org.hisp.dhis.patient.action.relationship.AddRelationshipTypeAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">relationshipType.action
+ </result>
<param name="requiredAuthorities">F_RELATIONSHIPTYPE_ADD</param>
</action>
<action name="showAddRelationshipTypeForm" class="org.hisp.dhis.patient.action.NoAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/addRelationshipTypeForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/relationship.js</param>
<param name="requiredAuthorities">F_RELATIONSHIPTYPE_ADD</param>
</action>
<action name="showUpdateRelationshipTypeForm"
class="org.hisp.dhis.patient.action.relationship.GetRelationshipTypeAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/relationship.js</param>
<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
</action>
<action name="updateRelationshipType"
class="org.hisp.dhis.patient.action.relationship.UpdateRelationshipTypeAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">relationshipType.action
+ </result>
<param name="requiredAuthorities">F_RELATIONSHIPTYPE_UPDATE</param>
</action>
@@ -816,13 +815,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/patientAttributeGroup.vm</param>
<param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
- <param name="javascripts">javascript/commons.js,javascript/patientAttributeGroup.js</param>
- </action>
-
- <action name="patientAttributeGroupList"
- class="org.hisp.dhis.patient.action.patientattributegroup.GetPatientAttributeGroupListAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">/dhis-web-maintenance-patient/patientAttributeGroupList.vm</param>
+ <param name="javascripts">javascript/patientAttributeGroup.js</param>
</action>
<action name="getPatientAttributeGroup"
@@ -830,6 +823,7 @@
<result name="success" type="velocity-xml">
/dhis-web-maintenance-patient/responsePatientAttributeGroup.vm
</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="removePatientAttributeGroup"
@@ -841,29 +835,34 @@
<action name="addPatientAttributeGroup"
class="org.hisp.dhis.patient.action.patientattributegroup.AddPatientAttributeGroupAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">patientAttributeGroup.action
+ </result>
<param name="requiredAuthorities">F_PATIENTATTRIBUTE_ADD</param>
</action>
<action name="showAddPatientAttributeGroupForm"
class="org.hisp.dhis.patient.action.patientattribute.GetPatientAttributesWithdoutGroupAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientAttributeGroup.js</param>
+ <param name="stylesheets">style/basic.css</param>
<param name="requiredAuthorities">F_PATIENTATTRIBUTE_ADD</param>
</action>
<action name="showUpdatePatientAttributeGroupForm"
class="org.hisp.dhis.patient.action.patientattributegroup.GetPatientAttributeGroupAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientAttributeGroup.js</param>
<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
</action>
<action name="updatePatientAttributeGroup"
class="org.hisp.dhis.patient.action.patientattributegroup.UpdatePatientAttributeGroupAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">patientAttributeGroup.action
+ </result>
<param name="requiredAuthorities">F_PATIENTATTRIBUTE_UPDATE</param>
</action>
@@ -877,29 +876,14 @@
/dhis-web-commons/ajax/jsonResponseInput.vm</result>
<param name="onExceptionReturn">plainTextError</param>
</action>
-
<!-- Patient Identifier Type -->
- <action name="patientIdentifierType"
- class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeListAction">
- <result name="success" type="velocity">/main.vm</result>
- <param name="page">
- /dhis-web-maintenance-patient/patientIdentifierType.vm</param>
- <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
- <param name="javascripts">javascript/commons.js,javascript/patientIdentifierType.js</param>
- </action>
-
- <action name="patientIdentifierTypeList"
- class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeListAction">
- <result name="success" type="velocity">/content.vm</result>
- <param name="page">
- /dhis-web-maintenance-patient/listPatientIdentifierType.vm</param>
- </action>
-
<action name="showAddPatientIdentifierTypeForm" class="org.hisp.dhis.patient.action.NoAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">
/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientIdentifierType.js</param>
<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_ADD</param>
</action>
@@ -916,17 +900,29 @@
<action name="showUpdatePatientIdentifierTypeForm"
class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeAction">
- <result name="success" type="velocity">/content.vm</result>
+ <result name="success" type="velocity">/main.vm</result>
<param name="page">
/dhis-web-maintenance-patient/updatePatientIdentifierType.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientIdentifierType.js</param>
<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_UPDATE</param>
</action>
+ <action name="patientIdentifierType"
+ class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeListAction">
+ <result name="success" type="velocity">/main.vm</result>
+ <param name="page">
+ /dhis-web-maintenance-patient/listPatientIdentifierType.vm</param>
+ <param name="menu">/dhis-web-maintenance-patient/patientAndProgramMenu.vm</param>
+ <param name="javascripts">javascript/patientIdentifierType.js</param>
+ </action>
+
<action name="getPatientIdentifierType"
class="org.hisp.dhis.patient.action.patientidentifiertype.GetPatientIdentifierTypeAction">
<result name="success" type="velocity-xml">
/dhis-web-maintenance-patient/responsePatientIdentifierType.vm
</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="removePatientIdentifierType"
@@ -940,15 +936,15 @@
<action name="addPatientIdentifierType"
class="org.hisp.dhis.patient.action.patientidentifiertype.AddPatientIdentifierTypeAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">patientIdentifierType.action
+ </result>
<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_ADD</param>
</action>
<action name="updatePatientIdentifierType"
class="org.hisp.dhis.patient.action.patientidentifiertype.UpdatePatientIdentifierTypeAction">
- <result name="success" type="velocity-json">
- /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="success" type="redirect">patientIdentifierType.action
+ </result>
<param name="requiredAuthorities">F_PATIENTIDENTIFIERTYPE_UPDATE</param>
</action>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeGroupForm.vm 2011-05-19 08:14:24 +0000
@@ -1,10 +1,12 @@
<script>
- jQuery("#addPatientAttributeGroupForm").ready( function(){
+ var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
+
+ jQuery(document).ready( function(){
jQuery('name').focus();
validation( 'addPatientAttributeGroupForm', function(form){
- addPatientAttributeGroup();
+ form.submit();
}, function()
{
beforeSubmit();
@@ -13,10 +15,7 @@
checkValueIsExist( "name", "validatePatientAttributeGroup.action");
});
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
+
<h3>$i18n.getString( "add_new_patient_attribute_group" )</h3>
<div id="tooltip"></div>
<form id="addPatientAttributeGroupForm" action="addPatientAttributeGroup.action" method="post" >
@@ -77,6 +76,7 @@
<p>
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='patientAttributeGroup.action'" style="width:10em"/>
</p>
</form>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2011-05-19 08:14:24 +0000
@@ -4,19 +4,16 @@
jQuery('name').focus();
validation( 'addPatientIdentifierTypeForm', function(form){
- addPatientIdentifierType();
+ form.submit();
});
checkValueIsExist( "name", "validatePatientIdentifierType.action");
});
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
<h3>$i18n.getString( "add_new_patient_identifier_type" )</h3>
-
+
<form id="addPatientIdentifierTypeForm" name="addPatientIdentifierTypeForm" action="addPatientIdentifierType.action" method="post" >
<table>
@@ -85,6 +82,7 @@
<td></td>
<td>
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='program.action'" style="width:10em"/>
</td>
</tr>
</table>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addRelationshipTypeForm.vm 2011-05-19 08:14:24 +0000
@@ -9,9 +9,6 @@
});
</script>
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
<h3>$i18n.getString( "add_new_relationship_type" )</h3>
<form id="addRelationshipTypeForm" name="addRelationshipTypeForm" action="addRelationshipType.action" method="post">
@@ -36,6 +33,7 @@
<p>
<input type="submit" value="$i18n.getString( 'add' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='relationshipType.action'" style="width:10em"/>
</p>
</form>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js 2011-05-19 08:12:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/commons.js 2011-05-19 08:14:24 +0000
@@ -101,20 +101,10 @@
if( $(this).attr('type') != 'button' )
{
var elementId = $(this).attr('id');
-
- if( jQuery(this).context.multiple )
- {
- for ( var i in jQuery(this).val() )
- {
- params += elementId + "="+ jQuery(this).val()[i] + "&";
- }
- }else
- {
- params += elementId + "="+ jQuery(this).val() + "&";
- }
+ params += elementId + "="+ jQuery(this).val() + "&";
}
});
-
+
return params;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2011-05-19 08:14:24 +0000
@@ -151,6 +151,7 @@
showById('editPatientAttributeForm');
jQuery('#loaderDiv').hide();
});
+
}
function updatePatientAttribute()
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttributeGroup.js 2011-05-19 08:14:24 +0000
@@ -39,6 +39,10 @@
removeItem( patientAttributeGroupId, name, i18n_confirm_delete, 'removePatientAttributeGroup.action' );
}
+// -----------------------------------------------------------------------------
+// Show and Hide tooltip
+// -----------------------------------------------------------------------------
+
function patientAttributeGroupAssociation(){
selectAllById('selectedAttributeGroups');
var form = document.getElementById( 'patientAttributeGroupAssociationForm' );
@@ -46,92 +50,6 @@
}
// -----------------------------------------------------------------------------
-// Add Attribute-Group
-// -----------------------------------------------------------------------------
-
-function showAddPatientAttributeGroupForm( )
-{
- hideById('attributeGroupList');
- jQuery('#loaderDiv').show();
- jQuery('#editAttributeGroupForm').load('showAddPatientAttributeGroupForm.action',
- {
- }, function()
- {
- showById('editAttributeGroupForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function addPatientAttributeGroup()
-{
- $.ajax({
- type: "POST",
- url: 'addPatientAttributeGroup.action',
- data: getParamsForDiv('addPatientAttributeGroupForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// -----------------------------------------------------------------------------
-// Update Attribute-Group
-// -----------------------------------------------------------------------------
-
-function showUpdatePatientAttributeGroupForm( attributeId )
-{
- hideById('attributeGroupList');
- jQuery('#loaderDiv').show();
- jQuery('#editAttributeGroupForm').load('showUpdatePatientAttributeGroupForm.action',
- {
- id:attributeId
- }, function()
- {
- showById('editAttributeGroupForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function updatePatientAttributeGroup()
-{
- $.ajax({
- type: "POST",
- url: 'updatePatientAttributeGroup.action',
- data: getParamsForDiv('updatePatientAttributeGroupForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// ------------------------------------------------------------------
-// Click Back button
-// ------------------------------------------------------------------
-
-function onClickBackBtn()
-{
- hideById('editAttributeGroupForm');
- jQuery('#loaderDiv').show();
- jQuery('#attributeGroupList').load('patientAttributeGroupList.action',
- {
- }, function()
- {
- showById('attributeGroupList');
- jQuery('#loaderDiv').hide();
- });
-}
-
-// -----------------------------------------------------------------------------
// Show and Hide tooltip
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2011-05-19 08:14:24 +0000
@@ -26,91 +26,4 @@
function removePatientIdentifierType( patientIdentifierTypeId, name )
{
removeItem( patientIdentifierTypeId, name, i18n_confirm_delete, 'removePatientIdentifierType.action' );
-}
-
-// -----------------------------------------------------------------------------
-// Add Patient Identifier Type
-// -----------------------------------------------------------------------------
-
-function showAddPatientIdentifierTypeForm( )
-{
- hideById('identifierTypeList');
- jQuery('#loaderDiv').show();
- jQuery('#editIdentifierTypeForm').load('showAddPatientIdentifierTypeForm.action',
- {
- }, function()
- {
- showById('editIdentifierTypeForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function addPatientIdentifierType()
-{
- $.ajax({
- type: "POST",
- url: 'addPatientIdentifierType.action',
- data: getParamsForDiv('addPatientIdentifierTypeForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// -----------------------------------------------------------------------------
-// Update Patient Identifier Type
-// -----------------------------------------------------------------------------
-
-function showUpdatePatientIdentifierTypeForm( identifierTypeId )
-{
- hideById('identifierTypeList');
- jQuery('#loaderDiv').show();
- jQuery('#editIdentifierTypeForm').load('showUpdatePatientIdentifierTypeForm.action',
- {
- id:identifierTypeId
- }, function()
- {
- showById('editIdentifierTypeForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-function updatePatientIdentifierType()
-{
- $.ajax({
- type: "POST",
- url: 'updatePatientIdentifierType.action',
- data: getParamsForDiv('updatePatientIdentifierTypeForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// ------------------------------------------------------------------
-// Click Back button
-// ------------------------------------------------------------------
-
-function onClickBackBtn()
-{
- hideById('editIdentifierTypeForm');
- jQuery('#loaderDiv').show();
- jQuery('#identifierTypeList').load('patientIdentifierTypeList.action',
- {
- }, function()
- {
- showById('identifierTypeList');
- jQuery('#loaderDiv').hide();
- });
-}
-
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/relationship.js 2011-05-19 08:14:24 +0000
@@ -21,6 +21,87 @@
}
// -----------------------------------------------------------------------------
+// Add RelationshipType
+// -----------------------------------------------------------------------------
+
+function validateAddRelationshipType()
+{
+ $.postJSON(
+ 'validateRelationshipType.action',
+ {
+ "aIsToB": getFieldValue( 'aIsToB' ),
+ "bIsToA": getFieldValue( 'bIsToA' )
+ },
+ function( json )
+ {
+ if ( json.response == "success" )
+ {
+ var form = document.getElementById( 'addRelationshipTypeForm' );
+ form.submit();
+ }else if ( json.response == "input" )
+ {
+ setHeaderMessage( json.message );
+ }
+ else if ( json.response == "error" )
+ {
+ setHeaderMessage( "i18n_adding_patient_atttibute_failed + ':' + '\n'" +json.message );
+ }
+ }
+ );
+}
+
+// -----------------------------------------------------------------------------
+// Update RelationshipType
+// -----------------------------------------------------------------------------
+
+function validateUpdateRelationshipType()
+{
+ $.postJSON(
+ 'validateRelationshipType.action',
+ {
+ "id": getFieldValue( 'id' ),
+ "aIsToB": getFieldValue( 'aIsToB' ),
+ "bIsToA": getFieldValue( 'bIsToA' )
+ },
+ function( json )
+ {
+ if ( json.response == "success" )
+ {
+ var form = document.getElementById( 'updateRelationshipTypeForm' );
+ form.submit();
+ }else if ( json.response == "input" )
+ {
+ setHeaderMessage( json.message );
+ }
+ else if ( json.response == "error" )
+ {
+ setHeaderMessage( "i18n_adding_patient_atttibute_failed + ':' + '\n'" +json.message );
+ }
+ }
+ );
+}
+
+function updateValidationCompleted( messageElement )
+{
+ var type = messageElement.getAttribute( 'type' );
+ var message = messageElement.firstChild.nodeValue;
+
+ if( type == 'success' )
+ {
+ var form = document.getElementById( 'updateRelationshipTypeForm' );
+ form.submit();
+ }
+ else if( type == 'error' )
+ {
+ window.alert( i18n_saving_program_failed + ':' + '\n' + message );
+ }
+ else if( type == 'input' )
+ {
+ setHeaderMessage( message );
+ }
+}
+
+// -----------------------------------------------------------------------------
// Remove RelationshipType
// -----------------------------------------------------------------------------
@@ -186,6 +267,38 @@
}
}
+
+/*function removeRelationship( relationshipId, patientA, aIsToB, patientB )
+{
+
+ var result = window.confirm( i18n_confirm_delete_relationship + '\n\n' + patientA + ' is ' + aIsToB + ' to ' + patientB );
+
+ if( result )
+ {
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( removeRelationshipCompleted );
+ request.send( 'removeRelationship.action?relationshipId=' + relationshipId );
+ }
+}
+
+function removeRelationshipCompleted( messageElement )
+{
+ var type = messageElement.getAttribute( 'type' );
+ var message = messageElement.firstChild.nodeValue;
+
+ if( type == 'success' )
+ {
+ window.location = "getRelationshipList.action";
+ }
+ else if( type = 'error' )
+ {
+ setInnerHTML( 'warningField', message );
+
+ showWarning();
+ }
+}*/
+
//------------------------------------------------------------------------------
// Relationship partner
//------------------------------------------------------------------------------
@@ -326,144 +439,3 @@
setHeaderMessage( message );
}
}
-
-// -----------------------------------------------------------------------------
-// Add Relationship Type
-// -----------------------------------------------------------------------------
-
-function showAddRelationshipTypeForm()
-{
- hideById('relationshipTypeList');
- jQuery('#loaderDiv').show();
- jQuery('#editRelationshipTypeForm').load('showAddRelationshipTypeForm.action',
- {
- }, function()
- {
- showById('editRelationshipTypeForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-
-function validateAddRelationshipType()
-{
- $.postJSON(
- 'validateRelationshipType.action',
- {
- "aIsToB": getFieldValue( 'aIsToB' ),
- "bIsToA": getFieldValue( 'bIsToA' )
- },
- function( json )
- {
- if ( json.response == "success" )
- {
- addRelationshipType();
- }else if ( json.response == "input" )
- {
- setHeaderMessage( json.message );
- }
- else if ( json.response == "error" )
- {
- setHeaderMessage( "i18n_adding_patient_atttibute_failed + ':' + '\n'" +json.message );
- }
- }
- );
-}
-
-function addRelationshipType()
-{
- $.ajax({
- type: "POST",
- url: 'addRelationshipType.action',
- data: getParamsForDiv('addRelationshipTypeForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// -----------------------------------------------------------------------------
-// Update Relationship Type
-// -----------------------------------------------------------------------------
-
-function showUpdateRelationshipTypeForm( relationshipTypeId )
-{
- hideById('relationshipTypeList');
- jQuery('#loaderDiv').show();
- jQuery('#editRelationshipTypeForm').load('showUpdateRelationshipTypeForm.action',
- {
- id:relationshipTypeId
- }, function()
- {
- showById('editRelationshipTypeForm');
- jQuery('#loaderDiv').hide();
- });
-}
-
-
-function validateUpdateRelationshipType()
-{
- $.postJSON(
- 'validateRelationshipType.action',
- {
- "id": getFieldValue( 'id' ),
- "aIsToB": getFieldValue( 'aIsToB' ),
- "bIsToA": getFieldValue( 'bIsToA' )
- },
- function( json )
- {
- if ( json.response == "success" )
- {
- updatePatientIdentifierType();
- }else if ( json.response == "input" )
- {
- setMessage( json.message );
- }
- else if ( json.response == "error" )
- {
- setMessage( "i18n_adding_patient_atttibute_failed + ':' + '\n'" +json.message );
- }
- }
- );
-}
-
-function updatePatientIdentifierType()
-{
- $.ajax({
- type: "POST",
- url: 'updateRelationshipType.action',
- data: getParamsForDiv('updateRelationshipTypeForm'),
- success: function( json ) {
- if( json.response == 'success')
- {
- onClickBackBtn();
- }
- }
- });
-
- return false;
-}
-
-// ------------------------------------------------------------------
-// Click Back button
-// ------------------------------------------------------------------
-
-function onClickBackBtn()
-{
- hideById('editRelationshipTypeForm');
- jQuery('#loaderDiv').show();
- jQuery('#relationshipTypeList').load('relationshipTypeList.action',
- {
- }, function()
- {
- showById('relationshipTypeList');
- jQuery('#loaderDiv').hide();
- });
-}
-
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/listPatientIdentifierType.vm 2011-05-19 08:14:24 +0000
@@ -9,37 +9,36 @@
<col>
<col width="20">
<col width="20">
+ <col width="20">
<col width="20">
<tr>
<td></td>
- <td colspan="4" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:showAddPatientIdentifierTypeForm();" style="width:70px"></td>
+ <td colspan="5" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientIdentifierTypeForm.action'" style="width:70px"></td>
</tr>
<tr>
<th>$i18n.getString( "name" )</th>
- <th colspan="4">$i18n.getString( "operations" )</th>
+ <th colspan="5">$i18n.getString( "operations" )</th>
</tr>
<tbody id="list">
- #set( $mark = false )
#foreach( $identifierType in $identifierTypes )
- <tr id="tr${identifierType.id}" #alternate( $mark ) >
+ <tr id="tr${identifierType.id}">
<td>$encoder.htmlEncode( $identifierType.name )</td>
- <td style="text-align:center">
- <a href="javascript:showUpdatePatientIdentifierTypeForm('$identifierType.id');" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="showUpdatePatientIdentifierTypeForm.action?id=$identifierType.id" title="$i18n.getString( 'edit' )"><img src="../images/edit.png" alt="$i18n.getString( 'edit' )"></a>
</td>
- <td style="text-align:center">
+ <td style="text-align:center"#alternate( $mark )>
<a href="javascript:removePatientIdentifierType( '$identifierType.id', '$encoder.jsEncode( $identifierType.name )' )" title="$i18n.getString( 'remove' )"><img src="../images/delete.png" alt="$i18n.getString( 'remove' )"></a>
</td>
- <td style="text-align:center">
+ <td style="text-align:center"#alternate( $mark )>
<a href="javascript:showPatientIdentifierTypeDetails( $identifierType.id )" title="$i18n.getString( 'show_details' )"><img src="../images/information.png" alt="$i18n.getString( 'show_details' )"></a>
</td>
</tr>
- #set( $mark = !$mark)
#end
</tbody>
@@ -59,3 +58,10 @@
</td>
</tr>
</table>
+
+<script type="text/javascript">
+ var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patientIdentifierType" ) , "'" )';
+ var i18n_adding_program_failed = '$encoder.jsEscape( $i18n.getString( "adding_patientIdentifierType_failed" ), "'")';
+ var i18n_updating_program_failed = '$encoder.jsEscape( $i18n.getString( "updating_patientIdentifierType_failed" ), "'")';
+ var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2011-05-19 08:14:24 +0000
@@ -5,6 +5,8 @@
#parse( "/dhis-web-commons/loader/loader.vm" )
<div id='editPatientAttributeForm'></div>
+<p></p>
+<span id='message' style='display:none;' onclick="hideById(this.id)"> $i18n.getString( "save_success" )</span>
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_attribute" ) , "'" )';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroup.vm 2011-05-19 08:14:24 +0000
@@ -1,11 +1,64 @@
-<div id='attributeGroupList'>
- #parse( "/dhis-web-maintenance-patient/patientAttributeGroupList.vm" )
-</div>
-
-#parse( "/dhis-web-commons/loader/loader.vm" )
-
-<div id='editAttributeGroupForm'></div>
-<p></p>
+
+<h3>$i18n.getString( "patient_attribute_group_management" )</h3>
+
+<table class="mainPageTable">
+ <tr>
+ <td style="vertical-align:top">
+
+ <table class="listTable">
+ <col>
+ <col width="20">
+ <col width="20">
+ <col width="20">
+ <tr>
+ <td></td>
+ <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddPatientAttributeGroupForm.action'" style="width:70px"></td>
+ </tr>
+ <tr>
+ <th>$i18n.getString( "attribute_name" )</th>
+ <th colspan="3">$i18n.getString( "operations" )</th>
+ </tr>
+
+ <tbody id="list">
+ #foreach( $patientAttributeGroup in $patientAttributeGroups )
+ <tr id="tr${patientAttributeGroup.id}">
+
+ <td>$encoder.htmlEncode( $patientAttributeGroup.name )</td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="showUpdatePatientAttributeGroupForm.action?id=$patientAttributeGroup.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
+ </td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="javascript:removePatientAttributeGroup( '$patientAttributeGroup.id', '$encoder.jsEncode( $patientAttributeGroup.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
+ </td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="javascript:showPatientAttributeGroupDetails( $patientAttributeGroup.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ </td>
+
+ </tr>
+ #end
+
+ </tbody>
+
+ </table>
+ </td>
+ <td style="width:20em; padding-left:2em; vertical-align:top">
+
+ <div id="detailsArea" style="display:none">
+ <div style="float:right">
+ <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ </div>
+ <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
+ <p><label>$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
+ <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
+ <p><label>$i18n.getString( "number_of_attribute" ):</label><br><span id="noAttributeField"></span></p>
+ </div>
+
+ </td>
+ </tr>
+</table>
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patient_attribute" ) , "'" )';
@@ -18,5 +71,4 @@
var i18n_yes_no = '$encoder.jsEscape( $i18n.getString( "yes_no" ) , "'")';
var i18n_text = '$encoder.jsEscape( $i18n.getString( "text" ) , "'")';
var i18n_date = '$encoder.jsEscape( $i18n.getString( "date" ) , "'")';
- var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
</script>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroupList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroupList.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttributeGroupList.vm 1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-
-<h3>$i18n.getString( "patient_attribute_group_management" )</h3>
-
-<table class="mainPageTable">
- <tr>
- <td style="vertical-align:top">
-
- <table class="listTable">
- <col>
- <col width="20">
- <col width="20">
- <col width="20">
- <tr>
- <td></td>
- <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="javascript: showAddPatientAttributeGroupForm();" style="width:70px"></td>
- </tr>
- <tr>
- <th>$i18n.getString( "attribute_name" )</th>
- <th colspan="3">$i18n.getString( "operations" )</th>
- </tr>
-
- <tbody id="list">
- #set( $mark = false )
- #foreach( $patientAttributeGroup in $patientAttributeGroups )
- <tr id="tr${patientAttributeGroup.id}" #alternate( $mark )>
-
- <td>$encoder.htmlEncode( $patientAttributeGroup.name )</td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showUpdatePatientAttributeGroupForm('$patientAttributeGroup.id')" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
- </td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:removePatientAttributeGroup( '$patientAttributeGroup.id', '$encoder.jsEncode( $patientAttributeGroup.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
- </td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showPatientAttributeGroupDetails( $patientAttributeGroup.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
- </td>
-
- </tr>
- #set( $mark = !$mark)
- #end
-
- </tbody>
-
- </table>
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
-
- <div id="detailsArea" style="display:none">
- <div style="float:right">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
- </div>
- <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
- <p><label>$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
- <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
- <p><label>$i18n.getString( "number_of_attribute" ):</label><br><span id="noAttributeField"></span></p>
- </div>
-
- </td>
- </tr>
-</table>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientIdentifierType.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientIdentifierType.vm 1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-<div id='identifierTypeList'>
- #parse( "/dhis-web-maintenance-patient/listPatientIdentifierType.vm" )
-</div>
-
-#parse( "/dhis-web-commons/loader/loader.vm" )
-
-<div id='editIdentifierTypeForm'></div>
-<p></p>
-
-
-<script type="text/javascript">
- var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_patientIdentifierType" ) , "'" )';
- var i18n_adding_program_failed = '$encoder.jsEscape( $i18n.getString( "adding_patientIdentifierType_failed" ), "'")';
- var i18n_updating_program_failed = '$encoder.jsEscape( $i18n.getString( "updating_patientIdentifierType_failed" ), "'")';
- var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
-</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipType.vm 2011-05-19 08:14:24 +0000
@@ -1,13 +1,67 @@
-<div id='relationshipTypeList'>
- #parse( "/dhis-web-maintenance-patient/relationshipTypeList.vm" )
-</div>
-
-#parse( "/dhis-web-commons/loader/loader.vm" )
-
-<div id='editRelationshipTypeForm'></div>
-<p></p>
-
-<span id='message'></span>
+
+<h3>$i18n.getString( "relationship_type_management" )</h3>
+
+<table class="mainPageTable">
+ <tr>
+ <td style="vertical-align:top">
+
+ <table class="listTable">
+ <col>
+ <col>
+ <col width="20">
+ <col width="20">
+ <col width="20">
+ <tr>
+ <td></td>
+ <td></td>
+ <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="window.location.href='showAddRelationshipTypeForm.action'" style="width:70px"></td>
+ </tr>
+ <tr>
+ <th>$i18n.getString( "relationship_type" )</th>
+ <th>$i18n.getString( "description" )</th>
+ <th colspan="3">$i18n.getString( "operations" )</th>
+ </tr>
+
+ <tbody id="list">
+ #foreach( $relationshipType in $relationshipTypes )
+ <tr id="tr${relationshipType.id}">
+
+ <td>$encoder.htmlEncode( $relationshipType.aIsToB )/$encoder.htmlEncode( $relationshipType.bIsToA )</td>
+
+ <td>$encoder.htmlEncode( $relationshipType.description )</td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="showUpdateRelationshipTypeForm.action?id=$relationshipType.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
+ </td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="javascript:removeRelationshipType( '$relationshipType.id', '$encoder.jsEncode( $relationshipType.aIsToB )', '$encoder.jsEncode( $relationshipType.bIsToA )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
+ </td>
+
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="javascript:showRelationshipTypeDetails( $relationshipType.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ </td>
+
+ </tr>
+ #end
+
+ </tbody>
+
+ </table>
+ </td>
+ <td style="width:20em; padding-left:2em; vertical-align:top">
+ <div id="detailsArea" style="display:none; position:absolute; overflow:auto; right: 10px">
+ <div style="float:right;">
+ <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
+ </div>
+ <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
+ <p><label>$i18n.getString( "a_is_to_b" ):</label><br><span id="aIsToBField"></span></p>
+ <p><label>$i18n.getString( "b_is_to_a" ):</label><br><span id="bIsToAField"></span></p>
+ <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
+ </div>
+ </td>
+ </tr>
+</table>
<script type="text/javascript">
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_relationship_type" ) , "'" )';
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipTypeList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipTypeList.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/relationshipTypeList.vm 1970-01-01 00:00:00 +0000
@@ -1,67 +0,0 @@
-
-<h3>$i18n.getString( "relationship_type_management" )</h3>
-
-<table class="mainPageTable">
- <tr>
- <td style="vertical-align:top">
-
- <table class="listTable">
- <col>
- <col>
- <col width="20">
- <col width="20">
- <col width="20">
- <tr>
- <td></td>
- <td></td>
- <td colspan="3" style="text-align:right"><input type="button" value="$i18n.getString( "add_new" )" onclick="javascript:showAddRelationshipTypeForm()" style="width:70px"></td>
- </tr>
- <tr>
- <th>$i18n.getString( "relationship_type" )</th>
- <th>$i18n.getString( "description" )</th>
- <th colspan="3">$i18n.getString( "operations" )</th>
- </tr>
-
- <tbody id="list">
- #set( $mark = false )
- #foreach( $relationshipType in $relationshipTypes )
- <tr id="tr${relationshipType.id}" #alternate( $mark ) >
-
- <td>$encoder.htmlEncode( $relationshipType.aIsToB )/$encoder.htmlEncode( $relationshipType.bIsToA )</td>
-
- <td>$encoder.htmlEncode( $relationshipType.description )</td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showUpdateRelationshipTypeForm('$relationshipType.id')" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
- </td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:removeRelationshipType( '$relationshipType.id', '$encoder.jsEncode( $relationshipType.aIsToB )', '$encoder.jsEncode( $relationshipType.bIsToA )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
- </td>
-
- <td style="text-align:center"#alternate( $mark )>
- <a href="javascript:showRelationshipTypeDetails( $relationshipType.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
- </td>
-
- </tr>
- #set( $mark = !$mark)
- #end
-
- </tbody>
-
- </table>
- </td>
- <td style="width:20em; padding-left:2em; vertical-align:top">
- <div id="detailsArea" style="display:none; position:absolute; overflow:auto; right: 10px">
- <div style="float:right;">
- <a href="javascript:hideDetails()" title="$i18n.getString( "hide_details" )"><img src="../images/close.png" alt="$i18n.getString( "hide_details" )"></a>
- </div>
- <p><label>$i18n.getString( "id" ):</label><br><span id="idField"></span></p>
- <p><label>$i18n.getString( "a_is_to_b" ):</label><br><span id="aIsToBField"></span></p>
- <p><label>$i18n.getString( "b_is_to_a" ):</label><br><span id="bIsToAField"></span></p>
- <p><label>$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
- </div>
- </td>
- </tr>
-</table>
-
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteGroupForm.vm 2011-05-19 08:14:24 +0000
@@ -1,12 +1,12 @@
<script>
var i18n_remove_option = '$encoder.jsEscape( $i18n.getString( "remove_option" ) , "'") ';
- jQuery("#updatePatientAttributeGroupForm").ready( function(){
+ jQuery(document).ready( function(){
jQuery('name').focus();
validation( 'updatePatientAttributeGroupForm', function(form){
- updatePatientAttributeGroup();
+ form.submit();
}, function()
{
beforeSubmit();
@@ -15,12 +15,8 @@
checkValueIsExist( "name", "validatePatientAttributeGroup.action", {id:getFieldValue('id')});
});
</script>
-
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
<h3>$i18n.getString( "update_patient_attribute_group" )</h3>
-<form id="updatePatientAttributeGroupForm" name="updatePatientAttributeGroupForm" action="updatePatientAttributeGroup.action" method="post">
+<form id="updatePatientAttributeGroupForm" name="updatePatientAttributeGroupForm" action="updatePatientAttributeGroup.action" method="post" onsubmit="return validateUpdatePatientAttributeGroup();">
<div style="display:inline">
<input type="hidden" id="id" name="id" value="$!patientAttributeGroup.id"/>
@@ -88,6 +84,7 @@
<p>
<input type="submit" value="$i18n.getString( 'update' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='patientAttributeGroup.action'" style="width:10em"/>
</p>
</form>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2011-05-19 08:14:24 +0000
@@ -1,18 +1,16 @@
<script>
- jQuery("updatePatientIdentifierTypeForm").ready( function(){
+ jQuery(document).ready( function(){
jQuery('name').focus();
validation( 'updatePatientIdentifierTypeForm', function(form){
- updatePatientIdentifierType();
+ form.submit();
});
checkValueIsExist( "name", "validatePatientIdentifierType.action", {id:getFieldValue('id')});
});
</script>
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
<h3>$i18n.getString( "update_patient_identifier_type" )</h3>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm 2011-05-18 01:07:51 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateRelationshipTypeForm.vm 2011-05-19 08:14:24 +0000
@@ -10,9 +10,6 @@
});
</script>
-<input type="button" value="$i18n.getString( 'back' )" onclick="javascript:onClickBackBtn();" style="width:10em">
-<p></p>
-
<h3>$i18n.getString( "update_relationship_type" )</h3>
<form id="updateRelationshipTypeForm" name="updateRelationshipTypeForm" action="updateRelationshipType.action" method="post">
@@ -47,6 +44,7 @@
<p>
<input type="submit" value="$i18n.getString( 'update' )" style="width:10em"/>
+ <input type="button" value="$i18n.getString( 'cancel' )" onclick="window.location.href='relationshipType.action'" style="width:10em"/>
</p>
</form>