← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5718: (DV) Favorite bug fixed + Favorite list sorted by name by default.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 5718 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-01-12 16:10:59 +0100
message:
  (DV) Favorite bug fixed + Favorite list sorted by name by default.
modified:
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/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-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2012-01-12 12:44:29 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2012-01-12 14:59:21 +0000
@@ -944,8 +944,8 @@
             },
             isLoaded: false,
             sorting: {
-                field: 'lastUpdated',
-                direction: 'DESC'
+                field: 'name',
+                direction: 'ASC'
             },
             sortStore: function() {
                 this.sort(this.sorting.field, this.sorting.direction);
@@ -1025,13 +1025,13 @@
             this.organisationunitIds = DV.util.dimension.organisationunit.getIds();
             
             this.isRendered = true;
-            DV.util.mask.setMask(DV.chart.chart, 'Loading...');
             
             if (exe) {
                 DV.value.getValues(true);
             }
         },
         getParams: function() {
+            this.getState();
             var obj = {};
             obj.type = this.type.toUpperCase();
             obj.series = this.series.dimension.toUpperCase();
@@ -1046,7 +1046,6 @@
         setState: function(exe, uid) {
             if (uid) {
                 this.resetState();
-                DV.util.mask.setMask(DV.cmp.region.center, 'Loading...');
                 Ext.Ajax.request({
                     url: DV.conf.finals.ajax.path_api + DV.conf.finals.ajax.favorite_get + uid + '.json',
                     scope: this,
@@ -1162,7 +1161,8 @@
     
     DV.value = {
         values: [],
-        getValues: function(exe) {            
+        getValues: function(exe) {
+            DV.util.mask.setMask(DV.cmp.region.center, 'Loading...');
             var params = [],
                 i = DV.conf.finals.dimension.indicator.value,
                 d = DV.conf.finals.dimension.dataelement.value;