=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/concept.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/concept.js 2011-06-22 18:53:24 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/concept.js 2011-09-27 12:08:17 +0000 @@ -4,17 +4,10 @@ function showConceptDetails( conceptId ) { - var request = new Request(); - request.setResponseTypeXML( 'concept' ); - request.setCallbackSuccess( conceptReceived ); - request.send( 'getConcept.action?id=' + conceptId ); -} - -function conceptReceived( conceptElement ) -{ - setFieldValue( 'nameField', getElementValue( conceptElement, 'name' ) ); - - showDetails(); + jQuery.post( 'getConcept.action', { id : conceptId }, function( json ) { + setInnerHTML( 'nameField', json.concept.name ); + showDetails(); + }); } // ----------------------------------------------------------------------------- @@ -25,31 +18,3 @@ { removeItem( conceptId, conceptName, i18n_confirm_delete, 'removeConcept.action' ); } - -// ----------------------------------------------------------------------------- -// Add/Update category concept -// ----------------------------------------------------------------------------- - -function validateAddUpdateConcept( mode ) -{ - var name = $( "#name" ).val(); - - $.getJSON( "validateAddUpdateConcept.action", { - "name" : name, - "mode" : mode - }, function( json ) - { - if ( json.response == "success" ) - { - if ( mode == "add" ) - { - byId( "addConceptForm" ).submit(); - return; - } - byId( "updateConceptForm" ).submit(); - } else if ( json.response == "input" ) - { - setHeaderDelayMessage( json.message ); - } - } ); -} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm 2011-09-27 07:36:07 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/multidimensional/concept.vm 2011-09-27 12:08:17 +0000 @@ -4,31 +4,8 @@ }); var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_concept" ) , "'")'; - // Are you sure you want to delete this? var i18n_adding_concept_failed = '$encoder.jsEscape( $i18n.getString( "adding_concept_failed" ) , "'")'; var i18n_saving_concept_failed = '$encoder.jsEscape( $i18n.getString( "saving_concept_failed" ) , "'")'; - - - // ----------------------------------------------------------------------------- - // View details - // ----------------------------------------------------------------------------- - - function showConceptDetails( conceptId ) - { - jQuery.post( 'getConcept.action', { id : conceptId }, function( json ) { - setInnerHTML( 'nameField', json.concept.name ); - showDetails(); - }); - } - - // ----------------------------------------------------------------------------- - // Remove category concept - // ----------------------------------------------------------------------------- - - function removeConcept( conceptId, conceptName ) - { - removeItem( conceptId, conceptName, i18n_confirm_delete, 'removeConcept.action' ); - }

$i18n.getString( "concept_management" ) #openHelp( "concept" )