dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04305
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1408: -Added Armenia flag. -Work in progress on ajax deletion.
------------------------------------------------------------
revno: 1408
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-02-10 18:00:47 +0100
message:
-Added Armenia flag. -Work in progress on ajax deletion.
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseError.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseSuccess.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/flags/armenia.png
modified:
dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java
dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java
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/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/category.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js
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
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorType.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties
--
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-options/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml 2009-11-29 15:09:47 +0000
+++ dhis-2/dhis-options/src/main/resources/META-INF/dhis/beans.xml 2010-02-10 17:00:47 +0000
@@ -35,6 +35,10 @@
<property name="flags">
<map>
<entry>
+ <key><value>armenia</value></key>
+ <value>armenia.png</value>
+ </entry>
+ <entry>
<key><value>botswana</value></key>
<value>botswana.png</value>
</entry>
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java 2009-11-01 20:57:16 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/ExportParams.java 2010-02-10 17:00:47 +0000
@@ -101,6 +101,8 @@
private I18nFormat format;
+ private String fileBaseName;
+
// -------------------------------------------------------------------------
// Constructur
// -------------------------------------------------------------------------
@@ -441,4 +443,14 @@
{
this.olapUrls = olapUrls;
}
+
+ public String getFileBaseName()
+ {
+ return fileBaseName;
+ }
+
+ public void setFileBaseName( String fileBaseName )
+ {
+ this.fileBaseName = fileBaseName;
+ }
}
=== modified file 'dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java'
--- dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java 2010-02-08 10:56:08 +0000
+++ dhis-2/dhis-services/dhis-service-importexport/src/main/java/org/hisp/dhis/importexport/dhis14/xml/exporter/DefaultDhis14XMLExportService.java 2010-02-10 17:00:47 +0000
@@ -69,12 +69,11 @@
* @author Lars Helge Overland
* @version $Id: DefaultDhis14XMLExportService.java 5793 2008-10-02 14:14:00Z larshelg $
*/
-@SuppressWarnings( "unused" )
public class DefaultDhis14XMLExportService
implements ExportService
{
private static final String ENCODING = "ISO-8859-1";
- private static final String ZIP_ENTRY_NAME = "Export.xml";
+ private static final String ZIP_EXT = ".xml";
private static final String ROOT_NAME = "root";
private static final String[] ROOT_PROPERTIES = { "xmlns:xsd", "http://www.w3.org/2001/XMLSchema",
"xmlns:od", "urn:schemas-microsoft-com:officedata" };
@@ -144,7 +143,7 @@
ZipOutputStream zipOut = new ZipOutputStream( out );
- zipOut.putNextEntry( new ZipEntry( "Export.xml" ) );
+ zipOut.putNextEntry( new ZipEntry( params.getFileBaseName() + ZIP_EXT ) );
XMLWriter writer = XMLFactory.getPlainXMLWriter( zipOut );
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseError.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseError.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseError.vm 2010-02-10 17:00:47 +0000
@@ -0,0 +1,4 @@
+{
+ "response": "error",
+ "message": "$!encoder.jsEncode( ${message} )"
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseSuccess.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseSuccess.vm 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonResponseSuccess.vm 2010-02-10 17:00:47 +0000
@@ -0,0 +1,4 @@
+{
+ "response": "success",
+ "message": "$!encoder.jsEncode( ${message} )"
+}
\ No newline at end of file
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/flags/armenia.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/flags/armenia.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/flags/armenia.png 2010-02-10 17:00:47 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/util/commons.js 2010-02-10 17:00:47 +0000
@@ -610,24 +610,34 @@
* @param message the confirmation message.
* @param action the server action url for deleting the item.
*/
-function removeItem( itemId, itemName, message, action )
+function removeItem( itemId, itemName, confirmation, action )
{
- var result = window.confirm( i18n_confirm_delete + "\n\n" + itemName );
+ var result = window.confirm( confirmation + "\n\n" + itemName );
if ( result )
- {
- $.ajax({
- "url": action,
- "data": { "id": itemId },
- "success": function()
- {
- $( "tr#tr" + itemId ).remove();
-
- $( "table.listTable tbody tr" ).removeClass( "listRow listAlternateRow" );
- $( "table.listTable tbody tr:odd" ).addClass( "listAlternateRow" );
- $( "table.listTable tbody tr:even" ).addClass( "listRow" );
-
- }
- });
+ {
+ $.getJSON(
+ action,
+ {
+ "id": itemId
+ },
+ function( json )
+ {
+ if ( json.response == "success" )
+ {
+ $( "tr#tr" + itemId ).remove();
+
+ $( "table.listTable tbody tr" ).removeClass( "listRow listAlternateRow" );
+ $( "table.listTable tbody tr:odd" ).addClass( "listAlternateRow" );
+ $( "table.listTable tbody tr:even" ).addClass( "listRow" );
+ }
+ else if ( json.response == "error" )
+ {
+ setFieldValue( 'warningField', json.message );
+
+ showWarning();
+ }
+ }
+ );
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java 2010-02-02 19:21:58 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/exp/DataValueExportAction.java 2010-02-10 17:00:47 +0000
@@ -249,7 +249,8 @@
params.setIncludeDataValues( true );
params.setIncludeCompleteDataSetRegistrations( true );
params.setAggregatedData( aggregatedData );
-
+ params.setFileBaseName( getFileBaseName( params ) );
+
// ---------------------------------------------------------------------
// Export
// ---------------------------------------------------------------------
@@ -267,7 +268,7 @@
// Supportive methods
// -------------------------------------------------------------------------
- private String getFileName( ExportParams params )
+ private String getFileBaseName( ExportParams params )
{
String fileName = FILE_PREFIX + FILE_SEPARATOR +
getMediumDateString( getMediumDate( startDate ) ) + FILE_SEPARATOR +
@@ -283,11 +284,14 @@
fileName += FILE_SEPARATOR + fileNameEncode( dataSetService.getDataSet( params.getDataSets().iterator().next() ).getName() );
}
- fileName += FILE_EXTENSION;
-
return fileName;
}
+ private String getFileName( ExportParams params )
+ {
+ return getFileBaseName( params ) + FILE_EXTENSION;
+ }
+
private String fileNameEncode( String in )
{
if ( in == null )
=== 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 2010-02-09 09:10:29 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/resources/struts.xml 2010-02-10 17:00:47 +0000
@@ -61,10 +61,10 @@
<action name="removeDataElement"
class="org.hisp.dhis.dd.action.dataelement.RemoveDataElementAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseSuccess.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseError.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_DATAELEMENT_DELETE</param>
</action>
@@ -182,8 +182,8 @@
<action name="removeDataElementGroup"
class="org.hisp.dhis.dd.action.dataelementgroup.RemoveDataElementGroupAction">
- <result name="success" type="redirect">dataElementGroup.action
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_DATAELEMENTGROUP_DELETE</param>
</action>
@@ -256,13 +256,13 @@
<param name="javascripts">javascript/dataElementGroupSet.js
,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
- <param name="requiredAuthorities">F_DATAELEMENTGROUP_ADD</param>
+ <param name="requiredAuthorities">F_DATAELEMENTGROUPSET_ADD</param>
</action>
<action name="addDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.AddDataElementGroupSetAction">
<result name="success" type="redirect">dataElementGroupSet.action</result>
- <param name="requiredAuthorities">F_DATAELEMENTGROUP_ADD</param>
+ <param name="requiredAuthorities">F_DATAELEMENTGROUPSET_ADD</param>
</action>
<action name="openUpdateDataElementGroupSet"
@@ -273,12 +273,13 @@
<param name="javascripts">javascript/dataElementGroupSet.js
,../dhis-web-commons/util/validate/jquery.validate.js,../dhis-web-commons/util/jquery.metadata.js
,../dhis-web-commons/util/validate/additional-methods.js,../dhis-web-commons/util/validate/messages_locale.js</param>
+ <param name="requiredAuthorities">F_DATAELEMENTGROUPSET_UPDATE</param>
</action>
<action name="updateDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.UpdateDataElementGroupSetAction">
<result name="success" type="redirect">dataElementGroupSet.action</result>
- <param name="requiredAuthorities">F_DATAELEMENTGROUP_UPDATE</param>
+ <param name="requiredAuthorities">F_DATAELEMENTGROUPSET_UPDATE</param>
</action>
<action name="validateDataElementGroupSet"
@@ -291,8 +292,9 @@
<action name="deleteDataElementGroupSet"
class="org.hisp.dhis.dd.action.dataelementgroupset.DeleteDataElementGroupSetAction">
- <result name="success" type="redirect">dataElementGroupSet.action</result>
- <param name="requiredAuthorities">F_DATAELEMENTGROUP_DELETE</param>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <param name="requiredAuthorities">F_DATAELEMENTGROUPSET_DELETE</param>
</action>
<action name="showDataElementGroupSetDetails"
@@ -370,8 +372,8 @@
<action name="removeIndicatorGroup"
class="org.hisp.dhis.dd.action.indicatorgroup.RemoveIndicatorGroupAction">
- <result name="success" type="redirect">indicatorGroup.action
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_INDICATORGROUP_DELETE</param>
</action>
@@ -451,7 +453,7 @@
<action name="addIndicatorGroupSet"
class="org.hisp.dhis.dd.action.indicatorgroupset.AddIndicatorGroupSetAction">
<result name="success" type="redirect">indicatorGroupSet.action</result>
- <param name="requiredAuthorities">F_INDICATORGROUP_ADD</param>
+ <param name="requiredAuthorities">F_INDICATORGROUPSET_ADD</param>
</action>
<action name="openUpdateIndicatorGroupSet"
@@ -467,7 +469,7 @@
<action name="updateIndicatorGroupSet"
class="org.hisp.dhis.dd.action.indicatorgroupset.UpdateIndicatorGroupSetAction">
<result name="success" type="redirect">indicatorGroupSet.action</result>
- <param name="requiredAuthorities">F_INDICATORGROUP_UPDATE</param>
+ <param name="requiredAuthorities">F_INDICATORGROUPSET_UPDATE</param>
</action>
<action name="validateIndicatorGroupSet"
@@ -480,8 +482,9 @@
<action name="deleteIndicatorGroupSet"
class="org.hisp.dhis.dd.action.indicatorgroupset.DeleteIndicatorGroupSetAction">
- <result name="success" type="redirect">indicatorGroupSet.action</result>
- <param name="requiredAuthorities">F_INDICATORGROUP_DELETE</param>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <param name="requiredAuthorities">F_INDICATORGROUPSET_DELETE</param>
</action>
<action name="showIndicatorGroupSetDetails"
@@ -511,10 +514,10 @@
<action name="removeIndicatorType"
class="org.hisp.dhis.dd.action.indicatortype.RemoveIndicatorTypeAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseSuccess.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseError.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_INDICATORTYPE_DELETE</param>
</action>
@@ -594,10 +597,10 @@
<action name="removeIndicator"
class="org.hisp.dhis.dd.action.indicator.RemoveIndicatorAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseSuccess.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseError.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_INDICATOR_DELETE</param>
</action>
@@ -713,8 +716,8 @@
<action name="removeDataDictionary"
class="org.hisp.dhis.dd.action.datadictionary.RemoveDataDictionaryAction">
- <result name="success" type="redirect">dataDictionary.action
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_DATADICTIONARY_DELETE</param>
</action>
@@ -941,10 +944,10 @@
<action name="removeDataElementCategory"
class="org.hisp.dhis.dd.action.category.RemoveDataElementCategoryAction">
- <result name="success" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseSuccess.vm</result>
- <result name="error" type="velocity-xml">
- /dhis-web-maintenance-datadictionary/responseError.vm</result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
+ <result name="error" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseError.vm</result>
<param name="onExceptionReturn">plainTextError</param>
<param name="requiredAuthorities">F_DATAELEMENT_DELETE</param>
</action>
@@ -1015,8 +1018,8 @@
<action name="removeDataElementCategoryCombo"
class="org.hisp.dhis.dd.action.categorycombo.RemoveDataElementCategoryComboAction">
- <result name="success" type="redirect">categoryCombo.action
- </result>
+ <result name="success" type="velocity-json">
+ /dhis-web-commons/ajax/jsonResponseSuccess.vm</result>
<param name="requiredAuthorities">F_DATAELEMENT_DELETE</param>
</action>
=== 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 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/dataElementGroupSet.vm 2010-02-10 17:00:47 +0000
@@ -8,25 +8,25 @@
<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>
+ <td colspan="4" style="text-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="150px">$i18n.getString( "operations" )</th>
+ <th colspan="4">$i18n.getString( "operations" )</th>
</tr>
<tbody id="list">
#foreach( $dataElementGroupSet in $dataElementGroupSets )
<tr id="tr${dataElementGroupSet.id}">
<td>$encoder.htmlEncode( $dataElementGroupSet.name )</td>
- <td style="text-align:center">
- <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>
+ <td style="text-align:center"><a href="openUpdateDataElementGroupSet.action?id=$dataElementGroupSet.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
+ <td style="text-align:center"><a href="javascript:translate( 'DataElementGroupSet', '$dataElementGroupSet.id' )"><img src="../images/i18n.png" alt="$i18n.getString( "translation_translate" )"></a></td>
+ <td style="text-align:center"><a href="javascript:deleteDataElementGroupSet( $dataElementGroupSet.id, '$encoder.jsEncode( $dataElementGroupSet.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
+ <td style="text-align:center"><a href="javascript:showDataElementGroupSetDetails( $dataElementGroupSet.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a></td>
</tr>
#end
</tbody>
=== 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 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/indicatorGroupSet.vm 2010-02-10 17:00:47 +0000
@@ -8,25 +8,25 @@
<table class="listTable">
<col>
<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='openAddIndicatorGroupSet.action'"/></td>
+ <td colspan="4" style="text-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>
+ <th colspan="4">$i18n.getString( "operations" )</th>
</tr>
<tbody id="list">
#foreach( $indicatorGroupSet in $indicatorGroupSets )
<tr id="tr${indicatorGroupSet.id}">
<td>$encoder.htmlEncode( $indicatorGroupSet.name )</td>
- <td style="text-align:center">
- <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>
+ <td style="text-align:center"><a href="openUpdateIndicatorGroupSet.action?id=$indicatorGroupSet.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
+ <td style="text-align:center"><a href="javascript:translate( 'IndicatorGroupSet', '$indicatorGroupSet.id' )"><img src="../images/i18n.png" alt="$i18n.getString( "translation_translate" )"></a></td>
+ <td style="text-align:center"><a href="javascript:deleteIndicatorGroupSet( $indicatorGroupSet.id, '$encoder.jsEncode( $indicatorGroupSet.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
+ <td style="text-align:center"><a href="javascript:showIndicatorGroupSetDetails( $indicatorGroupSet.id )" title="$i18n.getString( "show_details" )"><img src="../images/information.png" alt="$i18n.getString( "show_details" )"></a></td>
</tr>
#end
</tbody>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js 2009-11-03 10:17:35 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.js 2010-02-10 17:00:47 +0000
@@ -25,32 +25,7 @@
function removeDataElementCategory( categoryId, categoryName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + categoryName );
-
- if ( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeDataElementCategoryCompleted );
- request.send( 'removeDataElementCategory.action?id=' + categoryId );
- }
-}
-
-function removeDataElementCategoryCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if ( type == 'success' )
- {
- window.location.href = 'category.action';
- }
- else if ( type = 'error' )
- {
- setFieldValue( 'warningField', message );
-
- showWarning();
- }
+ removeItem( categoryId, categoryName, i18n_confirm_delete, 'removeDataElementCategory.action' );
}
function addCategoryOptionToCategory( categoryName )
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2009-12-04 14:09:09 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElement.js 2010-02-10 17:00:47 +0000
@@ -127,32 +127,7 @@
function removeDataElement( dataElementId, dataElementName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + dataElementName );
-
- if ( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeDataElementCompleted );
- request.send( 'removeDataElement.action?id=' + dataElementId );
- }
-}
-
-function removeDataElementCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if ( type == 'success' )
- {
- window.location.href = 'dataElement.action';
- }
- else if ( type = 'error' )
- {
- setFieldValue( 'warningField', message );
-
- showWarning();
- }
+ removeItem( dataElementId, dataElementName, i18n_confirm_delete, 'removeDataElement.action' );
}
// -----------------------------------------------------------------------------
=== 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 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/dataElementGroupSet.js 2010-02-10 17:00:47 +0000
@@ -50,9 +50,9 @@
// Delete Data Element Group
// -----------------------------------------------------------------------------
-function deleteDataElementGroupSet( id ){
+function deleteDataElementGroupSet( groupSetId, groupSetName ){
- deleteItem( id, "", i18n_confirm_delete, "deleteDataElementGroupSet.action" );
+ removeItem( groupSetId, groupSetName, i18n_confirm_delete, "deleteDataElementGroupSet.action" );
}
// -----------------------------------------------------------------------------
@@ -64,8 +64,7 @@
var request = new Request();
request.setResponseTypeXML( 'dataElementGroupSet' );
request.setCallbackSuccess( showDetailsCompleted );
- request.send( "showDataElementGroupSetDetails.action?id=" + id);
-
+ request.send( "showDataElementGroupSetDetails.action?id=" + id);
}
=== 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 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorGroupSet.js 2010-02-10 17:00:47 +0000
@@ -49,9 +49,9 @@
// Delete Indicator Group Set
// -----------------------------------------------------------------------------
-function deleteIndicatorGroupSet( id ){
+function deleteIndicatorGroupSet( groupSetId, groupSetName ){
- removeItem( id, "", i18n_confirm_delete, "deleteIndicatorGroupSet.action" );
+ removeItem( groupSetId, groupSetName, i18n_confirm_delete, "deleteIndicatorGroupSet.action" );
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorType.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorType.js 2009-03-03 16:46:36 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicatorType.js 2010-02-10 17:00:47 +0000
@@ -25,32 +25,7 @@
function removeIndicatorType( indicatorTypeId, indicatorTypeName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + indicatorTypeName );
-
- if ( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeIndicatorTypeCompleted );
- request.send( 'removeIndicatorType.action?id=' + indicatorTypeId );
- }
-}
-
-function removeIndicatorTypeCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if ( type == 'success' )
- {
- window.location.href = 'indicatorType.action';
- }
- else if ( type = 'error' )
- {
- setFieldValue( 'warningField', message );
-
- showWarning();
- }
+ removeItem( indicatorTypeId, indicatorTypeName, i18n_confirm_delete, 'removeIndicatorType.action' );
}
// -----------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm 2010-02-04 08:29:27 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/category.vm 2010-02-10 17:00:47 +0000
@@ -22,7 +22,7 @@
<tbody id="list">
#foreach( $dataElementCategory in $dataElementCategories )
#if( $dataElementCategory.id != $defaultCategory.id )
- <tr id="tr${$dataElementCategory.id}">
+ <tr id="tr${dataElementCategory.id}">
<td>$encoder.htmlEncode( $dataElementCategory.name )</td>
<td style="text-align:center"><a href="showUpdateDataElementCategoryForm.action?id=$dataElementCategory.id" title="$i18n.getString( "edit" )"><img src="../images/edit.png" alt="$i18n.getString( "edit" )"></a></td>
<td style="text-align:center"><a href="javascript:removeDataElementCategory( '$dataElementCategory.id', '$encoder.jsEncode( $dataElementCategory.name )' )" title="$i18n.getString( "remove" )"><img src="../images/delete.png" alt="$i18n.getString( "remove" )"></a></td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2009-12-21 05:32:40 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-settings/src/main/resources/org/hisp/dhis/settings/i18n_module.properties 2010-02-10 17:00:47 +0000
@@ -38,6 +38,7 @@
ethiopia = Ethiopia
india = India
irc = International Rescue Committe
+armenia = Armenia
malawi = Malawi
mozambique = Mozambique
norway = Norway