dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #13082
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4139: Import/Export - Fixed bug when press on "Match to exsisting" if neither item selected in the list...
------------------------------------------------------------
revno: 4139
committer: Hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-07-14 15:31:33 +0700
message:
Import/Export - Fixed bug when press on "Match to exsisting" if neither item selected in the list of "Existing objects".
modified:
dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/object/MatchObjectAction.java
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties
dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module_vi_VN.properties
dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.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-importexport/src/main/java/org/hisp/dhis/importexport/action/object/MatchObjectAction.java'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/object/MatchObjectAction.java 2011-05-31 06:27:22 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/java/org/hisp/dhis/importexport/action/object/MatchObjectAction.java 2011-07-14 08:31:33 +0000
@@ -100,6 +100,7 @@
// ---------------------------------------------------------------------
// Verify import configuration
// ---------------------------------------------------------------------
+
importFormat = getCurrentRunningProcessImportFormat();
if ( importFormat != null && importFormat.equals( "DHIS14FILE" ) )
@@ -113,6 +114,7 @@
return "dhis14";
}
}
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2011-07-13 11:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module.properties 2011-07-14 08:31:33 +0000
@@ -394,4 +394,5 @@
intro_metadata_export = Export meta data to the DHIS 2 exchange format. Meta meta implies data elements and other objects describing the data.
intro_detailed_metadata_export = Do a detailed meta data export of data elements and indicators to the DHIS 2 exchange format.
intro_export_to_other_systems = Export data and meta data to formats such as PDF, Excel and DHIS 1.4.
-intro_dhis14_file_configuration = Set the configuration for the DHIS 1.4 file import process, such as the location of the data file.
\ No newline at end of file
+intro_dhis14_file_configuration = Set the configuration for the DHIS 1.4 file import process, such as the location of the data file.
+no_item_to_match = Sorry, there is no any selected item to match.
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module_vi_VN.properties'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module_vi_VN.properties 2011-04-04 05:42:40 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/resources/org/hisp/dhis/importexport/i18n_module_vi_VN.properties 2011-07-14 08:31:33 +0000
@@ -271,4 +271,5 @@
accept_incoming_records=Ch\u1ea5p nh\u1eadn nh\u1eefng m\u1eabu tin nh\u1eadp v\u00e0o
a_datavalue_without_a_value_and_comment_was_ignored=M\u1ed9t gi\u00e1 tr\u1ecb d\u1eef li\u1ec7u kh\u00f4ng c\u00f3 gi\u00e1 tr\u1ecb ho\u1eb7c ch\u00fa th\u00edch s\u1ebd b\u1ecb l\u1edd \u0111i
IXF_import=Nh\u1eadp IXF
-DHIS14_import=Nh\u1eadp gi\u00e1 tr\u1ecb t\u1eeb DHIS 1.4
\ No newline at end of file
+DHIS14_import=Nh\u1eadp gi\u00e1 tr\u1ecb t\u1eeb DHIS 1.4
+no_item_to_match=Xin l\u1ed7i, kh\u00f4ng c\u00f3 ph\u1ea7n t\u1eed n\u00e0o \u0111\u01b0\u1ee3c ch\u1ecdn \u0111\u1ec3 so kh\u1edbp.
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js'
--- dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js 2011-07-13 11:32:13 +0000
+++ dhis-2/dhis-web/dhis-web-importexport/src/main/webapp/dhis-web-importexport/javascript/import.js 2011-07-14 08:31:33 +0000
@@ -386,11 +386,20 @@
var existingObjects = document.getElementById( "existingObjects" );
- var existingObjectId = existingObjects.options[ existingObjects.selectedIndex ].value;
+ var selectedIndex = existingObjects.selectedIndex;
- if ( importObjectId != null && existingObjectId != null )
- {
- window.location.href = "matchObject.action?importObjectId=" + importObjectId + "&existingObjectId=" + existingObjectId;
+ if ( selectedIndex == -1 )
+ {
+ showWarningMessage( i18n_no_item_to_match );
+ }
+ else
+ {
+ var existingObjectId = existingObjects.options[ selectedIndex ].value;
+
+ if ( importObjectId != null && existingObjectId != null )
+ {
+ window.location.href = "matchObject.action?importObjectId=" + importObjectId + "&existingObjectId=" + existingObjectId;
+ }
}
}
@@ -473,7 +482,7 @@
// -------------------------------------------------------------------------
function handleField( discardedElements, spanName, tdName )
-{
+{alert(discardedElements + ", " + spanName + ", " + tdName);
var existingElements = document.getElementById( spanName ).innerHTML;
existingElements = existingElements - discardedElements;