dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #02919
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 962: Minor fixed
------------------------------------------------------------
revno: 962
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Tue 2009-11-03 17:17:35 +0700
message:
Minor fixed
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/javascript/category.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/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java 2009-10-20 12:49:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/java/org/hisp/dhis/dd/action/category/ValidateDataElementCategoryAction.java 2009-11-03 10:17:35 +0000
@@ -93,7 +93,7 @@
public String execute()
{
- if ( name == null )
+ if ( name == null || name.isEmpty() )
{
message = i18n.getString( "specify_name" );
@@ -101,15 +101,6 @@
}
else
{
- name = name.trim();
-
- if ( name.length() == 0 )
- {
- message = i18n.getString( "specify_name" );
-
- return INPUT;
- }
-
DataElementCategory match = dataElementCategoryService.getDataElementCategoryByName( name );
if ( match != null && (id == null || match.getId() != id) )
@@ -119,9 +110,8 @@
return INPUT;
}
}
-
message = "ok";
-
+
return SUCCESS;
}
}
=== 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 09:05:08 +0000
+++ 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
@@ -61,6 +61,7 @@
}
else
{
+ hideById( "message" );
addOption( 'categoryOptionNames', categoryName, categoryName );
document.getElementById( 'categoryOptionName' ).value = "";
}