dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14208
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4735: (wip) Showed details - Maintenance modules- Done.
------------------------------------------------------------
revno: 4735
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-09-28 16:08:07 +0700
message:
(wip) Showed details - Maintenance modules- Done.
removed:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttributeOption.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseConstant.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseSqlViewObject.vm
added:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/constant.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttributeOption.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonConstant.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonSqlView.vm
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attributeOption.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/constant.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/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2011-09-21 15:41:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/resources/struts.xml 2011-09-28 09:08:07 +0000
@@ -313,8 +313,8 @@
<!-- Sql View -->
<action name="getSqlViewObject" class="org.hisp.dhis.dataadmin.action.sqlview.GetSqlViewObjectAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-dataadmin/responseSqlViewObject.vm
+ <result name="success" type="velocity-json">
+ /dhis-web-maintenance-dataadmin/jsonSqlView.vm
</result>
</action>
@@ -412,9 +412,9 @@
<!-- Constant Name -->
<action name="getConstant" class="org.hisp.dhis.dataadmin.action.constant.GetConstantAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-dataadmin/responseConstant.vm
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-maintenance-dataadmin/jsonConstant.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="constant" class="org.hisp.dhis.dataadmin.action.constant.GetConstantListAction">
@@ -422,8 +422,9 @@
<param name="menu">/dhis-web-maintenance-dataadmin/menu.vm</param>
<param name="page">
/dhis-web-maintenance-dataadmin/constant.vm</param>
+ <param name="javascripts">javascript/constant.js</param>
+ <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
<param name="requiredAuthorities">F_CONSTANT_MANAGEMENT</param>
- <param name="stylesheets">../dhis-web-commons/paging/paging.css</param>
</action>
<action name="showAddConstantForm" class="org.hisp.dhis.dataadmin.action.NoAction">
@@ -580,11 +581,15 @@
</action>
<action name="getAttribute" class="org.hisp.dhis.dataadmin.action.attribute.GetAttributeAction">
- <result name="success" type="velocity-xml">/dhis-web-maintenance-dataadmin/responseAttribute.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-maintenance-dataadmin/jsonAttribute.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="getAttributeOption" class="org.hisp.dhis.dataadmin.action.attribute.GetAttributeOptionAction">
- <result name="success" type="velocity-xml">/dhis-web-maintenance-dataadmin/responseAttributeOption.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-maintenance-dataadmin/jsonAttributeOption.vm</result>
+ <param name="onExceptionReturn">plainTextError</param>
</action>
<action name="validateAttribute" class="org.hisp.dhis.dataadmin.action.attribute.ValidateAttributeAction">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attribute.vm 2011-09-21 15:41:25 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attribute.vm 2011-09-28 09:08:07 +0000
@@ -7,15 +7,14 @@
function showAttributeDetails( attributeId )
{
- jQuery.post( 'getAttribute.action',
- { 'id':attributeId },
- function( attributeElement ) {
- setInnerHTML( 'nameField', getElementValue( attributeElement, 'name' ) );
- setInnerHTML( 'mandatoryField', getElementValue( attributeElement, 'mandatory' ) );
- setInnerHTML( 'dataelementField', getElementValue( attributeElement, 'dataelement' ) );
- setInnerHTML( 'indicatorField', getElementValue( attributeElement, 'indicator' ) );
- setInnerHTML( 'organisationunitField', getElementValue( attributeElement, 'organisationunit' ) );
- setInnerHTML( 'valuetypeField', getElementValue( attributeElement, 'valueType' ) );
+ jQuery.post( 'getAttribute.action', { id:attributeId },
+ function( json ) {
+ setInnerHTML( 'nameField', json.attribute.name );
+ setInnerHTML( 'mandatoryField', json.attribute.mandatory );
+ setInnerHTML( 'dataelementField', json.attribute.dataelement );
+ setInnerHTML( 'indicatorField', json.attribute.indicator );
+ setInnerHTML( 'organisationunitField', json.attribute.organisationunit );
+ setInnerHTML( 'valuetypeField', json.attribute.valueType );
showDetails();
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attributeOption.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attributeOption.vm 2011-09-07 13:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/attributeOption.vm 2011-09-28 09:08:07 +0000
@@ -7,10 +7,9 @@
function showAttributeOptionDetails( attributeOptionId )
{
- jQuery.post( 'getAttributeOption.action',
- { 'id':attributeOptionId },
- function( attributeOptionElement ) {
- setInnerHTML( 'nameField', getElementValue( attributeOptionElement, 'name' ) );
+ jQuery.post( 'getAttributeOption.action', { id:attributeOptionId },
+ function( json ) {
+ setInnerHTML( 'nameField', json.attributeOption.name );
showDetails();
});
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/constant.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/constant.vm 2011-06-30 07:55:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/constant.vm 2011-09-28 09:08:07 +0000
@@ -4,30 +4,6 @@
});
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_constant" ) , "'")';
-
- // -----------------------------------------------------------------------------
- // View details
- // -----------------------------------------------------------------------------
-
- function showConstantDetails( constantId )
- {
- jQuery.post( 'getConstant.action',
- { 'id':constantId },
- function( constantElement ) {
- setInnerHTML( 'nameField', getElementValue( constantElement, 'name' ) );
- setInnerHTML( 'valueField', getElementValue( constantElement, 'value' ) );
- showDetails();
- });
- }
-
- // -----------------------------------------------------------------------------
- // Remove category constant
- // -----------------------------------------------------------------------------
-
- function removeConstant( constantId, constantName )
- {
- removeItem( constantId, constantName, i18n_confirm_delete, 'removeConstant.action' );
- }
</script>
<h3>$i18n.getString( "constant_management" ) #openHelp( "constant" )</h3>
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/constant.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/constant.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/javascript/constant.js 2011-09-28 09:08:07 +0000
@@ -0,0 +1,22 @@
+// -----------------------------------------------------------------------------
+// View details
+// -----------------------------------------------------------------------------
+
+function showConstantDetails( constantId )
+{
+ jQuery.post( 'getConstant.action', { id:constantId },
+ function( constantElement ) {
+ setInnerHTML( 'nameField', json.constant.name );
+ setInnerHTML( 'valueField', json.constant.value );
+ showDetails();
+ });
+}
+
+// -----------------------------------------------------------------------------
+// Remove category constant
+// -----------------------------------------------------------------------------
+
+function removeConstant( constantId, constantName )
+{
+ removeItem( constantId, constantName, i18n_confirm_delete, 'removeConstant.action' );
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttribute.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttribute.vm 2011-09-28 09:08:07 +0000
@@ -0,0 +1,11 @@
+{ "attribute":
+ {
+ "id": "${attribute.id}",
+ "name": "$!encoder.jsonEncode( ${attribute.name} )",
+ "valueType": "$!encoder.jsonEncode( ${attribute.valueType} )",
+ "mandatory": "$!{attribute.mandatory}",
+ "dataelement": "$!{attribute.dataElement}",
+ "indicator": "$!{attribute.indicator}",
+ "organisationunit": "$!{attribute.organisationUnit}"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttributeOption.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttributeOption.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonAttributeOption.vm 2011-09-28 09:08:07 +0000
@@ -0,0 +1,6 @@
+{ "attributeOption":
+ {
+ "id": "$!{attributeOption.id}",
+ "name": "$!encoder.jsonEncode( ${attributeOption.name} )"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonConstant.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonConstant.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonConstant.vm 2011-09-28 09:08:07 +0000
@@ -0,0 +1,7 @@
+{ "constant":
+ {
+ "id": "${constant.id}",
+ "name": "$!encoder.jsonEncode( ${constant.name} )",
+ "value": "$!{constant.value}"
+ }
+}
=== added file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonSqlView.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonSqlView.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/jsonSqlView.vm 2011-09-28 09:08:07 +0000
@@ -0,0 +1,7 @@
+{ "sqlView":
+ {
+ "name": "$!encoder.jsonEncode( ${sqlViewObject.name} )",
+ "description": "$!encoder.jsonEncode( ${sqlViewObject.description} )",
+ "sqlquery": "$!encoder.jsonEncode( ${sqlViewObject.sqlQuery} )
+ }
+}
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttribute.vm 2011-09-07 13:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttribute.vm 1970-01-01 00:00:00 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<attribute>
- <id>$attribute.id</id>
- <name>$encoder.xmlEncode( $attribute.name )</name>
- <valueType>$encoder.xmlEncode( $attribute.valueType )</valueType>
- <mandatory>$attribute.mandatory</mandatory>
- <dataelement>$attribute.dataElement</dataelement>
- <indicator>$attribute.indicator</indicator>
- <organisationunit>$attribute.organisationUnit</organisationunit>
-</attribute>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttributeOption.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttributeOption.vm 2011-09-07 13:42:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseAttributeOption.vm 1970-01-01 00:00:00 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<attributeOption>
- <id>$attributeOption.id</id>
- <name>$encoder.xmlEncode( $attributeOption.name )</name>
-</attributeOption>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseConstant.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseConstant.vm 2011-06-30 07:55:55 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseConstant.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<constant>
- <id>$constant.id</id>
- <name>$encoder.xmlEncode( $constant.name )</name>
- <value>$constant.value</value>
-</constant>
=== removed file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseSqlViewObject.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseSqlViewObject.vm 2010-07-16 08:26:19 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataadmin/src/main/webapp/dhis-web-maintenance-dataadmin/responseSqlViewObject.vm 1970-01-01 00:00:00 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<sqlViewObject>
- <name>$!encoder.xmlEncode( $sqlViewObject.name )</name>
- <description>$!encoder.xmlEncode( $sqlViewObject.description )</description>
- <sqlquery>$!encoder.xmlEncode( $sqlViewObject.sqlQuery )</sqlquery>
-</sqlViewObject>
\ No newline at end of file