dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32022
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16351: DV filter bug fixed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16351 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-08 14:24:03 +0200
message:
DV filter bug fixed.
modified:
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-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.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-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-10-29 15:36:41 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/index.html 2014-08-08 11:08:16 +0000
@@ -15,6 +15,15 @@
<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/jQuery/jquery.min.js"></script>
+ <script src="../../dhis-web-commons/javascripts/jQuery/calendars/jquery.calendars.min.js"></script>
+ <script src="../../dhis-web-commons/javascripts/jQuery/calendars/jquery.calendars.picker.min.js"></script>
+ <script src="../../dhis-web-commons/javascripts/dhis2/dhis2.util.js"></script>
+
+ <script src="../../dhis-web-commons/javascripts/dhis2/dhis2.period.js"></script>
+-->
+
<script src="../../dhis-web-commons/javascripts/periodTypeNoDep.js"></script>
<script src="scripts/core.js"></script>
<script src="scripts/app.js"></script>
=== 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 2014-08-07 10:42:08 +0000
+++ dhis-2/dhis-web/dhis-web-pivot/src/main/webapp/dhis-web-pivot/app/scripts/app.js 2014-08-08 11:08:16 +0000
@@ -6055,12 +6055,34 @@
Ext.Ajax.request({
url: init.contextPath + '/api/system/info.json',
success: function(r) {
- var info = Ext.decode(r.responseText);
+ var info = Ext.decode(r.responseText),
+ dhis2PeriodUrl = '../../dhis-web-commons/javascripts/dhis2/dhis2.period.js',
+ calendarMap = {'iso8601': 'gregorian'},
+ calendarUrl;
+
+ // calendar
+ init.calendar = calendarMap[info.calendar] || info.calendar || 'gregorian';
+ init.dateFormat = info.dateFormat || 'yyyy-mm-dd';
+
+ //if (Ext.Array.contains(['coptic', 'ethiopian', 'islamic', 'julian', 'nepali', 'thai'], init.calendar)) {
+ //calendarUrl = '../../dhis-web-commons/javascripts/jQuery/calendars/jquery.calendars.' + init.calendar + '.min.js';
+
+ //Ext.Loader.injectScriptElement(calendarUrl, function() {
+ //Ext.Loader.injectScriptElement(dhis2PeriodUrl, function() {});
+ //});
+ //}
+ //else {
+ //Ext.Loader.injectScriptElement(dhis2PeriodUrl, function() {
+ //var cal = $.calendars.instance('gregorian'),
+ //gen = new dhis2.period.PeriodGenerator(cal, init.dateFormat);
+
+ //console.log(gen.generateReversedPeriods('Yearly', 0));
+ //});
+ //}
+
+ // context path
init.contextPath = info.contextPath || init.contextPath;
- // calendar
- init.calendar = info.calendar;
-
// i18n
requests.push({
url: init.contextPath + '/api/i18n?package=org.hisp.dhis.pivot',
=== 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 2014-07-24 23:39:15 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/scripts/app.js 2014-08-08 12:23:05 +0000
@@ -2126,9 +2126,9 @@
web.chart.getLayoutConfig = function() {
var panels = ns.app.accordion.panels,
- columnDimNames = [ns.app.stores.col.getDimensionNames()],
- rowDimNames = [ns.app.stores.row.getDimensionNames()],
- filterDimNames = [ns.app.stores.filter.getDimensionNames()],
+ columnDimNames = ns.app.stores.col.getDimensionNames(),
+ rowDimNames = ns.app.stores.row.getDimensionNames(),
+ filterDimNames = ns.app.stores.filter.getDimensionNames(),
config = ns.app.optionsWindow.getOptions(),
dx = dimConf.data.dimensionName,
co = dimConf.category.dimensionName,
@@ -2162,7 +2162,7 @@
for (var j = 0, dimName, dim; j < dimNames.length; j++) {
dimName = dimNames[j];
-
+
if (dimName === co) {
axes[i].push({
dimension: co,