dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17662
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7110: (patient) Tabular report (WIP).
------------------------------------------------------------
revno: 7110
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-05-31 11:02:09 +0700
message:
(patient) Tabular report (WIP).
modified:
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/css/style.css
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm
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/webapp/dhis-web-caseentry/app/app.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-05-30 15:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/app.js 2012-05-31 04:02:09 +0000
@@ -511,14 +511,9 @@
else {
storePatientProperty.load({params: {programId: f.programId}});
}
+
}
- // Program stage
- var storeProgramStage = TR.store.programStage;
- storeProgramStage.parent = f.programStageId;
- storeProgramStage.load({params: {programId: f.programId}});
- Ext.getCmp('programStageCombobox').setValue( f.programStageId );
-
// Data element
TR.store.dataelement.selected.removeAll();
if (f.dataElements) {
@@ -527,17 +522,28 @@
}
TR.store.dataelement.selected.add(TR.cmp.params.dataelement.objects);
- var store = TR.store.dataelement.available;
- store.parent = f.programStageId;
- if (TR.util.store.containsParent(store)) {
- TR.util.store.loadFromStorage(store);
- TR.util.multiselect.filterAvailable(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
- }
- else {
- store.load({params: {programStageId: f.programStageId}});
+ if( f.singleEvent == 'false' )
+ {
+ var store = TR.store.dataelement.available;
+ store.parent = f.programStageId;
+ if (TR.util.store.containsParent(store)) {
+ TR.util.store.loadFromStorage(store);
+ TR.util.multiselect.filterAvailable(TR.cmp.params.dataelement.available, TR.cmp.params.dataelement.selected);
+ }
+ else {
+ store.load({params: {programStageId: f.programStageId}});
+ }
}
}
+ // Program stage
+ var storeProgramStage = TR.store.programStage;
+ storeProgramStage.parent = f.programStageId;
+ storeProgramStage.isLoadFromFavorite = true;
+ storeProgramStage.load({params: {programId: f.programId}});
+
+ Ext.getCmp('programStageCombobox').setValue( f.programStageId );
+
TR.cmp.params.organisationunit.treepanel.getSelectionModel().deselectAll();
TR.exe.execute();
}
@@ -588,6 +594,7 @@
root: 'programStages'
}
},
+ isLoadFromFavorite: false,
listeners:{
load: function(s) {
Ext.override(Ext.LoadMask, {
@@ -607,8 +614,11 @@
Ext.getCmp('programStageCombobox').setValue( programStageId );
var store = TR.store.dataelement.available;
TR.store.dataelement.available.loadData([],false);
- TR.store.dataelement.selected.loadData([],false);
- store.parent =programStageId;
+ if( !TR.store.programStage.isLoadFromFavorite)
+ {
+ TR.store.dataelement.selected.loadData([],false);
+ }
+ store.parent = programStageId;
if (TR.util.store.containsParent(store)) {
TR.util.store.loadFromStorage(store);
@@ -710,7 +720,6 @@
else
{
TR.util.mask.showMask(TR.cmp.region.center, TR.i18n.loading);
-
Ext.Ajax.request({
url: url,
method: "POST",
@@ -970,6 +979,7 @@
},
view: function( psiId )
{
+ TR.util.mask.showMask(TR.cmp.region.center, TR.i18n.loading);asdf
var params = 'programStageInstanceId=' + psiId;
Ext.Ajax.request({
url: TR.conf.finals.ajax.path_commons + TR.conf.finals.ajax.datavalue_view,
@@ -987,6 +997,7 @@
htmlWindow.update(response.responseText);
document.getElementById('programDiv').style.display = 'none';
+ TR.util.mask.hideMask();
}
});
},
@@ -1024,7 +1035,6 @@
cols[index] = {
header: TR.value.columns[index].name,
dataIndex: 'id',
- width: 50,
height: TR.conf.layout.east_gridcolumn_height,
sortable: false,
draggable: false,
@@ -1035,7 +1045,6 @@
cols[++index] = {
header: TR.value.columns[index].name,
dataIndex: 'col' + index,
- width: 50,
height: TR.conf.layout.east_gridcolumn_height,
sortable: false,
draggable: false,
@@ -1432,6 +1441,7 @@
TR.store.dataelement.available.removeAll();
TR.store.dataelement.selected.removeAll();
storeProgramStage.parent = pId;
+ TR.store.dataelement.isLoadFromFavorite = false;
storeProgramStage.load({params: {programId: pId}});
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css 2012-05-30 15:51:44 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/app/css/style.css 2012-05-31 04:02:09 +0000
@@ -716,118 +716,4 @@
.tr-menu-item-desc {
background-image:url('../images/hmenu-desc.gif');
-}
-
-
-
-
-
-
-
-
-/*----------------------------------------------------------------------------*/
-/* For data entry form */
-/*----------------------------------------------------------------------------*/
-
-.entryScreen
-{
- margin-bottom:20px;
- width:60%;
- font-size: 13px;
- line-height:18px;
-}
-
-input.inputText
-{
- width:220px;
- text-align:center;
-}
-
-select.inputText
-{
- width:225px;
- text-align:center;
-}
-
-input.optionset
-{
- width:195px;
- text-align:center;
-}
-
-.text-column
-{
- text-align:left;
- padding-right:20px;
- padding-left:5px;
-}
-
-.hidden
-{
- display: none;
-}
-
-.visible
-{
- display: block;
-}
-
-/*----------------------------------------------------------------------------*/
-/* For Program Stages History/Plan */
-/*----------------------------------------------------------------------------*/
-
-td.row
-{
- border-bottom-style:dotted;
-}
-
-table.history
-{
- width:350px;
- margin-left:10px;
- margin-top:10px;
- margin-right:10px;
- margin-bottom:10px;
-}
-
-div#currentSelection
-{
- float:right;
- color: black;
- font-size: 12px;
-}
-
-/*----------------------------------------------------------------------------*/
-/* Action fiels in entry form */
-/*----------------------------------------------------------------------------*/
-
-input.button
-{
- width: 150px;
- padding-left:5px;
- padding-right:5px;
-}
-
-.criteria
-{
- width:350px;
- padding-left:5px;
-}
-
-.inputWidth
-{
- width:350px;
-}
-
-div.actions
-{
- float: right;
- width: 170px;
- text-align: right;
-}
-
-.small-button {
- font-size: .8em !important;
-}
-
-.ui-autocomplete { height: 100px; overflow-y: scroll; overflow-x: hidden;}
\ No newline at end of file
+}
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2012-05-29 09:23:37 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReport.vm 2012-05-31 04:02:09 +0000
@@ -3,6 +3,12 @@
"name": "$!encoder.jsonEncode( ${tabularReport.name} )",
"lastUpdated": "$!format.formatDate( ${tabularReport.lastUpdated} )",
"programId": "${tabularReport.programStage.program.id}",
+ "singleEvent":
+ #if($tabularReport.programStage.program.programStages.size() == 1 )
+ "true",
+ #else
+ "false",
+ #end
"type": "${tabularReport.programStage.program.type}",
"programStageId": "${tabularReport.programStage.id}",
"programStageName": "${tabularReport.programStage.name}",
=== 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-05-28 16:54:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/jsonTabularReportResult.vm 2012-05-31 04:02:09 +0000
@@ -9,7 +9,6 @@
#foreach( $col in $grid.getHeaders() )
{
#set( $mapIndx = $index - $metaData )
- "sfas": "$grid.getHeaders().size()",
"valueType": #if( $index > $metaData && $mapSuggestedValues.get($mapIndx).size() > 0 )
"combobox"
#else