dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18065
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7459: (DV) Tree rendered on startup + Initialize request cleaned up + Select orgunits by level removed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7459 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sat 2012-06-30 01:15:23 +0200
message:
(DV) Tree rendered on startup + Initialize request cleaned up + Select orgunits by level removed.
modified:
dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitsAction.java
dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties
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/index.html
dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm
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-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitsAction.java'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitsAction.java 2012-06-28 17:04:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/java/org/hisp/dhis/visualizer/action/GetOrganisationUnitsAction.java 2012-06-29 10:24:48 +0000
@@ -31,7 +31,6 @@
import java.util.Collection;
import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupService;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import com.opensymphony.xwork2.Action;
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-06-28 17:04:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties 2012-06-29 13:13:31 +0000
@@ -130,4 +130,4 @@
save_load_favorite_before_sharing = Please save or load a favorite before sharing
create_chart_before_datatable = Please create a chart before showing the datatable
organisation_unit_groups = Organisation unit groups
-nb_groups_replace_orgunits = NB! Groups will replace the selected organisation units
+groups_replace_orgunits = Note: Groups will replace the selected organisation units
\ No newline at end of file
=== 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-06-28 17:04:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js 2012-06-29 16:01:00 +0000
@@ -72,20 +72,12 @@
},
user: {
id: r.user.id,
- isadmin: r.user.isAdmin,
- organisationunit: {
- id: r.user.ou[0],
- name: DV.conf.util.jsonEncodeString(r.user.ou[1])
- },
- organisationunitchildren: []
+ isadmin: r.user.isAdmin
}
};
for (var i = 0; i < r.rn.length; i++) {
obj.system.rootnodes.push({id: r.rn[i][0], text: r.rn[i][1], level: 1});
}
- for (var i = 0; i < r.user.ouc.length; i++) {
- obj.user.organisationunitchildren.push({id: r.user.ouc[i][0], name: DV.conf.util.jsonEncodeString(r.user.ouc[i][1])});
- }
return obj;
}
}
@@ -303,10 +295,13 @@
DV.init = DV.conf.init.ajax.jsonfy(r);
DV.init.initialize = function() {
+ DV.cmp.dimension.indicator.panel.expand();
+
DV.c = DV.chart.model;
DV.util.combobox.filter.category();
DV.init.cmd = DV.util.getUrlParam(DV.conf.finals.cmd.urlparam) || DV.conf.finals.cmd.init;
+
DV.exe.execute(DV.init.cmd);
};
@@ -3226,12 +3221,14 @@
{
title: '<div style="height:17px; background-image:url(images/organisationunit.png); background-repeat:no-repeat; padding-left:20px">' + DV.i18n.organisation_units + '</div>',
hideCollapseTool: true,
+ collapsed: false,
items: [
{
id: 'organisationunit_t',
xtype: 'toolbar',
cls: 'dv-toolbar-tbar',
style: 'margin-bottom: 5px',
+ width: DV.conf.layout.west_fieldset_width - 18,
defaults: {
height: 28
},
@@ -3297,62 +3294,6 @@
});
}
}
- },
- {
- text: 'Level..',
- cls: 'dv-toolbar-btn-2',
- handler: function() {},
- listeners: {
- added: function() {
- this.menu = Ext.create('Ext.menu.Menu', {
- shadow: false,
- showSeparator: false,
- width: DV.conf.layout.treepanel_toolbar_menu_width_level,
- items: [
- {
- xtype: 'grid',
- cls: 'dv-menugrid',
- width: DV.conf.layout.treepanel_toolbar_menu_width_level,
- scroll: 'vertical',
- columns: [
- {
- dataIndex: 'name',
- width: DV.conf.layout.treepanel_toolbar_menu_width_level,
- style: 'display:none'
- }
- ],
- setHeightInMenu: function(store) {
- var h = store.getCount() * 24,
- sh = DV.util.viewport.getSize().y * 0.6;
- this.setHeight(h > sh ? sh : h);
- this.doLayout();
- this.up('menu').doLayout();
- },
- store: DV.store.level,
- listeners: {
- itemclick: function(g, r) {
- g.getSelectionModel().select([], false);
- this.up('menu').hide();
- DV.cmp.dimension.organisationunit.treepanel.selectByLevel(r.data.level);
- }
- }
- }
- ],
- listeners: {
- show: function() {
- if (!DV.store.level.isloaded) {
- DV.store.level.load({scope: this, callback: function() {
- this.down('grid').setHeightInMenu(DV.store.level);
- }});
- }
- else {
- this.down('grid').setHeightInMenu(DV.store.level);
- }
- }
- }
- });
- }
- }
}
]
},
@@ -3509,7 +3450,7 @@
xtype: 'label',
style: 'font-style:italic; font-size:11px; color:#666',
margin: '0 0 0 7',
- text: DV.i18n.nb_groups_replace_orgunits
+ text: DV.i18n.groups_replace_orgunits
},
{
xtype: 'combobox',
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2012-05-14 10:21:06 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/index.html 2012-06-25 13:42:13 +0000
@@ -2,7 +2,7 @@
<head>
<title>DHIS 2 Data Visualizer</title>
<link rel="stylesheet" type="text/css" href="../../dhis-web-commons/javascripts/ext/resources/css/ext-all-gray.css" />
- <link rel="stylesheet" type="text/css" href="css/style.css" />
+ <link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-06-28 17:04:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/i18n.vm 2012-06-29 13:13:31 +0000
@@ -129,6 +129,6 @@
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' ) , "'")',
-nb_groups_replace_orgunits:'$encoder.jsEscape($i18n.getString( 'nb_groups_replace_orgunits' ) , "'")'
+groups_replace_orgunits:'$encoder.jsEscape($i18n.getString( 'groups_replace_orgunits' ) , "'")'
};
=== 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 2012-06-26 11:51:38 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/jsonInitialize.vm 2012-06-29 16:01:00 +0000
@@ -1,1 +1,1 @@
-{"user":{"id":"$!currentUser.id","isAdmin":$auth.hasAccess( "dhis-web-visualizer", "addOrUpdateSystemChart" ),"ou":["$!currentUser.organisationUnit.uid","$!encoder.jsonEncode(${currentUser.organisationUnit.name})"],"ouc":[#foreach($ou in $!currentUser.organisationUnit.getSortedChildren())["$!{ou.uid}","$!encoder.jsonEncode(${ou.name})"]#if($velocityCount<$currentUser.organisationUnit.getSortedChildren().size()),#end#end]},"rn":[#foreach($rn in $rootNodes)["$!{rn.uid}","$!encoder.jsonEncode(${rn.name})"]#if($velocityCount<$rootNodes.size()),#end#end],"ougs":{#foreach($ougs in $organisationUnitGroupSets)"$!{ougs.uid}":[#foreach($oug in $ougs.getSortedGroups()){"id":"$!{oug.uid}","name":"$!encoder.jsonEncode($!{oug.name})"}#if($velocityCount<$ougs.getSortedGroups().size()),#end#end]#if($velocityCount<$organisationUnitGroupSets.size()),#end#end}}
+{"user":{"id":"$!currentUser.id","isAdmin":$auth.hasAccess( "dhis-web-visualizer", "addOrUpdateSystemChart" )},"rn":[#foreach($rn in $rootNodes)["$!{rn.uid}","$!encoder.jsonEncode(${rn.name})"]#if($velocityCount<$rootNodes.size()),#end#end],"ougs":{#foreach($ougs in $organisationUnitGroupSets)"$!{ougs.uid}":[#foreach($oug in $ougs.getSortedGroups()){"id":"$!{oug.uid}","name":"$!encoder.jsonEncode($!{oug.name})"}#if($velocityCount<$ougs.getSortedGroups().size()),#end#end]#if($velocityCount<$organisationUnitGroupSets.size()),#end#end}}