dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #04308
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1409: Minor fix.
------------------------------------------------------------
revno: 1409
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-02-10 18:09:24 +0100
message:
Minor fix.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.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-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2009-11-03 13:11:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/indicator.js 2010-02-10 17:09:24 +0000
@@ -62,32 +62,7 @@
function removeIndicator( indicatorId, indicatorName )
{
- var result = window.confirm( i18n_confirm_delete + '\n\n' + indicatorName );
-
- if ( result )
- {
- var request = new Request();
- request.setResponseTypeXML( 'message' );
- request.setCallbackSuccess( removeIndicatorCompleted );
- request.send( 'removeIndicator.action?id=' + indicatorId );
- }
-}
-
-function removeIndicatorCompleted( messageElement )
-{
- var type = messageElement.getAttribute( 'type' );
- var message = messageElement.firstChild.nodeValue;
-
- if ( type == 'success' )
- {
- window.location.href = 'indicator.action';
- }
- else if ( type = 'error' )
- {
- setFieldValue( 'warningField', message );
-
- showWarning();
- }
+ removeItem( indicatorId, indicatorName, i18n_confirm_delete, 'removeIndicator.action' );
}
// -----------------------------------------------------------------------------