dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #25243
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12469: (PT) New option: Show organisation unit hierarchy.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 12469 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-10-07 14:41:25 +0200
message:
(PT) New option: Show organisation unit hierarchy.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js
dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module.properties
dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module_fr.properties
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/index.html
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/i18n.vm
dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/jsonInitialize.vm
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.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-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-08-23 15:56:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/reporttable/ReportTable.java 2013-10-07 12:09:21 +0000
@@ -199,6 +199,11 @@
*/
private MapLegendSet legendSet;
+ /**
+ * Indicates showing organisation unit hierarchy names.
+ */
+ private boolean showHierarchy;
+
// -------------------------------------------------------------------------
// Transient properties
// -------------------------------------------------------------------------
@@ -944,6 +949,19 @@
this.legendSet = legendSet;
}
+ @JsonProperty
+ @JsonView( {DetailedView.class, ExportView.class, DimensionalView.class} )
+ @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0)
+ public boolean isShowHierarchy()
+ {
+ return showHierarchy;
+ }
+
+ public void setShowHierarchy( boolean showHierarchy )
+ {
+ this.showHierarchy = showHierarchy;
+ }
+
// -------------------------------------------------------------------------
// Get- and set-methods for transient properties
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-10-03 14:24:37 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableAlteror.java 2013-10-07 12:09:21 +0000
@@ -443,6 +443,7 @@
executeSql( "update reporttable set digitgroupseparator = 'space' where digitgroupseparator is null" );
executeSql( "update reporttable set sortorder = 0 where sortorder is null" );
executeSql( "update reporttable set toplimit = 0 where toplimit is null" );
+ executeSql( "update reporttable set showhierarchy = false where showhierarchy is null" );
executeSql( "update chart set reportingmonth = false where reportingmonth is null" );
executeSql( "update chart set reportingbimonth = false where reportingbimonth is null" );
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2013-09-17 16:22:09 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/org/hisp/dhis/reporttable/hibernate/ReportTable.hbm.xml 2013-10-07 12:09:21 +0000
@@ -162,6 +162,8 @@
<many-to-one name="legendSet" class="org.hisp.dhis.mapping.MapLegendSet" column="legendsetid"
foreign-key="fk_reporttable_legendsetid" />
+ <property name="showHierarchy" />
+
<!-- Access properties -->
<property name="externalAccess" />
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-10-02 12:52:37 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2013-10-03 11:29:17 +0000
@@ -1043,6 +1043,8 @@
viewDim,
srcIds,
srcDim;
+
+ loader.zoomToVisibleExtent = true;
if (!src) {
if (doExecute) {
@@ -1081,6 +1083,8 @@
}
// data
+ loader.zoomToVisibleExtent = false;
+
viewIds = [];
viewDim = view.columns[0];
srcIds = [];
@@ -1139,25 +1143,32 @@
}
// legend
- if (typeof view.legendSet !== typeof src.legendSet) {
- if (doExecute) {
- loadLegend(view);
- }
+ //if (typeof view.legendSet !== typeof src.legendSet) {
+ //if (doExecute) {
+ //loadLegend(view);
+ //}
+ //return gis.conf.finals.widget.loadtype_legend;
+ //}
+ //else if (view.classes !== src.classes ||
+ //view.method !== src.method ||
+ //view.colorLow !== src.colorLow ||
+ //view.radiusLow !== src.radiusLow ||
+ //view.colorHigh !== src.colorHigh ||
+ //view.radiusHigh !== src.radiusHigh) {
+ //if (doExecute) {
+ //loadLegend(view);
+ //}
+ //return gis.conf.finals.widget.loadtype_legend;
+ //}
+
+ // if no changes - reload legend but do not zoom
+ if (doExecute) {
+ loader.zoomToVisibleExtent = false;
+ loadLegend(view);
return gis.conf.finals.widget.loadtype_legend;
}
- else if (view.classes !== src.classes ||
- view.method !== src.method ||
- view.colorLow !== src.colorLow ||
- view.radiusLow !== src.radiusLow ||
- view.colorHigh !== src.colorHigh ||
- view.radiusHigh !== src.radiusHigh) {
- if (doExecute) {
- loadLegend(view);
- }
- return gis.conf.finals.widget.loadtype_legend;
- }
- gis.olmap.mask.hide();
+ //gis.olmap.mask.hide();
};
loadOrganisationUnits = function(view) {
@@ -1335,7 +1346,7 @@
}
// Period name without changing the id
- view.filters[0].items[0].name = metaData.names[gis.response.metaData['pe'][0]];
+ view.filters[0].items[0].name = metaData.names[gis.response.metaData[dimConf.period.objectName][0]];
};
fn = function() {
@@ -1482,7 +1493,13 @@
loader;
compareView = function(view, doExecute) {
- var src = layer.core.view;
+ var src = layer.core.view,
+ viewIds,
+ viewDim,
+ srcIds,
+ srcDim;
+
+ loader.zoomToVisibleExtent = true;
if (!src) {
if (doExecute) {
@@ -1490,6 +1507,38 @@
}
return gis.conf.finals.widget.loadtype_organisationunit;
}
+
+ // organisation units
+ viewIds = [];
+ viewDim = view.rows[0];
+ srcIds = [];
+ srcDim = src.rows[0];
+
+ if (viewDim.items.length === srcDim.items.length) {
+ for (var i = 0; i < viewDim.items.length; i++) {
+ viewIds.push(viewDim.items[i].id);
+ }
+
+ for (var i = 0; i < srcDim.items.length; i++) {
+ srcIds.push(srcDim.items[i].id);
+ }
+
+ if (Ext.Array.difference(viewIds, srcIds).length !== 0) {
+ if (doExecute) {
+ loadOrganisationUnits(view);
+ }
+ return gis.conf.finals.widget.loadtype_organisationunit;
+ }
+ }
+ else {
+ if (doExecute) {
+ loadOrganisationUnits(view);
+ }
+ return gis.conf.finals.widget.loadtype_organisationunit;
+ }
+
+ // Group set
+ loader.zoomToVisibleExtent = false;
if (view.organisationUnitGroupSet.id !== src.organisationUnitGroupSet.id) {
if (doExecute) {
@@ -1498,28 +1547,20 @@
return gis.conf.finals.widget.loadtype_organisationunit;
}
- if (view.organisationUnitLevel.id !== src.organisationUnitLevel.id) {
- if (doExecute) {
- loadOrganisationUnits(view);
- }
- return gis.conf.finals.widget.loadtype_organisationunit;
- }
-
- if (view.parentOrganisationUnit.id !== src.parentOrganisationUnit.id) {
- if (doExecute) {
- loadOrganisationUnits(view);
- }
- return gis.conf.finals.widget.loadtype_organisationunit;
- }
-
- if (view.areaRadius !== src.areaRadius) {
- if (doExecute) {
- loadLegend(view);
- }
+ //if (view.areaRadius !== src.areaRadius) {
+ //if (doExecute) {
+ //loadLegend(view);
+ //}
+ //return gis.conf.finals.widget.loadtype_legend;
+ //}
+
+ // always reload legend
+ if (doExecute) {
+ loadLegend(view);
return gis.conf.finals.widget.loadtype_legend;
}
- gis.olmap.mask.hide();
+ //gis.olmap.mask.hide();
};
loadOrganisationUnits = function(view) {
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module.properties 2013-09-30 12:20:27 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module.properties 2013-10-07 12:39:55 +0000
@@ -130,4 +130,5 @@
details=Details
select_boundaries_and_groups=Select boundaries and groups
select_organisation_unit_groups=Select organisation unit groups
-allow_external_access=Allow external access
\ No newline at end of file
+allow_external_access=Allow external access
+show_hierarchy=Show hierarchy
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module_fr.properties'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module_fr.properties 2013-09-30 12:20:27 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/resources/org/hisp/dhis/pivot/i18n_module_fr.properties 2013-10-07 12:39:55 +0000
@@ -122,4 +122,5 @@
select_organisation_unit_level=S\u00E9lectionner le niveau de l'unit\u00E9 d'organisation
details=D\u00E9tails
totals=Totaux
-allow_external_access=Permettre l'acc\u00E8s externe
\ No newline at end of file
+allow_external_access=Permettre l'acc\u00E8s externe
+show_hierarchy=Montrer la hi\u00E9rarchie
\ No newline at end of file
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/index.html'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/index.html 2013-08-12 06:32:41 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/index.html 2013-10-04 10:54:50 +0000
@@ -11,14 +11,11 @@
</head>
<body>
- <script>var PT = {};</script>
-
<script src="../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
<script src="../../dhis-web-commons/javascripts/ext-ux/layout/component/form/MultiSelect.js"></script>
<script src="../../dhis-web-commons/javascripts/ext-ux/form/MultiSelect.js"></script>
<script src="../../dhis-web-commons/javascripts/periodTypeNoDep.js"></script>
- <script src="i18n.action"></script>
<script src="scripts/core.js"></script>
<script src="scripts/app.js"></script>
</body>
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-09-30 12:45:28 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2013-10-07 12:39:55 +0000
@@ -240,22 +240,22 @@
layout;
if (id) {
- engine.loadTable(id, pt);
+ engine.loadTable(id, pt, true, true);
}
else if (Ext.isString(session) && PT.isSessionStorage && Ext.isObject(JSON.parse(sessionStorage.getItem('dhis2'))) && session in JSON.parse(sessionStorage.getItem('dhis2'))) {
layout = api.layout.Layout(JSON.parse(sessionStorage.getItem('dhis2'))[session]);
if (layout) {
- pt.viewport.setFavorite(layout);
+ pt.engine.createTable(layout, pt, true);
}
}
// Fade in
Ext.defer( function() {
Ext.getBody().fadeIn({
- duration: 400
+ duration: 300
});
- }, 500 );
+ }, 400 );
};
}());
@@ -922,6 +922,7 @@
var showTotals,
showSubTotals,
hideEmptyRows,
+ showHierarchy,
digitGroupSeparator,
displayDensity,
fontSize,
@@ -933,6 +934,7 @@
style,
parameters,
+ comboboxWidth = 262,
window;
showTotals = Ext.create('Ext.form.field.Checkbox', {
@@ -955,10 +957,16 @@
});
pt.viewport.hideEmptyRows = hideEmptyRows;
+ showHierarchy = Ext.create('Ext.form.field.Checkbox', {
+ boxLabel: PT.i18n.show_hierarchy,
+ style: 'margin-bottom:4px'
+ });
+ pt.viewport.showHierarchy = showHierarchy;
+
displayDensity = Ext.create('Ext.form.field.ComboBox', {
cls: 'pt-combo',
style: 'margin-bottom:3px',
- width: 250,
+ width: comboboxWidth,
labelWidth: 130,
fieldLabel: PT.i18n.display_density,
labelStyle: 'color:#333',
@@ -980,7 +988,7 @@
fontSize = Ext.create('Ext.form.field.ComboBox', {
cls: 'pt-combo',
style: 'margin-bottom:3px',
- width: 250,
+ width: comboboxWidth,
labelWidth: 130,
fieldLabel: PT.i18n.font_size,
labelStyle: 'color:#333',
@@ -1003,7 +1011,7 @@
labelStyle: 'color:#333',
cls: 'pt-combo',
style: 'margin-bottom:3px',
- width: 250,
+ width: comboboxWidth,
labelWidth: 130,
fieldLabel: PT.i18n.digit_group_separator,
queryMode: 'local',
@@ -1024,7 +1032,7 @@
legendSet = Ext.create('Ext.form.field.ComboBox', {
cls: 'pt-combo',
style: 'margin-bottom:3px',
- width: 250,
+ width: comboboxWidth,
labelWidth: 130,
fieldLabel: PT.i18n.legend_set,
valueField: 'id',
@@ -1089,7 +1097,7 @@
topLimit = Ext.create('Ext.form.field.ComboBox', {
cls: 'pt-combo',
- style: 'margin-bottom:3px',
+ style: 'margin-bottom:0',
width: 250,
labelWidth: 130,
fieldLabel: PT.i18n.top_limit,
@@ -1121,6 +1129,14 @@
hideEmptyRows
]
};
+
+ organisationUnits = {
+ bodyStyle: 'border:0 none',
+ style: 'margin-left:14px',
+ items: [
+ showHierarchy
+ ]
+ };
style = {
bodyStyle: 'border:0 none',
@@ -1134,7 +1150,7 @@
};
parameters = {
- bodyStyle: 'border:0 none',
+ bodyStyle: 'border:0 none; background:transparent',
style: 'margin-left:14px',
items: [
reportingPeriod,
@@ -1149,7 +1165,7 @@
window = Ext.create('Ext.window.Window', {
title: PT.i18n.table_options,
- bodyStyle: 'background-color:#fff; padding:8px 8px 8px',
+ bodyStyle: 'background-color:#fff; padding:5px',
closeAction: 'hide',
autoShow: true,
modal: true,
@@ -1160,6 +1176,7 @@
showTotals: showTotals.getValue(),
showSubTotals: showSubTotals.getValue(),
hideEmptyRows: hideEmptyRows.getValue(),
+ showHierarchy: showHierarchy.getValue(),
displayDensity: displayDensity.getValue(),
fontSize: fontSize.getValue(),
digitGroupSeparator: digitGroupSeparator.getValue(),
@@ -1177,6 +1194,7 @@
showTotals.setValue(Ext.isBoolean(layout.showTotals) ? layout.showTotals : true);
showSubTotals.setValue(Ext.isBoolean(layout.showSubTotals) ? layout.showSubTotals : true);
hideEmptyRows.setValue(Ext.isBoolean(layout.hideEmptyRows) ? layout.hideEmptyRows : false);
+ showHierarchy.setValue(Ext.isBoolean(layout.showHierarchy) ? layout.showHierarchy : false);
displayDensity.setValue(Ext.isString(layout.displayDensity) ? layout.displayDensity : 'normal');
fontSize.setValue(Ext.isString(layout.fontSize) ? layout.fontSize : 'normal');
digitGroupSeparator.setValue(Ext.isString(layout.digitGroupSeparator) ? layout.digitGroupSeparator : 'space');
@@ -1192,7 +1210,7 @@
items: [
{
bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold',
- style: 'margin-bottom:6px',
+ style: 'margin-bottom:6px; margin-left:2px',
html: PT.i18n.data
},
data,
@@ -1201,19 +1219,32 @@
},
{
bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold',
- style: 'margin-bottom:6px',
+ style: 'margin-bottom:6px; margin-left:2px',
+ html: PT.i18n.organisation_units
+ },
+ organisationUnits,
+ {
+ bodyStyle: 'border:0 none; padding:7px'
+ },
+ {
+ bodyStyle: 'border:0 none; color:#222; font-size:12px; font-weight:bold',
+ style: 'margin-bottom:6px; margin-left:2px',
html: PT.i18n.style
},
style,
{
- bodyStyle: 'border:0 none; padding:7px'
+ bodyStyle: 'border:0 none; padding:4px'
},
{
- bodyStyle: 'border:0 none; color:#222; font-size:12px',
- style: 'margin-bottom:6px',
- html: '<b>' + PT.i18n.parameters + '</b> <span style="font-size:11px"> (' + PT.i18n.for_standard_reports_only + ')</span>'
- },
- parameters
+ bodyStyle: 'border:1px solid #d5d5d5; padding:5px; background-color:#f0f0f0',
+ items: [
+ {
+ bodyStyle: 'border:0 none; padding:0 5px 6px 2px; background-color:transparent; color:#222; font-size:12px',
+ html: '<b>' + PT.i18n.parameters + '</b> <span style="font-size:11px"> (' + PT.i18n.for_standard_reports_only + ')</span>'
+ },
+ parameters
+ ]
+ }
],
bbar: [
'->',
@@ -1554,7 +1585,7 @@
element.addClsOnOver('link');
element.load = function() {
favoriteWindow.hide();
- pt.engine.loadTable(record.data.id, pt);
+ pt.engine.loadTable(record.data.id, pt, true, true);
};
element.dom.setAttribute('onclick', 'Ext.get(this).load();');
}
@@ -2225,7 +2256,7 @@
westRegion,
centerRegion,
- setFavorite,
+ setGui,
viewport,
addListeners;
@@ -4409,12 +4440,12 @@
}
});
- setFavorite = function(layout) {
+ setGui = function(layout, updateGui, isFavorite) {
var dimConf = pt.conf.finals.dimension,
- xLayout,
- dimMap,
- recMap,
- graphMap,
+ dimensions = [].concat(layout.columns || [], layout.rows || [], layout.filters || []),
+ dimMap = pt.service.layout.getObjectNameDimensionMap(dimensions),
+ recMap = pt.service.layout.getObjectNameDimensionItemsMap(dimensions),
+ graphMap = layout.parentGraphMap,
objectName,
periodRecords,
fixedPeriodRecords = [],
@@ -4423,21 +4454,18 @@
isOuc = false,
isOugc = false,
levels = [],
- groups = [];
+ groups = [],
+ orgunits = [];
// State
- pt.viewport.interpretationButton.enable();
-
- // Create chart
- pt.engine.createTable(layout, pt);
+ downloadButton.enable();
+
+ if (isFavorite) {
+ interpretationButton.enable();
+ }
// Set gui
- xLayout = pt.engine.getExtendedLayout(layout);
- dimMap = xLayout.objectNameDimensionsMap;
- recMap = xLayout.objectNameItemsMap;
- graphMap = layout.parentGraphMap;
-
// Indicators
pt.store.indicatorSelected.removeAll();
objectName = dimConf.indicator.objectName;
@@ -4580,18 +4608,21 @@
if (ouRecords[i].id === 'USER_ORGUNIT') {
isOu = true;
}
- if (ouRecords[i].id === 'USER_ORGUNIT_CHILDREN') {
+ else if (ouRecords[i].id === 'USER_ORGUNIT_CHILDREN') {
isOuc = true;
}
- if (ouRecords[i].id === 'USER_ORGUNIT_GRANDCHILDREN') {
+ else if (ouRecords[i].id === 'USER_ORGUNIT_GRANDCHILDREN') {
isOugc = true;
}
- if (ouRecords[i].id.substr(0,5) === 'LEVEL') {
+ else if (ouRecords[i].id.substr(0,5) === 'LEVEL') {
levels.push(parseInt(ouRecords[i].id.split('-')[1]));
}
- if (ouRecords[i].id.substr(0,8) === 'OU_GROUP') {
+ else if (ouRecords[i].id.substr(0,8) === 'OU_GROUP') {
groups.push(parseInt(ouRecords[i].id.split('-')[1]));
}
+ else {
+ orgunits.push(ouRecords[i].id);
+ }
}
}
@@ -4609,14 +4640,17 @@
userOrganisationUnitChildren.setValue(isOuc);
userOrganisationUnitGrandChildren.setValue(isOugc);
}
-
- // If fav has organisation units, wait for tree callback before update
- if (recMap[dimConf.organisationUnit.objectName] && Ext.isObject(graphMap)) {
- treePanel.numberOfRecords = pt.util.object.getLength(graphMap);
-
- for (var i = 0, a = xLayout.objectNameItemsMap[dimConf.organisationUnit.objectName]; i < a.length; i++) {
- if (graphMap.hasOwnProperty(a[i].id)) {
- treePanel.multipleExpand(a[i].id, graphMap[a[i].id], false);
+
+ if (!(isOu || isOuc || isOugc)) {
+
+ // If fav has organisation units, wait for tree callback before update
+ if (Ext.isObject(graphMap)) {
+ treePanel.numberOfRecords = pt.util.object.getLength(graphMap);
+
+ for (var key in graphMap) {
+ if (graphMap.hasOwnProperty(key)) {
+ treePanel.multipleExpand(key, graphMap[key], false);
+ }
}
}
}
@@ -4640,7 +4674,7 @@
userOrganisationUnit: userOrganisationUnit,
userOrganisationUnitChildren: userOrganisationUnitChildren,
dataElementDetailLevel: dataElementDetailLevel,
- setFavorite: setFavorite,
+ setGui: setGui,
items: [
westRegion,
centerRegion
@@ -4697,7 +4731,11 @@
Ext.Ajax.request({
url: '../initialize.action',
success: function(r) {
- pt = PT.core.getInstance(Ext.decode(r.responseText));
+ var init = Ext.decode(r.responseText);
+
+ PT.i18n = init.i18n;
+
+ pt = PT.core.getInstance(init);
PT.app.extendInstance(pt);
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-09-25 15:50:46 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/core.js 2013-10-07 12:10:11 +0000
@@ -2,29 +2,22 @@
// ext config
Ext.Ajax.method = 'GET';
-
- // namespace
- if (!('PT' in window)) {
- PT = {
- i18n: {}
- };
- }
-
- // mode
- PT.isDebug = false;
-
- // html5
- PT.isSessionStorage = 'sessionStorage' in window && window['sessionStorage'] !== null;
-
- // core
-
- PT.core = {};
- PT.core.instances = [];
+
+ // pt
+ PT = {
+ core: {
+ instances: []
+ },
+ i18n: {},
+ isDebug: false,
+ isSessionStorage: 'sessionStorage' in window && window['sessionStorage'] !== null
+ };
PT.core.getInstance = function(init) {
var conf = {},
util = {},
api = {},
+ service = {},
engine = {},
dimConf;
@@ -488,7 +481,6 @@
// api
(function() {
api.layout = {};
- api.response = {};
api.layout.Record = function(config) {
var record = {};
@@ -773,6 +765,8 @@
layout.showTotals = Ext.isBoolean(config.totals) ? config.totals : (Ext.isBoolean(config.showTotals) ? config.showTotals : true);
layout.showSubTotals = Ext.isBoolean(config.subtotals) ? config.subtotals : (Ext.isBoolean(config.showSubTotals) ? config.showSubTotals : true);
layout.hideEmptyRows = Ext.isBoolean(config.hideEmptyRows) ? config.hideEmptyRows : false;
+
+ layout.showHierarchy = Ext.isBoolean(config.showHierarchy) ? config.showHierarchy : false;
layout.displayDensity = Ext.isString(config.displayDensity) && !Ext.isEmpty(config.displayDensity) ? config.displayDensity : 'normal';
layout.fontSize = Ext.isString(config.fontSize) && !Ext.isEmpty(config.fontSize) ? config.fontSize : 'normal';
@@ -802,6 +796,8 @@
}();
};
+ api.response = {};
+
api.response.Header = function(config) {
var header = {};
@@ -885,6 +881,45 @@
}();
};
}());
+
+ // service
+ (function() {
+ service.layout = {};
+
+ service.layout.getObjectNameDimensionMap = function(dimensionArray) {
+ var map = {};
+
+ if (Ext.isArray(dimensionArray) && dimensionArray.length) {
+ for (var i = 0, dim; i < dimensionArray.length; i++) {
+ dim = api.layout.Dimension(dimensionArray[i]);
+
+ if (dim) {
+ map[dim.dimension] = dim;
+ }
+ }
+ }
+
+ return map;
+ };
+
+ service.layout.getObjectNameDimensionItemsMap = function(dimensionArray) {
+ var map = {};
+
+ if (Ext.isArray(dimensionArray) && dimensionArray.length) {
+ for (var i = 0, dim; i < dimensionArray.length; i++) {
+ dim = api.layout.Dimension(dimensionArray[i]);
+
+ if (dim) {
+ map[dim.dimension] = dim.items;
+ }
+ }
+ }
+
+ return map;
+ };
+
+ service.response = {};
+ }());
// engine
(function() {
@@ -974,7 +1009,7 @@
if (layout.rows) {
for (var i = 0, dim, items, xDim; i < layout.rows.length; i++) {
- dim = layout.rows[i];
+ dim = Ext.clone(layout.rows[i]);
items = dim.items;
xDim = {};
@@ -1148,8 +1183,9 @@
}
};
- engine.createTable = function(layout, pt) {
+ engine.createTable = function(layout, pt, updateGui, isFavorite) {
var legendSet = layout.legendSet ? pt.init.idLegendSetMap[layout.legendSet.id] : null,
+ getItemName,
getSyncronizedXLayout,
getExtendedResponse,
getExtendedAxis,
@@ -1157,10 +1193,28 @@
setMouseHandlers,
getTableHtml,
initialize,
+ afterLoad,
tableUuid = pt.init.el + '_' + Ext.data.IdGenerator.get('uuid').generate(),
uuidDimUuidsMap = {},
uuidObjectMap = {};
+ getItemName = function(id, response, isHtml) {
+ var metaData = response.metaData,
+ name = '';
+
+ if (layout.showHierarchy && Ext.isObject(metaData.ouHierarchy) && metaData.ouHierarchy.hasOwnProperty(id)) {
+ var a = Ext.clean(metaData.ouHierarchy[id].split('/'));
+
+ for (var i = 0; i < a.length; i++) {
+ name += (isHtml ? '<span class="text-weak">' : '') + metaData.names[a[i]] + (isHtml ? '</span>' : '') + ' / ';
+ }
+ }
+
+ name += metaData.names[id];
+
+ return name;
+ };
+
getSyncronizedXLayout = function(xLayout, response) {
var removeDimensionFromXLayout,
getHeaderNames,
@@ -1255,7 +1309,7 @@
if (isUserOrgunit) {
userOu = [{
id: pt.init.user.ou,
- name: response.metaData.names[pt.init.user.ou]
+ name: getItemName(pt.init.user.ou, response)
}];
}
if (isUserOrgunitChildren) {
@@ -1264,7 +1318,7 @@
for (var j = 0; j < pt.init.user.ouc.length; j++) {
userOuc.push({
id: pt.init.user.ouc[j],
- name: response.metaData.names[pt.init.user.ouc[j]]
+ name: getItemName(pt.init.user.ouc[j], response)
});
}
@@ -1272,15 +1326,17 @@
}
if (isUserOrgunitGrandChildren) {
var userOuOuc = [].concat(pt.init.user.ou, pt.init.user.ouc),
- responseOu = response.metaData.ou;
+ responseOu = response.metaData[ou];
userOugc = [];
-
- for (var j = 0; j < responseOu.length; j++) {
- if (!Ext.Array.contains(userOuOuc, responseOu[j])) {
+
+ for (var i = 0, id; i < responseOu.length; i++) {
+ id = responseOu[i];
+
+ if (!Ext.Array.contains(userOuOuc, id)) {
userOugc.push({
- id: responseOu[j],
- name: response.metaData.names[responseOu[j]]
+ id: id,
+ name: getItemName(id, response)
});
}
}
@@ -1291,12 +1347,12 @@
dim.items = [].concat(userOu || [], userOuc || [], userOugc || []);
}
else if (isLevel || isGroup) {
- var responseOu = response.metaData.ou;
-
- for (var j = 0; j < responseOu.length; j++) {
+ for (var i = 0, responseOu = response.metaData[ou], id; i < responseOu.length; i++) {
+ id = responseOu[i];
+
dim.items.push({
- id: responseOu[j],
- name: response.metaData.names[responseOu[j]]
+ id: id,
+ name: getItemName(id, response)
});
}
@@ -1308,8 +1364,9 @@
}
else {
// Items: get ids from metadata -> items
- if (Ext.isArray(metaDataDim)) {
- for (var j = 0, ids = Ext.clone(response.metaData[dim.dimensionName]); j < ids.length; j++) {
+ if (metaDataDim) {
+ var ids = Ext.clone(response.metaData[dim.dimensionName]);
+ for (var j = 0; j < ids.length; j++) {
dim.items.push({
id: ids[j],
name: response.metaData.names[ids[j]]
@@ -1872,7 +1929,7 @@
obj.cls = 'pivot-dim';
obj.noBreak = false;
obj.hidden = !(obj.rowSpan || obj.colSpan);
- obj.htmlValue = xResponse.metaData.names[obj.id];
+ obj.htmlValue = getItemName(obj.id, xResponse, true);
dimHtml.push(getTdHtml(obj));
@@ -1938,7 +1995,7 @@
obj.cls = 'pivot-dim td-nobreak';
obj.noBreak = true;
obj.hidden = !(obj.rowSpan || obj.colSpan);
- obj.htmlValue = xResponse.metaData.names[obj.id];
+ obj.htmlValue = getItemName(obj.id, xResponse, true);
row.push(obj);
}
@@ -2366,6 +2423,52 @@
return getHtml(htmlArray);
};
+ afterLoad = function(layout, xLayout, xResponse) {
+
+ if (pt.isPlugin) {
+
+ // Resize render elements
+ var baseEl = Ext.get(pt.init.el),
+ baseElBorderW = parseInt(baseEl.getStyle('border-left-width')) + parseInt(baseEl.getStyle('border-right-width')),
+ baseElBorderH = parseInt(baseEl.getStyle('border-top-width')) + parseInt(baseEl.getStyle('border-bottom-width')),
+ baseElPaddingW = parseInt(baseEl.getStyle('padding-left')) + parseInt(baseEl.getStyle('padding-right')),
+ baseElPaddingH = parseInt(baseEl.getStyle('padding-top')) + parseInt(baseEl.getStyle('padding-bottom')),
+ el = Ext.get(tableUuid);
+
+ pt.viewport.centerRegion.setWidth(el.getWidth());
+ pt.viewport.centerRegion.setHeight(el.getHeight());
+ baseEl.setWidth(el.getWidth() + baseElBorderW + baseElPaddingW);
+ baseEl.setHeight(el.getHeight() + baseElBorderH + baseElPaddingH);
+ }
+ else {
+ if (PT.isSessionStorage) {
+ setMouseHandlers();
+ engine.setSessionStorage(layout, 'table');
+ }
+
+ if (updateGui) {
+ pt.viewport.setGui(layout, updateGui, isFavorite);
+ }
+ }
+
+ // Hide mask
+ util.mask.hideMask(pt.viewport.centerRegion);
+
+ // Add uuid maps to instance
+ pt.uuidDimUuidsMap = uuidDimUuidsMap;
+ pt.uuidObjectMap = uuidObjectMap;
+
+ // Add objects to instance
+ pt.layout = layout;
+ pt.xLayout = xLayout;
+ pt.xResponse = xResponse;
+
+ if (PT.isDebug) {
+ console.log("xResponse", xResponse);
+ console.log("xLayout", xLayout);
+ }
+ };
+
initialize = function() {
var url,
xLayout,
@@ -2378,7 +2481,7 @@
// Param string
pt.paramString = engine.getParamString(xLayout, true);
- url = pt.init.contextPath + '/api/analytics.json' + pt.paramString;
+ url = pt.init.contextPath + '/api/analytics.json' + pt.paramString + '&hierarchyMeta=true';
// Validate request size
if (!validateUrl(url)) {
@@ -2432,58 +2535,15 @@
// Update viewport
pt.viewport.centerRegion.removeAll(true);
pt.viewport.centerRegion.update(html);
-
- // After table success
-
- // Resize render elements if plugin
- if (pt.isPlugin) {
- var baseEl = Ext.get(pt.init.el),
- baseElBorderW = parseInt(baseEl.getStyle('border-left-width')) + parseInt(baseEl.getStyle('border-right-width')),
- baseElBorderH = parseInt(baseEl.getStyle('border-top-width')) + parseInt(baseEl.getStyle('border-bottom-width')),
- baseElPaddingW = parseInt(baseEl.getStyle('padding-left')) + parseInt(baseEl.getStyle('padding-right')),
- baseElPaddingH = parseInt(baseEl.getStyle('padding-top')) + parseInt(baseEl.getStyle('padding-bottom')),
- el = Ext.get(tableUuid);
-
- pt.viewport.centerRegion.setWidth(el.getWidth());
- pt.viewport.centerRegion.setHeight(el.getHeight());
- baseEl.setWidth(el.getWidth() + baseElBorderW + baseElPaddingW);
- baseEl.setHeight(el.getHeight() + baseElBorderH + baseElPaddingH);
- }
-
- // Hide mask
- util.mask.hideMask(pt.viewport.centerRegion);
-
- // Gui state
- if (pt.viewport.downloadButton) {
- pt.viewport.downloadButton.enable();
- }
-
- // Add uuid maps to instance
- pt.uuidDimUuidsMap = uuidDimUuidsMap;
- pt.uuidObjectMap = uuidObjectMap;
-
- // Add value event handlers, set session storage
- if (!pt.isPlugin && PT.isSessionStorage) {
- setMouseHandlers();
- engine.setSessionStorage(layout, 'table');
- }
-
- // Add objects to instance
- pt.layout = layout;
- pt.xLayout = xLayout;
- pt.xResponse = xResponse;
-
- if (PT.isDebug) {
- console.log("xResponse", xResponse);
- console.log("xLayout", xLayout);
- }
+
+ afterLoad(layout, xLayout, xResponse);
}
});
}();
};
- engine.loadTable = function(id, pt) {
+ engine.loadTable = function(id, pt, updateGui, isFavorite) {
var url = init.contextPath + '/api/reportTables/' + id,
params = '?viewClass=dimensional&links=false',
method = 'GET',
@@ -2503,7 +2563,7 @@
pt.favorite.id = layoutConfig.id;
pt.favorite.name = layoutConfig.name;
- pt.viewport.setFavorite(layout);
+ engine.createTable(layout, pt, updateGui, isFavorite);
}
};
@@ -2660,6 +2720,7 @@
util: util,
init: init,
api: api,
+ service: service,
engine: engine
});
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js 2013-08-25 18:44:06 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/plugin.js 2013-10-04 10:54:50 +0000
@@ -103,6 +103,8 @@
Ext.data.JsonP.request({
url: config.url + '/dhis-web-pivot/initialize.action',
success: function(r) {
+ PT.i18n = r.i18n;
+
pt = PT.core.getInstance(r);
extendInstance(pt);
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css 2013-09-16 10:14:59 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/styles/style.css 2013-10-07 12:39:55 +0000
@@ -143,6 +143,10 @@
display: none;
}
+.text-weak {
+ color: #303038;
+}
+
/*----------------------------------------------------------------------------
* Pivot
*--------------------------------------------------------------------------*/
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/i18n.vm'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/i18n.vm 2013-09-30 12:20:27 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/i18n.vm 2013-10-07 11:48:06 +0000
@@ -131,5 +131,6 @@
select_boundaries_and_groups: '$encoder.jsEscape($i18n.getString( 'select_boundaries_and_groups' ) , "'")',
select_organisation_unit_groups: '$encoder.jsEscape($i18n.getString( 'select_organisation_unit_groups' ) , "'")',
user_organisation_unit_grandchildren: '$encoder.jsEscape($i18n.getString( 'user_organisation_unit_grandchildren' ) , "'")',
- allow_external_access: '$encoder.jsEscape($i18n.getString( 'allow_external_access' ) , "'")'
+ allow_external_access: '$encoder.jsEscape($i18n.getString( 'allow_external_access' ) , "'")',
+ show_hierarchy_names: '$encoder.jsEscape($i18n.getString( 'show_hierarchy_names' ) , "'")'
};
=== modified file 'dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/jsonInitialize.vm'
--- dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/jsonInitialize.vm 2013-08-21 16:32:15 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/jsonInitialize.vm 2013-10-07 12:39:55 +0000
@@ -14,7 +14,143 @@
"rootNodes":[#foreach($node in $rootNodes){"id": "$!{node.uid}","text": "$!encoder.jsonEncode( ${node.name} )","level": 1,"hasChildrenWithCoordinates": $!{node.hasChildrenWithCoordinates()},"expanded": true}#if($velocityCount<$rootNodes.size()),#end#end],
"dimensions":[#foreach($dim in $dimensions){"id":"$!{dim.uid}","name":"$!encoder.jsonEncode($!{dim.name})"}#if($velocityCount<$dimensions.size()),#end#end],
"legendSets":[#foreach($set in $legendSets){"id":"$!{set.uid}","name":"$!encoder.jsonEncode($!{set.name})", "legends":[#foreach($legend in $set.mapLegends){"id":"$!{legend.uid}","name":"$!{legend.name}","sv":"$!{legend.startValue}", "ev":"$!{legend.endValue}", "color":"$!{legend.color}"}#if($velocityCount<$set.mapLegends.size()),#end#end]}#if($velocityCount<$legendSets.size()),#end#end],
-"organisationUnitLevels":[#foreach($level in $levels){"id":"$!{level.uid}","name":"$!encoder.jsonEncode($!{level.name})","level":"$!{level.level}"}#if($velocityCount<$levels.size()),#end#end]
+"organisationUnitLevels":[#foreach($level in $levels){"id":"$!{level.uid}","name":"$!encoder.jsonEncode($!{level.name})","level":"$!{level.level}"}#if($velocityCount<$levels.size()),#end#end],
+"i18n":{
+ "dimensions": "$encoder.jsEscape($i18n.getString( 'dimensions' ) , "'")",
+ "row": "$encoder.jsEscape($i18n.getString( 'row' ) , "'")",
+ "column": "$encoder.jsEscape($i18n.getString( 'column' ) , "'")",
+ "filter": "$encoder.jsEscape($i18n.getString( 'filter' ) , "'")",
+ "table_layout": "$encoder.jsEscape($i18n.getString( 'table_layout' ) , "'")",
+ "show_totals": "$encoder.jsEscape($i18n.getString( 'show_totals' ) , "'")",
+ "show_subtotals": "$encoder.jsEscape($i18n.getString( 'show_subtotals' ) , "'")",
+ "hide_empty_rows": "$encoder.jsEscape($i18n.getString( 'hide_empty_rows' ) , "'")",
+ "display_density": "$encoder.jsEscape($i18n.getString( 'display_density' ) , "'")",
+ "font_size": "$encoder.jsEscape($i18n.getString( 'font_size' ) , "'")",
+ "digit_group_separator": "$encoder.jsEscape($i18n.getString( 'digit_group_separator' ) , "'")",
+ "comfortable": "$encoder.jsEscape($i18n.getString( 'comfortable' ) , "'")",
+ "compact": "$encoder.jsEscape($i18n.getString( 'compact' ) , "'")",
+ "large": "$encoder.jsEscape($i18n.getString( 'large' ) , "'")",
+ "small_": "$encoder.jsEscape($i18n.getString( 'small_' ) , "'")",
+ "normal": "$encoder.jsEscape($i18n.getString( 'normal' ) , "'")",
+ "reporting_period": "$encoder.jsEscape($i18n.getString( 'reporting_period' ) , "'")",
+ "organisation_unit": "$encoder.jsEscape($i18n.getString( 'organisation_unit' ) , "'")",
+ "organisation_units": "$encoder.jsEscape($i18n.getString( 'organisation_units' ) , "'")",
+ "parent_organisation_unit": "$encoder.jsEscape($i18n.getString( 'parent_organisation_unit' ) , "'")",
+ "user_organisation_unit": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit' ) , "'")",
+ "user_organisation_unit_children": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit_children' ) , "'")",
+ "table_options": "$encoder.jsEscape($i18n.getString( 'table_options' ) , "'")",
+ "create": "$encoder.jsEscape($i18n.getString( 'create' ) , "'")",
+ "update": "$encoder.jsEscape($i18n.getString( 'update' ) , "'")",
+ "cancel": "$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")",
+ "delete_": "$encoder.jsEscape($i18n.getString( 'delete_' ) , "'")",
+ "save": "$encoder.jsEscape($i18n.getString( 'save' ) , "'")",
+ "hide": "$encoder.jsEscape($i18n.getString( 'hide' ) , "'")",
+ "add_new": "$encoder.jsEscape($i18n.getString( 'add_new' ) , "'")",
+ "manage_favorites": "$encoder.jsEscape($i18n.getString( 'manage_favorites' ) , "'")",
+ "search_for_favorites": "$encoder.jsEscape($i18n.getString( 'search_for_favorites' ) , "'")",
+ "overwrite_favorite": "$encoder.jsEscape($i18n.getString( 'overwrite_favorite' ) , "'")",
+ "delete_favorite": "$encoder.jsEscape($i18n.getString( 'delete_favorite' ) , "'")",
+ "prev": "$encoder.jsEscape($i18n.getString( 'prev' ) , "'")",
+ "next": "$encoder.jsEscape($i18n.getString( 'next' ) , "'")",
+ "rename": "$encoder.jsEscape($i18n.getString( 'rename' ) , "'")",
+ "overwrite": "$encoder.jsEscape($i18n.getString( 'overwrite' ) , "'")",
+ "share_with_other_people": "$encoder.jsEscape($i18n.getString( 'share_with_other_people' ) , "'")",
+ "sharing_settings": "$encoder.jsEscape($i18n.getString( 'sharing_settings' ) , "'")",
+ "can_view": "$encoder.jsEscape($i18n.getString( 'can_view' ) , "'")",
+ "can_edit_and_view": "$encoder.jsEscape($i18n.getString( 'can_edit_and_view' ) , "'")",
+ "none": "$encoder.jsEscape($i18n.getString( 'none' ) , "'")",
+ "public_access": "$encoder.jsEscape($i18n.getString( 'public_access' ) , "'")",
+ "search_for_user_groups": "$encoder.jsEscape($i18n.getString( 'search_for_user_groups' ) , "'")",
+ "available": "$encoder.jsEscape($i18n.getString( 'available' ) , "'")",
+ "selected": "$encoder.jsEscape($i18n.getString( 'selected' ) , "'")",
+ "indicators": "$encoder.jsEscape($i18n.getString( 'indicators' ) , "'")",
+ "all_indicator_groups": "$encoder.jsEscape($i18n.getString( 'all_indicator_groups' ) , "'")",
+ "select_indicator_group": "$encoder.jsEscape($i18n.getString( 'select_indicator_group' ) , "'")",
+ "data_elements": "$encoder.jsEscape($i18n.getString( 'data_elements' ) , "'")",
+ "all_data_element_groups": "$encoder.jsEscape($i18n.getString( 'all_data_element_groups' ) , "'")",
+ "select_data_element_group": "$encoder.jsEscape($i18n.getString( 'select_data_element_group' ) , "'")",
+ "data_sets": "$encoder.jsEscape($i18n.getString( 'data_sets' ) , "'")",
+ "reporting_rates": "$encoder.jsEscape($i18n.getString( 'reporting_rates' ) , "'")",
+ "periods": "$encoder.jsEscape($i18n.getString( 'periods' ) , "'")",
+ "select_period_type": "$encoder.jsEscape($i18n.getString( 'select_period_type' ) , "'")",
+ "weeks": "$encoder.jsEscape($i18n.getString( 'weeks' ) , "'")",
+ "last_week": "$encoder.jsEscape($i18n.getString( 'last_week' ) , "'")",
+ "last_4_weeks": "$encoder.jsEscape($i18n.getString( 'last_4_weeks' ) , "'")",
+ "last_12_weeks": "$encoder.jsEscape($i18n.getString( 'last_12_weeks' ) , "'")",
+ "months": "$encoder.jsEscape($i18n.getString( 'months' ) , "'")",
+ "last_month": "$encoder.jsEscape($i18n.getString( 'last_month' ) , "'")",
+ "last_3_months": "$encoder.jsEscape($i18n.getString( 'last_3_months' ) , "'")",
+ "last_12_months": "$encoder.jsEscape($i18n.getString( 'last_12_months' ) , "'")",
+ "bimonths": "$encoder.jsEscape($i18n.getString( 'bimonths' ) , "'")",
+ "last_bimonth": "$encoder.jsEscape($i18n.getString( 'last_bimonth' ) , "'")",
+ "last_6_bimonths": "$encoder.jsEscape($i18n.getString( 'last_6_bimonths' ) , "'")",
+ "quarters": "$encoder.jsEscape($i18n.getString( 'quarters' ) , "'")",
+ "last_quarter": "$encoder.jsEscape($i18n.getString( 'last_quarter' ) , "'")",
+ "last_4_quarters": "$encoder.jsEscape($i18n.getString( 'last_4_quarters' ) , "'")",
+ "sixmonths": "$encoder.jsEscape($i18n.getString( 'sixmonths' ) , "'")",
+ "last_sixmonth": "$encoder.jsEscape($i18n.getString( 'last_sixmonth' ) , "'")",
+ "last_2_sixmonths": "$encoder.jsEscape($i18n.getString( 'last_2_sixmonths' ) , "'")",
+ "years": "$encoder.jsEscape($i18n.getString( 'years' ) , "'")",
+ "this_year": "$encoder.jsEscape($i18n.getString( 'this_year' ) , "'")",
+ "last_year": "$encoder.jsEscape($i18n.getString( 'last_year' ) , "'")",
+ "last_5_years": "$encoder.jsEscape($i18n.getString( 'last_5_years' ) , "'")",
+ "financial_years": "$encoder.jsEscape($i18n.getString( 'financial_years' ) , "'")",
+ "last_financial_year": "$encoder.jsEscape($i18n.getString( 'last_financial_year' ) , "'")",
+ "last_5_financial_years": "$encoder.jsEscape($i18n.getString( 'last_5_financial_years' ) , "'")",
+ "prev_year": "$encoder.jsEscape($i18n.getString( 'prev_year' ) , "'")",
+ "next_year": "$encoder.jsEscape($i18n.getString( 'next_year' ) , "'")",
+ "select_all_children": "$encoder.jsEscape($i18n.getString( 'select_all_children' ) , "'")",
+ "table": "$encoder.jsEscape($i18n.getString( 'table' ) , "'")",
+ "chart": "$encoder.jsEscape($i18n.getString( 'chart' ) , "'")",
+ "map": "$encoder.jsEscape($i18n.getString( 'map' ) , "'")",
+ "home": "$encoder.jsEscape($i18n.getString( 'home' ) , "'")",
+ "data": "$encoder.jsEscape($i18n.getString( 'data' ) , "'")",
+ "categories": "$encoder.jsEscape($i18n.getString( 'categories' ) , "'")",
+ "style": "$encoder.jsEscape($i18n.getString( 'style' ) , "'")",
+ "parameters": "$encoder.jsEscape($i18n.getString( 'parameters' ) , "'")",
+ "for_standard_reports_only": "$encoder.jsEscape($i18n.getString( 'for_standard_reports_only' ) , "'")",
+ "please_create_a_table_first": "$encoder.jsEscape($i18n.getString( 'please_create_a_table_first' ) , "'")",
+ "indicators_cannot_be_specified_as_filter": "$encoder.jsEscape($i18n.getString( 'indicators_cannot_be_specified_as_filter' ) , "'")",
+ "categories_cannot_be_specified_as_filter": "$encoder.jsEscape($i18n.getString( 'categories_cannot_be_specified_as_filter' ) , "'")",
+ "data_element_group_sets_cannot_be_specified_together_with_data_sets": "$encoder.jsEscape($i18n.getString( 'data_element_group_sets_cannot_be_specified_together_with_data_sets' ) , "'")",
+ "at_least_one_dimension_must_be_specified_as_row_or_column": "$encoder.jsEscape($i18n.getString( 'at_least_one_dimension_must_be_specified_as_row_or_column' ) , "'")",
+ "at_least_one_period_must_be_specified_as_column_row_or_filter": "$encoder.jsEscape($i18n.getString( 'at_least_one_period_must_be_specified_as_column_row_or_filter' ) , "'")",
+ "example1": "$encoder.jsEscape($i18n.getString( 'example1' ) , "'")",
+ "example2": "$encoder.jsEscape($i18n.getString( 'example2' ) , "'")",
+ "example3": "$encoder.jsEscape($i18n.getString( 'example3' ) , "'")",
+ "example4": "$encoder.jsEscape($i18n.getString( 'example4' ) , "'")",
+ "example5": "$encoder.jsEscape($i18n.getString( 'example5' ) , "'")",
+ "example6": "$encoder.jsEscape($i18n.getString( 'example6' ) , "'")",
+ "example7": "$encoder.jsEscape($i18n.getString( 'example7' ) , "'")",
+ "example8": "$encoder.jsEscape($i18n.getString( 'example8' ) , "'")",
+ "layout": "$encoder.jsEscape($i18n.getString( 'layout' ) , "'")",
+ "options": "$encoder.jsEscape($i18n.getString( 'options' ) , "'")",
+ "download": "$encoder.jsEscape($i18n.getString( 'download' ) , "'")",
+ "favorites": "$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")",
+ "include_regression": "$encoder.jsEscape($i18n.getString( 'include_regression' ) , "'")",
+ "include_cumulative": "$encoder.jsEscape($i18n.getString( 'include_cumulative' ) , "'")",
+ "sort_order": "$encoder.jsEscape($i18n.getString( 'sort_order' ) , "'")",
+ "low_to_high": "$encoder.jsEscape($i18n.getString( 'low_to_high' ) , "'")",
+ "high_to_low": "$encoder.jsEscape($i18n.getString( 'high_to_low' ) , "'")",
+ "top_limit": "$encoder.jsEscape($i18n.getString( 'top_limit' ) , "'")",
+ "plain_data_sources": "$encoder.jsEscape($i18n.getString( 'plain_data_sources' ) , "'")",
+ "graphics": "$encoder.jsEscape($i18n.getString( 'graphics' ) , "'")",
+ "data_sets_cannot_be_specified_as_filter": "$encoder.jsEscape($i18n.getString( 'data_sets_cannot_be_specified_as_filter' ) , "'")",
+ "share": "$encoder.jsEscape($i18n.getString( 'share' ) , "'")",
+ "interpretation": "$encoder.jsEscape($i18n.getString( 'interpretation' ) , "'")",
+ "write_your_interpretation": "$encoder.jsEscape($i18n.getString( 'write_your_interpretation' ) , "'")",
+ "legend_set": "$encoder.jsEscape($i18n.getString( 'legend_set' ) , "'")",
+ "select_organisation_units": "$encoder.jsEscape($i18n.getString( 'select_organisation_units' ) , "'")",
+ "select_boundaries_and_levels": "$encoder.jsEscape($i18n.getString( 'select_boundaries_and_levels' ) , "'")",
+ "select_organisation_unit_levels": "$encoder.jsEscape($i18n.getString( 'select_organisation_unit_levels' ) , "'")",
+ "totals": "$encoder.jsEscape($i18n.getString( 'totals' ) , "'")",
+ "details": "$encoder.jsEscape($i18n.getString( 'details' ) , "'")",
+ "select_boundaries_and_groups": "$encoder.jsEscape($i18n.getString( 'select_boundaries_and_groups' ) , "'")",
+ "select_organisation_unit_groups": "$encoder.jsEscape($i18n.getString( 'select_organisation_unit_groups' ) , "'")",
+ "user_organisation_unit_grandchildren": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit_grandchildren' ) , "'")",
+ "allow_external_access": "$encoder.jsEscape($i18n.getString( 'allow_external_access' ) , "'")",
+ "show_hierarchy": "$encoder.jsEscape($i18n.getString( 'show_hierarchy' ) , "'")"
+}
}
#if($callback)
)
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-09-30 12:20:27 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2013-10-04 12:38:58 +0000
@@ -4800,6 +4800,8 @@
return viewport;
};
+
+
initialize = function(r) {
// ext configuration
@@ -4819,7 +4821,11 @@
Ext.Ajax.request({
url: '../initialize.action',
success: function(r) {
- dv = DV.core.getInstance(Ext.decode(r.responseText));
+ var init = Ext.decode(r.responseText);
+
+ DV.i18n = init.i18n;
+
+ dv = DV.core.getInstance(init);
DV.app.extendInstance(dv);
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js 2013-10-01 16:03:39 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/core.js 2013-10-04 12:38:58 +0000
@@ -2,28 +2,16 @@
// ext config
Ext.Ajax.method = 'GET';
-
- // namespace
- if (!('DV' in window)) {
- DV = {
- i18n: {
- trend: 'Trend',
- target: 'Target',
- base: 'Base'
- }
- };
- }
-
- // mode
- DV.isDebug = false;
-
- // html5
- DV.isSessionStorage = 'sessionStorage' in window && window['sessionStorage'] !== null;
-
- // core
-
- DV.core = {};
- DV.core.instances = [];
+
+ // pt
+ DV = {
+ core: {
+ instances: []
+ },
+ i18n: {},
+ isDebug: false,
+ isSessionStorage: 'sessionStorage' in window && window['sessionStorage'] !== null
+ };
DV.core.getInstance = function(init) {
var conf = {},
@@ -1138,51 +1126,67 @@
userOuc = dv.util.array.sortObjectsByString(userOuc);
}
if (isUserOrgunitGrandChildren) {
- var userOuOuc = [].concat(dv.init.user.ou, dv.init.user.ouc),
- responseOu = response.metaData.ou;
-
- userOugc = [];
-
- for (var j = 0; j < responseOu.length; j++) {
- if (!Ext.Array.contains(userOuOuc, responseOu[j])) {
- userOugc.push({
- id: responseOu[j],
- name: response.metaData.names[responseOu[j]]
- });
- }
- }
-
- userOugc = dv.util.array.sortObjectsByString(userOugc);
- }
+ var userOuOuc = [].concat(dv.init.user.ou, dv.init.user.ouc),
+ responseOu = response.metaData[ou];
+
+ userOugc = [];
+
+ for (var key in responseOu) {
+ if (responseOu.hasOwnProperty(key) && !Ext.Array.contains(userOuOuc, key)) {
+ userOugc.push({
+ id: key,
+ name: response.metaData.names[key]
+ });
+ }
+ }
+
+ userOugc = dv.util.array.sortObjectsByString(userOugc);
+ }
dim.items = [].concat(userOu || [], userOuc || [], userOugc || []);
}
else if (isLevel || isGroup) {
- var responseOu = response.metaData.ou;
-
- for (var j = 0; j < responseOu.length; j++) {
- dim.items.push({
- id: responseOu[j],
- name: response.metaData.names[responseOu[j]]
- });
- }
-
- dim.items = dv.util.array.sortObjectsByString(dim.items);
- }
+ var responseOu = response.metaData[ou];
+
+ for (var key in responseOu) {
+ if (responseOu.hasOwnProperty(key)) {
+ dim.items.push({
+ id: key,
+ name: response.metaData.names[key]
+ });
+ }
+ }
+
+ dim.items = dv.util.array.sortObjectsByString(dim.items);
+ }
else {
dim.items = Ext.clone(xLayout.dimensionNameItemsMap[dim.dimensionName]);
}
}
else {
// Items: get ids from metadata -> items
- if (Ext.isArray(metaDataDim)) {
- for (var j = 0, ids = Ext.clone(response.metaData[dim.dimensionName]); j < ids.length; j++) {
- dim.items.push({
- id: ids[j],
- name: response.metaData.names[ids[j]]
- });
- }
- }
+ if (metaDataDim) {
+ var ids = Ext.clone(response.metaData[dim.dimensionName]);
+
+ if (dim.dimensionName === ou) {
+ for (var key in ids) {
+ if (ids.hasOwnProperty(key)) {
+ dim.items.push({
+ id: key,
+ name: response.metaData.names[key]
+ });
+ }
+ }
+ }
+ else {
+ for (var j = 0; j < ids.length; j++) {
+ dim.items.push({
+ id: ids[j],
+ name: response.metaData.names[ids[j]]
+ });
+ }
+ }
+ }
// Items: get items from xLayout
else {
dim.items = Ext.clone(xLayout.objectNameItemsMap[dim.objectName]);
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm 2013-08-16 14:44:33 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm 2013-10-04 12:38:58 +0000
@@ -9,7 +9,212 @@
"ouc":[#foreach($ou in $currentUser.getOrganisationUnit().getSortedChildren())"$ou.uid"#if($velocityCount < $oucSize),#end#end]},
"rootNodes":[#foreach($node in $rootNodes){"id": "$!{node.uid}","text": "$!encoder.jsonEncode( ${node.name} )","level": 1,"hasChildrenWithCoordinates": $!{node.hasChildrenWithCoordinates()},"expanded": true}#if($velocityCount<$rootNodes.size()),#end#end],
"dimensions":[#foreach($dim in $dimensions){"id":"$!{dim.uid}","name":"$!encoder.jsonEncode($!{dim.name})"}#if($velocityCount<$dimensions.size()),#end#end],
-"organisationUnitLevels":[#foreach($level in $levels){"id":"$!{level.uid}","name":"$!encoder.jsonEncode($!{level.name})","level":"$!{level.level}"}#if($velocityCount<$levels.size()),#end#end]
+"organisationUnitLevels":[#foreach($level in $levels){"id":"$!{level.uid}","name":"$!encoder.jsonEncode($!{level.name})","level":"$!{level.level}"}#if($velocityCount<$levels.size()),#end#end],
+"i18n":{
+ "title": "$encoder.jsEscape($i18n.getString( 'title' ) , "'")",
+ "chart_type": "$encoder.jsEscape($i18n.getString( 'chart_type' ) , "'")",
+ "column_chart": "$encoder.jsEscape($i18n.getString( 'column_chart' ) , "'")",
+ "stacked_column_chart": "$encoder.jsEscape($i18n.getString( 'stacked_column_chart' ) , "'")",
+ "bar_chart": "$encoder.jsEscape($i18n.getString( 'bar_chart' ) , "'")",
+ "stacked_bar_chart": "$encoder.jsEscape($i18n.getString( 'stacked_bar_chart' ) , "'")",
+ "line_chart": "$encoder.jsEscape($i18n.getString( 'line_chart' ) , "'")",
+ "area_chart": "$encoder.jsEscape($i18n.getString( 'area_chart' ) , "'")",
+ "pie_chart": "$encoder.jsEscape($i18n.getString( 'pie_chart' ) , "'")",
+ "series": "$encoder.jsEscape($i18n.getString( 'series' ) , "'")",
+ "category": "$encoder.jsEscape($i18n.getString( 'category' ) , "'")",
+ "filter": "$encoder.jsEscape($i18n.getString( 'filter' ) , "'")",
+ "example_chart": "$encoder.jsEscape($i18n.getString( 'example_chart' ) , "'")",
+ "loading": "$encoder.jsEscape($i18n.getString( 'loading' ) , "'")",
+ "no_data": "$encoder.jsEscape($i18n.getString( 'no_data' ) , "'")",
+ "value": "$encoder.jsEscape($i18n.getString( 'value' ) , "'")",
+ "indicators": "$encoder.jsEscape($i18n.getString( 'indicators' ) , "'")",
+ "select_group": "$encoder.jsEscape($i18n.getString( 'select_group' ) , "'")",
+ "data_elements": "$encoder.jsEscape($i18n.getString( 'data_elements' ) , "'")",
+ "all_indicator_groups": "$encoder.jsEscape($i18n.getString( 'all_indicator_groups' ) , "'")",
+ "available": "$encoder.jsEscape($i18n.getString( 'available' ) , "'")",
+ "selected": "$encoder.jsEscape($i18n.getString( 'selected' ) , "'")",
+ "periods": "$encoder.jsEscape($i18n.getString( 'periods' ) , "'")",
+ "months": "$encoder.jsEscape($i18n.getString( 'months' ) , "'")",
+ "last_month": "$encoder.jsEscape($i18n.getString( 'last_month' ) , "'")",
+ "last_12_months": "$encoder.jsEscape($i18n.getString( 'last_12_months' ) , "'")",
+ "quarters": "$encoder.jsEscape($i18n.getString( 'quarters' ) , "'")",
+ "last_quarter": "$encoder.jsEscape($i18n.getString( 'last_quarter' ) , "'")",
+ "last_4_quarters": "$encoder.jsEscape($i18n.getString( 'last_4_quarters' ) , "'")",
+ "six_months": "$encoder.jsEscape($i18n.getString( 'six_months' ) , "'")",
+ "last_six_month": "$encoder.jsEscape($i18n.getString( 'last_six_month' ) , "'")",
+ "last_two_six_month": "$encoder.jsEscape($i18n.getString( 'last_two_six_month' ) , "'")",
+ "years": "$encoder.jsEscape($i18n.getString( 'years' ) , "'")",
+ "last_year": "$encoder.jsEscape($i18n.getString( 'last_year' ) , "'")",
+ "last_5_years": "$encoder.jsEscape($i18n.getString( 'last_5_years' ) , "'")",
+ "organisation_units": "$encoder.jsEscape($i18n.getString( 'organisation_units' ) , "'")",
+ "select_all_children": "$encoder.jsEscape($i18n.getString( 'select_all_children' ) , "'")",
+ "chart_options": "$encoder.jsEscape($i18n.getString( 'chart_options' ) , "'")",
+ "png_only": "$encoder.jsEscape($i18n.getString( 'png_only' ) , "'")",
+ "trend_line": "$encoder.jsEscape($i18n.getString( 'trend_line' ) , "'")",
+ "hide_subtitle": "$encoder.jsEscape($i18n.getString( 'hide_subtitle' ) , "'")",
+ "hide_legend": "$encoder.jsEscape($i18n.getString( 'hide_legend' ) , "'")",
+ "domain_axis_label": "$encoder.jsEscape($i18n.getString( 'domain_axis_label' ) , "'")",
+ "range_axis_label": "$encoder.jsEscape($i18n.getString( 'range_axis_label' ) , "'")",
+ "target": "$encoder.jsEscape($i18n.getString( 'target' ) , "'")",
+ "target_line_value": "$encoder.jsEscape($i18n.getString( 'target_line_value' ) , "'")",
+ "target_line_label": "$encoder.jsEscape($i18n.getString( 'target_line_label' ) , "'")",
+ "show_hide_chart_settings": "$encoder.jsEscape($i18n.getString( 'show_hide_chart_settings' ) , "'")",
+ "update": "$encoder.jsEscape($i18n.getString( 'update' ) , "'")",
+ "data_table": "$encoder.jsEscape($i18n.getString( 'data_table' ) , "'")",
+ "favorites": "$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")",
+ "manage_favorites": "$encoder.jsEscape($i18n.getString( 'manage_favorites' ) , "'")",
+ "save_favorite": "$encoder.jsEscape($i18n.getString( 'save_favorite' ) , "'")",
+ "sort_by": "$encoder.jsEscape($i18n.getString( 'sort_by' ) , "'")",
+ "system": "$encoder.jsEscape($i18n.getString( 'system' ) , "'")",
+ "name": "$encoder.jsEscape($i18n.getString( 'name' ) , "'")",
+ "last_updated": "$encoder.jsEscape($i18n.getString( 'last_updated' ) , "'")",
+ "rename": "$encoder.jsEscape($i18n.getString( 'rename' ) , "'")",
+ "rename_favorite": "$encoder.jsEscape($i18n.getString( 'rename_favorite' ) , "'")",
+ "cancel": "$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")",
+ "name_already_in_use": "$encoder.jsEscape($i18n.getString( 'name_already_in_use' ) , "'")",
+ "delete_object": "$encoder.jsEscape($i18n.getString( 'delete_object' ) , "'")",
+ "delete_favorite": "$encoder.jsEscape($i18n.getString( 'delete_favorite' ) , "'")",
+ "are_you_sure": "$encoder.jsEscape($i18n.getString( 'are_you_sure' ) , "'")",
+ "save": "$encoder.jsEscape($i18n.getString( 'save' ) , "'")",
+ "create_chart_before_saving": "$encoder.jsEscape($i18n.getString( 'create_chart_before_saving' ) , "'")",
+ "overwrite": "$encoder.jsEscape($i18n.getString( 'overwrite' ) , "'")",
+ "download": "$encoder.jsEscape($i18n.getString( 'download' ) , "'")",
+ "no_svg_format": "$encoder.jsEscape($i18n.getString( 'no_svg_format' ) , "'")",
+ "image_png": "$encoder.jsEscape($i18n.getString( 'image_png' ) , "'")",
+ "hide_data_table": "$encoder.jsEscape($i18n.getString( 'hide_data_table' ) , "'")",
+ "saving": "$encoder.jsEscape($i18n.getString( 'saving' ) , "'")",
+ "renaming": "$encoder.jsEscape($i18n.getString( 'renaming' ) , "'")",
+ "deleting": "$encoder.jsEscape($i18n.getString( 'deleting' ) , "'")",
+ "data": "$encoder.jsEscape($i18n.getString( 'data' ) , "'")",
+ "indicator": "$encoder.jsEscape($i18n.getString( 'indicator' ) , "'")",
+ "data_element": "$encoder.jsEscape($i18n.getString( 'data_element' ) , "'")",
+ "period": "$encoder.jsEscape($i18n.getString( 'period' ) , "'")",
+ "organisation_unit": "$encoder.jsEscape($i18n.getString( 'organisation_unit' ) , "'")",
+ "system_favorite_overwrite_not_allowed": "$encoder.jsEscape($i18n.getString( 'system_favorite_overwrite_not_allowed' ) , "'")",
+ "favorite_no_orgunits": "$encoder.jsEscape($i18n.getString( 'favorite_no_orgunits' ) , "'")",
+ "this_year": "$encoder.jsEscape($i18n.getString( 'this_year' ) , "'")",
+ "trend": "$encoder.jsEscape($i18n.getString( 'trend' ) , "'")",
+ "chart_options": "$encoder.jsEscape($i18n.getString( 'chart_options' ) , "'")",
+ "dataset": "$encoder.jsEscape($i18n.getString( 'dataset' ) , "'")",
+ "datasets": "$encoder.jsEscape($i18n.getString( 'datasets' ) , "'")",
+ "reporting_rates": "$encoder.jsEscape($i18n.getString( 'reporting_rates' ) , "'")",
+ "base_line_value": "$encoder.jsEscape($i18n.getString( 'base_line_value' ) , "'")",
+ "base_line_label": "$encoder.jsEscape($i18n.getString( 'base_line_label' ) , "'")",
+ "base": "$encoder.jsEscape($i18n.getString( 'base' ) , "'")",
+ "group_sets": "$encoder.jsEscape($i18n.getString( 'group_sets' ) , "'")",
+ "none": "$encoder.jsEscape($i18n.getString( 'none' ) , "'")",
+ "et_no_data": "$encoder.jsEscape($i18n.getString( 'et_no_data' ) , "'")",
+ "em_no_data": "$encoder.jsEscape($i18n.getString( 'em_no_data' ) , "'")",
+ "et_invalid_dimension_setup": "$encoder.jsEscape($i18n.getString( 'et_invalid_dimension_setup' ) , "'")",
+ "em_invalid_dimension_setup": "$encoder.jsEscape($i18n.getString( 'em_invalid_dimension_setup' ) , "'")",
+ "et_no_indicators_dataelements_datasets": "$encoder.jsEscape($i18n.getString( 'et_no_indicators_dataelements_datasets' ) , "'")",
+ "em_no_indicators_dataelements_datasets": "$encoder.jsEscape($i18n.getString( 'em_no_indicators_dataelements_datasets' ) , "'")",
+ "et_no_periods": "$encoder.jsEscape($i18n.getString( 'et_no_periods' ) , "'")",
+ "em_no_periods": "$encoder.jsEscape($i18n.getString( 'em_no_periods' ) , "'")",
+ "et_no_orgunits": "$encoder.jsEscape($i18n.getString( 'et_no_orgunits' ) , "'")",
+ "em_no_orgunits": "$encoder.jsEscape($i18n.getString( 'em_no_orgunits' ) , "'")",
+ "et_no_orgunitgroups": "$encoder.jsEscape($i18n.getString( 'et_no_orgunits' ) , "'")",
+ "em_no_orgunitgroups": "$encoder.jsEscape($i18n.getString( 'em_no_orgunits' ) , "'")",
+ "et_line_area_categories": "$encoder.jsEscape($i18n.getString( 'et_line_area_categories' ) , "'")",
+ "em_line_area_categories": "$encoder.jsEscape($i18n.getString( 'em_line_area_categories' ) , "'")",
+ "et_invalid_uid": "$encoder.jsEscape($i18n.getString( 'et_invalid_uid' ) , "'")",
+ "em_invalid_uid": "$encoder.jsEscape($i18n.getString( 'em_invalid_uid' ) , "'")",
+ "et_svg_browser": "$encoder.jsEscape($i18n.getString( 'et_svg_browser' ) , "'")",
+ "em_svg_browser": "$encoder.jsEscape($i18n.getString( 'em_svg_browser' ) , "'")",
+ "wm_trendline_deactivated": "$encoder.jsEscape($i18n.getString( 'wm_trendline_deactivated' ) , "'")",
+ "wm_targetline_deactivated": "$encoder.jsEscape($i18n.getString( 'wm_targetline_deactivated' ) , "'")",
+ "wm_baseline_deactivated": "$encoder.jsEscape($i18n.getString( 'wm_baseline_deactivated' ) , "'")",
+ "wm_not_applicable": "$encoder.jsEscape($i18n.getString( 'wm_not_applicable' ) , "'")",
+ "wm_stacked_chart": "$encoder.jsEscape($i18n.getString( 'wm_stacked_chart' ) , "'")",
+ "wm_pie_chart": "$encoder.jsEscape($i18n.getString( 'wm_pie_chart' ) , "'")",
+ "wm_required_categories": "$encoder.jsEscape($i18n.getString( 'wm_required_categories' ) , "'")",
+ "wm_multiple_filter_ind_de_ds": "$encoder.jsEscape($i18n.getString( 'wm_multiple_filter_ind_de_ds' ) , "'")",
+ "wm_multiple_filter_period": "$encoder.jsEscape($i18n.getString( 'wm_multiple_filter_period' ) , "'")",
+ "wm_multiple_filter_orgunit": "$encoder.jsEscape($i18n.getString( 'wm_multiple_filter_orgunit' ) , "'")",
+ "wm_multiple_filter_groups": "$encoder.jsEscape($i18n.getString( 'wm_multiple_filter_groups' ) , "'")",
+ "wm_first_filter_used": "$encoder.jsEscape($i18n.getString( 'wm_first_filter_used' ) , "'")",
+ "show_data": "$encoder.jsEscape($i18n.getString( 'show_data' ) , "'")",
+ "share": "$encoder.jsEscape($i18n.getString( 'share' ) , "'")",
+ "interpretation": "$encoder.jsEscape($i18n.getString( 'interpretation' ) , "'")",
+ "write_your_interpretation": "$encoder.jsEscape($i18n.getString( 'write_your_interpretation' ) , "'")",
+ "interpretation_was_shared": "$encoder.jsEscape($i18n.getString( 'interpretation_was_shared' ) , "'")",
+ "save_load_favorite_before_sharing": "$encoder.jsEscape($i18n.getString( 'save_load_favorite_before_sharing' ) , "'")",
+ "create_chart_before_datatable": "$encoder.jsEscape($i18n.getString( 'create_chart_before_datatable' ) , "'")",
+ "organisation_unit_groups": "$encoder.jsEscape($i18n.getString( 'organisation_unit_groups' ) , "'")",
+ "groups_replace_orgunits": "$encoder.jsEscape($i18n.getString( 'groups_replace_orgunits' ) , "'")",
+ "fixed_periods": "$encoder.jsEscape($i18n.getString( 'fixed_periods' ) , "'")",
+ "relative_periods": "$encoder.jsEscape($i18n.getString( 'relative_periods' ) , "'")",
+ "periods": "$encoder.jsEscape($i18n.getString( 'periods' ) , "'")",
+ "select_type": "$encoder.jsEscape($i18n.getString( 'select_type' ) , "'")",
+ "last_3_months": "$encoder.jsEscape($i18n.getString( 'last_3_months' ) , "'")",
+ "show_values": "$encoder.jsEscape($i18n.getString( 'show_values' ) , "'")",
+ "select_indicator_group": "$encoder.jsEscape($i18n.getString( 'select_indicator_group' ) , "'")",
+ "select_data_element_group": "$encoder.jsEscape($i18n.getString( 'select_data_element_group' ) , "'")",
+ "table": "$encoder.jsEscape($i18n.getString( 'table' ) , "'")",
+ "chart": "$encoder.jsEscape($i18n.getString( 'chart' ) , "'")",
+ "map": "$encoder.jsEscape($i18n.getString( 'map' ) , "'")",
+ "home": "$encoder.jsEscape($i18n.getString( 'home' ) , "'")",
+ "table_options": "$encoder.jsEscape($i18n.getString( 'table_options' ) , "'")",
+ "style": "$encoder.jsEscape($i18n.getString( 'style' ) , "'")",
+ "select_period_type": "$encoder.jsEscape($i18n.getString( 'select_period_type' ) , "'")",
+ "weeks": "$encoder.jsEscape($i18n.getString( 'weeks' ) , "'")",
+ "last_week": "$encoder.jsEscape($i18n.getString( 'last_week' ) , "'")",
+ "last_4_weeks": "$encoder.jsEscape($i18n.getString( 'last_4_weeks' ) , "'")",
+ "last_12_weeks": "$encoder.jsEscape($i18n.getString( 'last_12_weeks' ) , "'")",
+ "bimonths": "$encoder.jsEscape($i18n.getString( 'bimonths' ) , "'")",
+ "last_bimonth": "$encoder.jsEscape($i18n.getString( 'last_bimonth' ) , "'")",
+ "last_6_bimonths": "$encoder.jsEscape($i18n.getString( 'last_6_bimonths' ) , "'")",
+ "sixmonths": "$encoder.jsEscape($i18n.getString( 'sixmonths' ) , "'")",
+ "last_sixmonth": "$encoder.jsEscape($i18n.getString( 'last_sixmonth' ) , "'")",
+ "last_2_sixmonths": "$encoder.jsEscape($i18n.getString( 'last_2_sixmonths' ) , "'")",
+ "financial_years": "$encoder.jsEscape($i18n.getString( 'financial_years' ) , "'")",
+ "last_financial_year": "$encoder.jsEscape($i18n.getString( 'last_financial_year' ) , "'")",
+ "last_5_financial_years": "$encoder.jsEscape($i18n.getString( 'last_5_financial_years' ) , "'")",
+ "prev_year": "$encoder.jsEscape($i18n.getString( 'prev_year' ) , "'")",
+ "next_year": "$encoder.jsEscape($i18n.getString( 'next_year' ) , "'")",
+ "user_organisation_unit": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit' ) , "'")",
+ "user_organisation_unit_children": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit_children' ) , "'")",
+ "user_organisation_unit_grandchildren": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit_grandchildren' ) , "'")",
+ "filters": "$encoder.jsEscape($i18n.getString( 'filters' ) , "'")",
+ "at_least_one_dimension_must_be_specified_as_row_or_column": "$encoder.jsEscape($i18n.getString( 'at_least_one_dimension_must_be_specified_as_row_or_column' ) , "'")",
+ "at_least_one_period_must_be_specified_as_column_row_or_filter": "$encoder.jsEscape($i18n.getString( 'at_least_one_period_must_be_specified_as_column_row_or_filter' ) , "'")",
+ "indicators_cannot_be_specified_as_filter": "$encoder.jsEscape($i18n.getString( 'indicators_cannot_be_specified_as_filter' ) , "'")",
+ "all_data_element_groups": "$encoder.jsEscape($i18n.getString( 'all_data_element_groups' ) , "'")",
+ "hide": "$encoder.jsEscape($i18n.getString( 'hide' ) , "'")",
+ "layout": "$encoder.jsEscape($i18n.getString( 'layout' ) , "'")",
+ "options": "$encoder.jsEscape($i18n.getString( 'options' ) , "'")",
+ "download": "$encoder.jsEscape($i18n.getString( 'download' ) , "'")",
+ "favorites": "$encoder.jsEscape($i18n.getString( 'favorites' ) , "'")",
+ "chart_title": "$encoder.jsEscape($i18n.getString( 'chart_title' ) , "'")",
+ "hide_chart_title": "$encoder.jsEscape($i18n.getString( 'hide_chart_title' ) , "'")",
+ "search_for_favorites": "$encoder.jsEscape($i18n.getString( 'search_for_favorites' ) , "'")",
+ "overwrite_favorite": "$encoder.jsEscape($i18n.getString( 'overwrite_favorite' ) , "'")",
+ "please_create_a_table_first": "$encoder.jsEscape($i18n.getString( 'please_create_a_table_first' ) , "'")",
+ "delete_": "$encoder.jsEscape($i18n.getString( 'delete_' ) , "'")",
+ "share_with_other_people": "$encoder.jsEscape($i18n.getString( 'share_with_other_people' ) , "'")",
+ "totals": "$encoder.jsEscape($i18n.getString( 'totals' ) , "'")",
+ "details": "$encoder.jsEscape($i18n.getString( 'details' ) , "'")",
+ "prev": "$encoder.jsEscape($i18n.getString( 'prev' ) , "'")",
+ "next": "$encoder.jsEscape($i18n.getString( 'next' ) , "'")",
+ "create": "$encoder.jsEscape($i18n.getString( 'create' ) , "'")",
+ "add_new": "$encoder.jsEscape($i18n.getString( 'add_new' ) , "'")",
+ "can_view": "$encoder.jsEscape($i18n.getString( 'can_view' ) , "'")",
+ "can_edit_and_view": "$encoder.jsEscape($i18n.getString( 'can_edit_and_view' ) , "'")",
+ "search_for_user_groups": "$encoder.jsEscape($i18n.getString( 'search_for_user_groups' ) , "'")",
+ "public_access": "$encoder.jsEscape($i18n.getString( 'public_access' ) , "'")",
+ "detailed_data_elements_cannot_be_specified_as_filter": "$encoder.jsEscape($i18n.getString( 'detailed_data_elements_cannot_be_specified_as_filter' ) , "'")",
+ "plain_data_sources": "$encoder.jsEscape($i18n.getString( 'plain_data_sources' ) , "'")",
+ "graphics": "$encoder.jsEscape($i18n.getString( 'graphics' ) , "'")",
+ "sharing_settings": "$encoder.jsEscape($i18n.getString( 'sharing_settings' ) , "'")",
+ "select_organisation_units": "$encoder.jsEscape($i18n.getString( 'select_organisation_units' ) , "'")",
+ "select_boundaries_and_levels": "$encoder.jsEscape($i18n.getString( 'select_boundaries_and_levels' ) , "'")",
+ "select_organisation_unit_levels": "$encoder.jsEscape($i18n.getString( 'select_organisation_unit_levels' ) , "'")",
+ "radar_chart": "$encoder.jsEscape($i18n.getString( 'radar_chart' ) , "'")",
+ "select_boundaries_and_groups": "$encoder.jsEscape($i18n.getString( 'select_boundaries_and_groups' ) , "'")",
+ "select_organisation_unit_groups": "$encoder.jsEscape($i18n.getString( 'select_organisation_unit_groups' ) , "'")",
+ "user_organisation_unit_grandchildren": "$encoder.jsEscape($i18n.getString( 'user_organisation_unit_grandchildren' ) , "'")",
+ "allow_external_access": "$encoder.jsEscape($i18n.getString( 'allow_external_access' ) , "'")'"
+}
}
#if($callback)
)