dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02950
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 976: update DE/IN group set and add translation function for them
------------------------------------------------------------
revno: 976
committer: Tran Thanh Tri <Tran Thanh Tri@TranThanhTri-PC>
branch nick: trunk
timestamp: Wed 2009-11-04 13:39:59 +0700
message:
update DE/IN group set and add translation function for them
modified:
dhis-2/dhis-i18n/dhis-i18n-db/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js
--
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-i18n/dhis-i18n-db/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-i18n/dhis-i18n-db/src/main/resources/META-INF/dhis/beans.xml 2009-07-07 10:27:18 +0000
+++ dhis-2/dhis-i18n/dhis-i18n-db/src/main/resources/META-INF/dhis/beans.xml 2009-11-04 06:39:59 +0000
@@ -58,6 +58,16 @@
</list>
</property>
</bean>
+
+ <bean id="I18nDataElementGroupSet"
+ class="org.hisp.dhis.i18n.I18nObject">
+ <property name="className" value="DataElementGroupSet"/>
+ <property name="propertyNames">
+ <list>
+ <value>name</value>
+ </list>
+ </property>
+ </bean>
<bean id="I18nIndicator"
@@ -94,6 +104,16 @@
</property>
</bean>
+ <bean id="I18nIndicatorGroupSet"
+ class="org.hisp.dhis.i18n.I18nObject">
+ <property name="className" value="IndicatorGroupSet"/>
+ <property name="propertyNames">
+ <list>
+ <value>name</value>
+ </list>
+ </property>
+ </bean>
+
<bean id="I18nDataDictionary"
class="org.hisp.dhis.i18n.I18nObject">
<property name="className" value="DataDictionary"/>
@@ -183,10 +203,12 @@
<list>
<ref bean="I18nDataElement"/>
<ref bean="I18nDataElementGroup"/>
+ <ref bean="I18nDataElementGroupSet"/>
<ref bean="I18nDataDictionary"/>
<ref bean="I18nIndicator"/>
<ref bean="I18nIndicatorType"/>
<ref bean="I18nIndicatorGroup"/>
+ <ref bean="I18nIndicatorGroupSet"/>
<ref bean="I18nOrganisationUnit"/>
<ref bean="I18nOrganisationUnitGroup"/>
<ref bean="I18nOrganisationUnitGroupSet"/>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2009-11-03 08:29:16 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2009-11-04 06:39:59 +0000
@@ -237,7 +237,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm</param>
<param name="menu">/dhis-web-maintenance-datadictionary/menu.vm</param>
- <param name="javascripts">javascript/dataElementGroupSet.js</param>
+ <param name="javascripts">javascript/dataElementGroupSet.js,javascript/filterTable.js</param>
</action>
<action name="openAddDataElementGroupSet"
@@ -251,7 +251,7 @@
<action name="addDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.AddDataElementGroupSetAction">
- <result name="success" type="redirect">listDataElementGroupSet.action</result>
+ <result name="success" type="redirect">dataElementGroupSet.action</result>
<param name="requiredAuthorities">F_DATAELEMENTGROUP_ADD</param>
</action>
@@ -271,7 +271,7 @@
<action name="updateDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.UpdateDataElementGroupSetAction">
- <result name="success" type="redirect">listDataElementGroupSet.action</result>
+ <result name="success" type="redirect">dataElementGroupSet.action</result>
<param name="requiredAuthorities">F_DATAELEMENTGROUP_UPDATE</param>
</action>
@@ -285,7 +285,7 @@
<action name="deleteDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.DeleteDataElementGroupSetAction">
- <result name="success" type="redirect">listDataElementGroupSet.action</result>
+ <result name="success" type="redirect">dataElementGroupSet.action</result>
<param name="requiredAuthorities">F_DATAELEMENTGROUP_DELETE</param>
</action>
@@ -424,7 +424,7 @@
<result name="success" type="velocity">/main.vm</result>
<param name="page">/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm</param>
<param name="menu">/dhis-web-maintenance-datadictionary/menu.vm</param>
- <param name="javascripts">javascript/indicatorGroupSet.js</param>
+ <param name="javascripts">javascript/indicatorGroupSet.js,javascript/filterTable.js</param>
</action>
<action name="openAddIndicatorGroupSet"
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm 2009-11-02 18:13:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupSet.vm 2009-11-04 06:39:59 +0000
@@ -51,7 +51,7 @@
</form>
-<span id="message"></span>
+<span id='message' style="position:fixed;top:80px;right:5px;"></span>
<script type="text/javascript">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm 2009-10-31 01:31:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm 2009-11-04 06:39:59 +0000
@@ -8,19 +8,34 @@
<table class="listTable">
<col>
<col width="20">
- <col width="20">
- <col width="20">
- <col width="20">
+ <col width="20">
<tr>
<td>$i18n.getString( "filter_by_name" ): <form style="display:inline" action="none" onsubmit="return false"><div style="inline"><input type="text" onkeyup="filterValues( this.value )"></div></form></td>
<td align="right"><input type=button value="$i18n.getString( "add_new" )" onclick="window.location='openAddDataElementGroupSet.action'"/></td>
</tr>
<tr>
<th>$i18n.getString( "name" )</th>
- <th width="100px">$i18n.getString( "operations" )</th>
+ <th width="150px">$i18n.getString( "operations" )</th>
</tr>
- <tbody id="contents">
-
+ <tbody id="list">
+ #set( $mark = false )
+ #foreach( $dataElementGroupSet in $dataElementGroupSets )
+ <tr>
+ <td#alternate( $mark )>$encoder.htmlEncode( $dataElementGroupSet.name )</td>
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="openUpdateDataElementGroupSet.action?id=$dataElementGroupSet.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
+ <a href="javascript:translate( 'DataElementGroupSet', '$dataElementGroupSet.id' )"><img src="../images/i18n.png" alt="$i18n.getString( "translation_translate" )"></a>
+ <a href="javascript:deleteDataElementGroupSet( $dataElementGroupSet.id, '$encoder.jsEncode( $dataElementGroupSet.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
+ <a href="javascript:showDataElementGroupSetDetails( $dataElementGroupSet.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ </td>
+ </tr>
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
+
</tbody>
</table>
</td>
@@ -44,5 +59,5 @@
var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_data_element_group" ) , "'")';
var i18n_edit = '$encoder.jsEscape( $i18n.getString( "edit" ) , "'")';
var i18n_delete = '$encoder.jsEscape( $i18n.getString( "delete" ) , "'")';
- var i18n_information = '$encoder.jsEscape( $i18n.getString( "show_details" ) , "'")';
+ var i18n_information = '$encoder.jsEscape( $i18n.getString( "show_details" ) , "'")';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm 2009-10-30 07:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm 2009-11-04 06:39:59 +0000
@@ -1,24 +1,43 @@
<h3>$i18n.getString( "indicator_group_set" )</h3>
-<table>
+<table class="mainPageTable">
<tr>
- <td>
- <table style="min-width:500px;">
- <thead>
- <tr>
- <th>$i18n.getString( "filter_by_name" ) <input type="text" id="indicatorGroupSetFilter" style="width:300px" onkeyup="filterIndicatorGroupSet( this.value )"/></th>
- <td align="right"><input type=button value="$i18n.getString( "add_new" )" onclick="window.location='openAddIndicatorGroupSet.action'"/></td>
- </tr>
- <tr>
- <th>$i18n.getString( "name" )</th>
- <th width="100px">$i18n.getString( "operations" )</th>
- </tr>
- </thead>
- <tbody id="contents">
-
+ <td style="vertical-align:top">
+
+ <table class="listTable">
+ <col>
+ <col width="20">
+ <col width="20">
+ <tr>
+ <td>$i18n.getString( "filter_by_name" ): <form style="display:inline" action="none" onsubmit="return false"><div style="inline"><input type="text" onkeyup="filterValues( this.value )"></div></form></td>
+ <td align="right"><input type=button value="$i18n.getString( "add_new" )" onclick="window.location='openAddIndicatorGroupSet.action'"/></td>
+ </tr>
+ <tr>
+ <th>$i18n.getString( "name" )</th>
+ <th width="150px">$i18n.getString( "operations" )</th>
+ </tr>
+ <tbody id="list">
+ #set( $mark = false )
+ #foreach( $indicatorGroupSet in $indicatorGroupSets )
+ <tr>
+ <td#alternate( $mark )>$encoder.htmlEncode( $indicatorGroupSet.name )</td>
+ <td style="text-align:center"#alternate( $mark )>
+ <a href="openUpdateIndicatorGroupSet.action?id=$indicatorGroupSet.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a>
+ <a href="javascript:translate( 'IndicatorGroupSet', '$indicatorGroupSet.id' )"><img src="../images/i18n.png" alt="$i18n.getString( "translation_translate" )"></a>
+ <a href="javascript:deleteIndicatorGroupSet( $indicatorGroupSet.id, '$encoder.jsEncode( $indicatorGroupSet.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a>
+ <a href="javascript:showIndicatorGroupSetDetails( $indicatorGroupSet.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a>
+ </td>
+ </tr>
+ #if( $mark )
+ #set( $mark = false )
+ #else
+ #set( $mark = true )
+ #end
+ #end
+
</tbody>
- </table>
+ </table>
</td>
<td style="width:20em; padding-left:2em; vertical-align:top">
@@ -42,14 +61,4 @@
var i18n_edit = '$encoder.jsEscape( $i18n.getString( "edit" ) , "'")';
var i18n_delete = '$encoder.jsEscape( $i18n.getString( "delete" ) , "'")';
var i18n_information = '$encoder.jsEscape( $i18n.getString( "show_details" ) , "'")';
-
- var indicatorGroupSets = new Array();
- #foreach( $indicatorGroupSet in $indicatorGroupSets )
- indicatorGroupSets.push( new IndicatorGroupSet( $indicatorGroupSet.id, "$encoder.htmlEncode( $indicatorGroupSet.name )" ) );
- #end
-
- filterIndicatorGroupSet( $("#indicatorGroupSetFilter").val() );
-
-
-
</script>
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js 2009-10-30 07:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js 2009-11-04 06:39:59 +0000
@@ -1,54 +1,49 @@
// -----------------------------------------------------------------------------
-// Java Script Data Element Group Set Object
-// -----------------------------------------------------------------------------
-function DataElementGroupSet(id, name){
- this.id = id;
- this.name = name;
-}
-
-// -----------------------------------------------------------------------------
// Validate Update Data Element Group
// -----------------------------------------------------------------------------
function validateUpdateDataElementGroupSet(){
- $.post("validateDataElementGroupSet.action",
- {
- name:$("#name").val(),
- id:$("#id").val()
- },
- function(message){
- message = message.getElementsByTagName("message")[0];
- var type = message.getAttribute("type");
- if(type=="success"){
- selectAllById("groupMembers");
- document.forms['updateDataElementGroupSet'].submit();
- }else{
- setMessage(message.firstChild.nodeValue);
- }
+
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( validateUpdateDataElementGroupSetCompleted );
+ request.sendAsPost( "id=" + getFieldValue("id") + "&name=" + getFieldValue("name"));
+ request.send( "validateDataElementGroupSet.action");
+
+}
+
+function validateUpdateDataElementGroupSetCompleted( message ){
+ var type = message.getAttribute("type");
+ if(type=="success"){
+ selectAllById("groupMembers");
+ document.forms['updateDataElementGroupSet'].submit();
+ }else{
+ setMessage(message.firstChild.nodeValue);
}
- );
}
// -----------------------------------------------------------------------------
// Validate Add Data Element Group
// -----------------------------------------------------------------------------
-function validateAddDataElementGroupSet(){
+function validateAddDataElementGroupSet(){
+
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( validateAddDataElementGroupSetCompleted );
+ request.sendAsPost( "name=" + getFieldValue("name") );
+ request.send( "validateDataElementGroupSet.action");
+
+}
- $.post("validateDataElementGroupSet.action",
- {name:$("#name").val()},
- function(message){
- message = message.getElementsByTagName("message")[0];
- var type = message.getAttribute("type");
- if(type=="success"){
- selectAllById("groupMembers");
- document.forms['addDataElementGroupSet'].submit();
- }else{
- setMessage(message.firstChild.nodeValue);
- }
+function validateAddDataElementGroupSetCompleted( message ){
+ var type = message.getAttribute("type");
+ if(type=="success"){
+ selectAllById("groupMembers");
+ document.forms['addDataElementGroupSet'].submit();
+ }else{
+ setMessage(message.firstChild.nodeValue);
}
- );
-
}
// -----------------------------------------------------------------------------
@@ -65,58 +60,22 @@
// Show Data Element Group Set details
// -----------------------------------------------------------------------------
-function showDetails( id ){
- $.post("showDataElementGroupSetDetails.action",
- {id:id},
- function( xml ){
- var dataElementGroupSet = xml.getElementsByTagName("dataElementGroupSet")[0];
- var name = dataElementGroupSet.getElementsByTagName("name")[0].firstChild.nodeValue;
- var memberCount = dataElementGroupSet.getElementsByTagName("memberCount")[0].firstChild.nodeValue;
-
- $("#nameField").html(name);
- $("#memberCountField").html(memberCount);
-
- $("#detailsArea").slideDown();
-
-
- },"xml");
+function showDataElementGroupSetDetails( id ){
+
+ var request = new Request();
+ request.setResponseTypeXML( 'dataElementGroupSet' );
+ request.setCallbackSuccess( showDetailsCompleted );
+ request.send( "showDataElementGroupSetDetails.action?id=" + id);
+
}
-// -----------------------------------------------------------------------------
-// Filter list data element group set by name
-// -----------------------------------------------------------------------------
-
-function filterDataElementSet( value ){
-
- var html = "";
- var mark = false;
- for(var i=0;i<dataElementGroupSets.length;i++){
-
- var dataElementGroup = dataElementGroupSets[i];
-
- if ( dataElementGroup.name.toLowerCase().indexOf( value.toLowerCase() ) != -1 )
- {
- if(mark){
- mark=false;
- html += "<tr class='listAlternateRow'>";
- }else{
- mark=true;
- html += "<tr class='listRow'>";
- }
- html += "<td>" + dataElementGroup.name +"</td>";
- html += "<td>";
- html += "<a href=\"openUpdateDataElementGroupSet.action?id=" + dataElementGroup.id + "\" title=\""+i18n_edit+"\"><img src=\"../images/edit.png\" alt=\""+i18n_edit+"\"></a>";
- html += "<a href=\"javascript:deleteDataElementGroupSet(" + dataElementGroup.id + ")\" title=\""+i18n_delete+"\"><img src=\"../images/delete.png\" alt=\""+i18n_delete+"\"></a>";
- html += "<a href=\"javascript:showDetails(" + dataElementGroup.id + ")\" title=\""+i18n_information+"\"><img src=\"../images/information.png\" alt=\""+i18n_information+"\"></a>";
-
- html += "</td>";
- html += "</tr>";
-
- }
- }
-
- $("#contents").html(html);
+function showDetailsCompleted( dataElementGroupSet ){
+
+ setFieldValue( 'nameField', getElementValue( dataElementGroupSet, 'name' ) );
+ setFieldValue( 'memberCountField', getElementValue( dataElementGroupSet, 'memberCount' ) );
+
+ showDetails();
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js 2009-10-30 07:06:12 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js 2009-11-04 06:39:59 +0000
@@ -1,33 +1,24 @@
// -----------------------------------------------------------------------------
-// Javascript Indicator Group Set
-// -----------------------------------------------------------------------------
-
-function IndicatorGroupSet(id, name){
- this.id = id;
- this.name = name;
-}
-
-// -----------------------------------------------------------------------------
// Validate Update Indicator Group Set
// -----------------------------------------------------------------------------
function validateUpdateIndicatorGroupSet(){
- $.post("validateIndicatorGroupSet.action",
- {
- name:$("#name").val(),
- id:$("#id").val()
- },
- function(message){
- message = message.getElementsByTagName("message")[0];
- var type = message.getAttribute("type");
- if(type=="success"){
- selectAllById("groupMembers");
- document.forms['updateIndicatorGroupSet'].submit();
- }else{
- setMessage(message.firstChild.nodeValue);
- }
+
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( validateUpdateIndicatorGroupSetCompleted );
+ request.sendAsPost( "id=" + getFieldValue("id") + "&name=" + getFieldValue("name"));
+ request.send( "validateIndicatorGroupSet.action");
+}
+
+function validateUpdateIndicatorGroupSetCompleted( message ){
+ var type = message.getAttribute("type");
+ if(type=="success"){
+ selectAllById("groupMembers");
+ document.forms['updateIndicatorGroupSet'].submit();
+ }else{
+ setMessage(message.firstChild.nodeValue);
}
- );
}
// -----------------------------------------------------------------------------
@@ -36,20 +27,22 @@
function validateAddIndicatorGroupSet(){
- $.post("validateIndicatorGroupSet.action",
- {name:$("#name").val()},
- function(message){
- message = message.getElementsByTagName("message")[0];
- var type = message.getAttribute("type");
- if(type=="success"){
- selectAllById("groupMembers");
- document.forms['addIndicatorGroupSet'].submit();
- }else{
- setMessage(message.firstChild.nodeValue);
- }
+ var request = new Request();
+ request.setResponseTypeXML( 'message' );
+ request.setCallbackSuccess( validateAddIndicatorGroupSetCompleted );
+ request.sendAsPost( "name=" + getFieldValue("name") );
+ request.send( "validateIndicatorGroupSet.action");
+
+}
+
+function validateAddIndicatorGroupSetCompleted( message ){
+ var type = message.getAttribute("type");
+ if(type=="success"){
+ selectAllById("groupMembers");
+ document.forms['addIndicatorGroupSet'].submit();
+ }else{
+ setMessage(message.firstChild.nodeValue);
}
- );
-
}
// -----------------------------------------------------------------------------
@@ -63,59 +56,25 @@
}
// -----------------------------------------------------------------------------
-// Filter Indicator Group Set
-// -----------------------------------------------------------------------------
-
-function filterIndicatorGroupSet( value ){
-
- var html = "";
- var mark = false;
- for(var i=0;i<indicatorGroupSets.length;i++){
-
- var indicatorGroupSet = indicatorGroupSets[i];
-
- if ( indicatorGroupSet.name.toLowerCase().indexOf( value.toLowerCase() ) != -1 )
- {
- if(mark){
- mark=false;
- html += "<tr class='listAlternateRow'>";
- }else{
- mark=true;
- html += "<tr class='listRow'>";
- }
- html += "<td>" + indicatorGroupSet.name +"</td>";
- html += "<td>";
- html += "<a href=\"openUpdateIndicatorGroupSet.action?id=" + indicatorGroupSet.id + "\" title=\""+i18n_edit+"\"><img src=\"../images/edit.png\" alt=\""+i18n_edit+"\"></a>";
- html += "<a href=\"javascript:deleteIndicatorGroupSet(" + indicatorGroupSet.id + ")\" title=\""+i18n_delete+"\"><img src=\"../images/delete.png\" alt=\""+i18n_delete+"\"></a>";
- html += "<a href=\"javascript:showDetails(" + indicatorGroupSet.id + ")\" title=\""+i18n_information+"\"><img src=\"../images/information.png\" alt=\""+i18n_information+"\"></a>";
- html += "</td>";
- html += "</tr>";
-
- }
- }
-
- $("#contents").html(html);
-}
-
-// -----------------------------------------------------------------------------
// Show Data Element Group Set details
// -----------------------------------------------------------------------------
-function showDetails( id ){
- $.post("showIndicatorGroupSetDetails.action",
- {id:id},
- function( xml ){
- var indicatorGroupSet = xml.getElementsByTagName("indicatorGroupSet")[0];
- var name = indicatorGroupSet.getElementsByTagName("name")[0].firstChild.nodeValue;
- var memberCount = indicatorGroupSet.getElementsByTagName("memberCount")[0].firstChild.nodeValue;
-
- $("#nameField").html(name);
- $("#memberCountField").html(memberCount);
-
- $("#detailsArea").slideDown();
-
-
- },"xml");
+function showIndicatorGroupSetDetails( id ){
+
+ var request = new Request();
+ request.setResponseTypeXML( 'indicatorGroupSet' );
+ request.setCallbackSuccess( showDetailsCompleted );
+ request.sendAsPost( "id=" + id );
+ request.send( "showIndicatorGroupSetDetails.action");
+
+}
+
+function showDetailsCompleted( indicatorGroupSet ){
+
+ setFieldValue( 'nameField', getElementValue( indicatorGroupSet, 'name' ) );
+ setFieldValue( 'memberCountField', getElementValue( indicatorGroupSet, 'memberCount' ) );
+
+ showDetails();
}
// -----------------------------------------------------------------------------