dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17191
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6761: (DV) System favorites not available in manage favorites window for non-admins.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 6761 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-26 15:54:41 +0000
message:
(DV) System favorites not available in manage favorites window for non-admins.
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-04-26 13:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-04-26 15:34:25 +0000
@@ -1458,6 +1458,13 @@
sortStore: function() {
this.sort(this.sorting.field, this.sorting.direction);
},
+ filtersystem: function() {
+ if (!DV.init.user.isadmin) {
+ this.filterBy( function(r) {
+ return r.data.userId ? true : false;
+ });
+ }
+ },
listeners: {
load: function(s) {
s.isloaded = !s.isloaded ? true : false;
@@ -3583,6 +3590,7 @@
text: DV.i18n.manage_favorites,
iconCls: 'dv-menu-item-edit',
handler: function() {
+ DV.store.favorite.filtersystem();
if (DV.cmp.favorite.window) {
DV.cmp.favorite.window.show();
}
@@ -4042,7 +4050,10 @@
show: function() {
DV.cmp.favorite.save.xable();
this.down('grid').setHeightInWindow(DV.store.favorite);
- }
+ },
+ hide: function() {
+ DV.store.favorite.clearFilter();
+ }
}
});
var w = DV.cmp.favorite.window;