dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21356
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10079: Minor fix for patient attribute and tabular report.
------------------------------------------------------------
revno: 10079
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-08 20:56:13 +0700
message:
Minor fix for patient attribute and tabular report.
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.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-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 2013-03-07 04:29:17 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2013-03-08 13:56:13 +0000
@@ -1316,9 +1316,9 @@
Ext.getCmp('aggregateType').items.items[0].setValue(true);
}
- if( TR.store.dataelement.available.data.items.length == 0 )
+ if( TR.store.groupbyDataelement.data.items.length == 0 )
{
- TR.store.dataelement.available.add(
+ TR.store.groupbyDataelement.add(
{'value': f.deGroupBy,'name': f.deGroupByName}
);
}
@@ -1466,6 +1466,19 @@
});
}
});
+
+ TR.store.groupbyDataelement.loadData([],false);
+ TR.store.groupbyDataelement.add({
+ 'id': '',
+ 'name': TR.i18n.please_select
+ });
+
+ TR.cmp.params.dataelement.available.store.each( function(r) {
+ TR.store.groupbyDataelement.add({
+ 'id': r.data.id,
+ 'name': r.data.name
+ });
+ });
}
}
}),
@@ -1572,6 +1585,10 @@
aggregateDataelement: Ext.create('Ext.data.Store', {
fields: ['id', 'name'],
data: []
+ }),
+ groupbyDataelement: Ext.create('Ext.data.Store', {
+ fields: ['id', 'name'],
+ data: []
})
}
@@ -4541,6 +4558,7 @@
emptyText: TR.i18n.please_select,
queryMode: 'local',
editable: true,
+ typeAhead: true,
valueField: 'id',
displayField: 'name',
width: TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor - 40,
@@ -4616,14 +4634,20 @@
labelWidth: 135,
emptyText: TR.i18n.please_select,
queryMode: 'local',
+ typeAhead: true,
editable: true,
valueField: 'id',
displayField: 'name',
width: TR.conf.layout.west_fieldset_width - TR.conf.layout.west_width_subtractor - 40,
- store: TR.store.dataelement.available,
+ store: TR.store.groupbyDataelement,
listeners: {
added: function() {
TR.cmp.settings.dataElementGroupBy = this;
+ },
+ select: function(cb) {
+ if(cb.getValue() != null && cb.getValue()!=''){
+ Ext.getCmp('positionDataCbx').setValue( 1 );
+ }
}
}
},
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-03-08 13:27:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-03-08 13:56:13 +0000
@@ -57,23 +57,6 @@
<td><span id="attrMessage" name="attrMessage" style="color:red;"></span></td>
</tr>
- <tr id="calculatedAttrTR" class="hidden">
- <td>$i18n.getString( "properties" )</td>
- <td>
- <select multiple id="availableAttribute" name="availableAttribute" ondblclick="insertTextCommon( 'expression', this.value);getConditionDescription();"></select>
- </td>
- </tr>
-
- <tr id="descriptionTR" class="hidden">
- <td></td>
- <td>
- <fieldset>
- <legend>$i18n.getString( "description" )</legend>
- <div id='expDescription' style="width:320px;">$!description</div>
- </fieldset>
- </td>
- </tr>
-
</tbody>
<tr>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-03-08 13:27:22 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-03-08 13:56:13 +0000
@@ -33,7 +33,6 @@
{
if ( jQuery(this_).val() == "combo" )
{
- hideById("calculatedAttrTR");
showById("attributeComboRow");
if( jQuery("#attrOptionContainer").find("input").length ==0 )
{
@@ -64,12 +63,10 @@
});
}
hideById("attributeComboRow");
- showById("calculatedAttrTR");
}
else
{
hideById("attributeComboRow");
- hideById("calculatedAttrTR");
}
},