dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18187
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7570: Fix bug validate for data-value in Tabular report.
------------------------------------------------------------
revno: 7570
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-07-11 11:13:56 +0700
message:
Fix bug validate for data-value in Tabular report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm
--
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-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-09 08:32:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-07-11 04:13:56 +0000
@@ -372,4 +372,7 @@
remove_empty_events = Remove Empty events
true_value = true
false_value = false
-patients = persons
\ No newline at end of file
+patients = persons
+saving = Saving
+renaming = Renaming
+deleting = Deleting
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-07-10 08:10:27 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-07-11 04:13:56 +0000
@@ -219,7 +219,8 @@
if (selected.length) {
var array = [];
Ext.Array.each(selected, function(item) {
- array.push({id: item, name: a.store.getAt(a.store.findExact('id', item)).data.name});
+ var data = a.store.findExact('id', item);
+ array.push({id: item, name: a.store.getAt(data).data.name, compulsory: a.store.getAt(data).data.compulsory, valueType: a.store.getAt(data).data.valueType});
});
s.store.add(array);
}
@@ -232,7 +233,7 @@
{
if( elements[i].style.display != 'none' )
{
- array.push({id: a.store.getAt(i).data.id, name: a.store.getAt(i).data.name});
+ array.push({id: a.store.getAt(i).data.id, name: a.store.getAt(i).data.name, compulsory: a.store.getAt(i).data.compulsory, valueType: a.store.getAt(i).data.valueType});
}
}
s.store.add(array);
@@ -254,7 +255,7 @@
Ext.Array.each(s.store.data.items, function(item) {
if( elements[index].style.display != 'none' )
{
- arr.push( item.data.id );
+ array.push({id: a.store.getAt(i).data.id, name: a.store.getAt(i).data.name, compulsory: a.store.getAt(i).data.compulsory, valueType: a.store.getAt(i).data.valueType});
}
index++;
});
@@ -1129,7 +1130,7 @@
grid.getView().getNode(e.rowIdx).classList.remove('hidden');
var oldValue = e.originalValue;
- var value = e.value;
+ var value = e.column.field.rawValue;
if( value == oldValue)
{
return false;
@@ -1431,8 +1432,7 @@
},
validateedit: function( editor, e, eOpts )
{
- var newValue = editor.editors.items[editor.editors.items.length-1].field.rawValue;
- if( e.column.compulsory && newValue =='' )
+ if( e.column.compulsory && e.value =='' )
{
TR.util.notification.error( TR.i18n.not_empty, TR.i18n.not_empty );
return false;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm 2012-07-02 11:06:31 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm 2012-07-11 04:13:56 +0000
@@ -15,8 +15,8 @@
["$!encoder.jsonEncode( ${suggestedValue} )"]
#if( $velocityCount < $suggestedValues.size() ),#end
#end],
- "name": "$col.name",
- "hidden": "$col.hidden"
+ "name": "$!col.name",
+ "hidden": "$!col.hidden"
}#if( $velocityCount < $noHeader ),#end
#set($index = $index + 1)
#end