← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7489: (DV) User orgunit/children checkboxes moved to orgunit panel.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 7489 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-07-02 16:03:00 +0200
message:
  (DV) User orgunit/children checkboxes moved to orgunit panel.
modified:
  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/css/style.css


--
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/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-29 13:13:31 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/resources/org/hisp/dhis/visualizer/i18n_module.properties	2012-07-02 14:01:54 +0000
@@ -40,7 +40,7 @@
 trend_line=Trend line
 hide_subtitle=Hide subtitle
 hide_legend=Hide legend
-user_orgunit=User orgunit
+user_orgunit=User organisation unit
 domain_axis_label=Domain axis (X) label
 range_axis_label=Range axis (Y) label
 target=Target
@@ -121,7 +121,7 @@
 wm_first_filter_used=The first one is being used.
 available_attribute = Available attribute 
 selected_attribute = Selected attribute
-user_orgunit_children = User orgunit children
+user_orgunit_children = User organisation unit children
 show_data = Show data
 share = Share
 interpretation = interpretation

=== 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-07-02 12:33:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/app.js	2012-07-02 14:01:54 +0000
@@ -1707,11 +1707,11 @@
 			if (DV.c.baselinelabel) {
 				p.baseLineLabel = DV.c.baselinelabel;
 			}
-            p[DV.conf.finals.dimension.indicator.paramname] = DV.c.indicator.ids;
-            p[DV.conf.finals.dimension.dataelement.paramname] = DV.c.dataelement.ids;
-            p[DV.conf.finals.dimension.dataset.paramname] = DV.c.dataset.ids;
+            p.indicatorIds = DV.c.indicator.ids;
+            p.dataElementIds = DV.c.dataelement.ids;
+            p.dataSetIds = DV.c.dataset.ids;
             p = Ext.Object.merge(p, DV.c.period.rp);
-            p[DV.conf.finals.dimension.organisationunit.paramname] = DV.c.organisationunit.ids;
+            p.organisationUnitIds = DV.c.organisationunit.ids;
             if (DV.c.organisationunit.groupsetid) {
 				p.organisationUnitGroupSetId = DV.c.organisationunit.groupsetid;
 			}
@@ -1724,6 +1724,8 @@
 			DV.cmp.favorite.trendline.setValue(DV.c.trendline);
 			DV.cmp.favorite.userorganisationunit.setValue(DV.c.userorganisationunit);
 			DV.cmp.favorite.userorganisationunitchildren.setValue(DV.c.userorganisationunitchildren);
+			DV.cmp.favorite.userorganisationunit.fireEvent('change');
+			DV.cmp.favorite.userorganisationunitchildren.fireEvent('change');
 			DV.cmp.favorite.showdata.setValue(DV.c.showdata);
 			DV.cmp.favorite.domainaxislabel.setValue(DV.c.domainaxislabel);
 			DV.cmp.favorite.rangeaxislabel.setValue(DV.c.rangeaxislabel);
@@ -2500,7 +2502,6 @@
                                         xtype: 'combobox',
                                         cls: 'dv-combo',
                                         baseBodyCls: 'small',
-                                        style: 'color:red',
                                         name: DV.conf.finals.chart.series,
                                         emptyText: DV.i18n.series,
                                         queryMode: 'local',
@@ -3233,11 +3234,55 @@
 										collapsed: false,
 										items: [
 											{
+												layout: 'column',
+												bodyStyle: 'border:0 none; padding-bottom:4px',
+												items: [
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.user_orgunit,
+														labelWidth: DV.conf.layout.form_label_width,
+														handler: function(chb, checked) {
+															DV.cmp.dimension.organisationunit.toolbar.xable(checked, DV.cmp.favorite.userorganisationunitchildren.getValue());
+															DV.cmp.dimension.organisationunit.treepanel.xable(checked, DV.cmp.favorite.userorganisationunitchildren.getValue());
+														},
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.userorganisationunit = this;
+															}
+														}
+													},
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.user_orgunit_children,
+														labelWidth: DV.conf.layout.form_label_width,
+														handler: function(chb, checked) {
+															DV.cmp.dimension.organisationunit.toolbar.xable(checked, DV.cmp.favorite.userorganisationunit.getValue());
+															DV.cmp.dimension.organisationunit.treepanel.xable(checked, DV.cmp.favorite.userorganisationunit.getValue());
+														},
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.userorganisationunitchildren = this;
+															}
+														}
+													}
+												]
+											},
+											{
 												id: 'organisationunit_t',
 												xtype: 'toolbar',
 												cls: 'dv-toolbar-tbar',
 												style: 'margin-bottom: 5px',
 												width: DV.conf.layout.west_fieldset_width - 18,
+												xable: function(checked, value) {
+													if (checked || value) {
+														this.disable();
+													}
+													else {
+														this.enable();
+													}
+												},
 												defaults: {
 													height: 28
 												},
@@ -3304,7 +3349,12 @@
 															}
 														}
 													}
-												]
+												],
+												listeners: {
+													added: function() {
+														DV.cmp.dimension.organisationunit.toolbar = this;
+													}
+												}
 											},
 											{
 												xtype: 'treepanel',
@@ -3401,6 +3451,14 @@
 														}
 													}
 												}),
+												xable: function(checked, value) {
+													if (checked || value) {
+														this.disable();
+													}
+													else {
+														this.enable();
+													}
+												},
 												listeners: {
 													added: function() {
 														DV.cmp.dimension.organisationunit.treepanel = this;
@@ -3498,233 +3556,205 @@
 										items: [
 											{
 												xtype: 'panel',
-												bodyStyle: 'border-style:none; background-color:transparent; padding:0 2px',
-												items: [
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border-style:none; background-color:transparent; padding-bottom:3px',
-														items: [
-															{
-																xtype: 'checkbox',
-																width: 126,
-																boxLabel: DV.i18n.show_data,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.showdata = this;
-																	}
-																}
-															},
-															{
-																xtype: 'checkbox',
-																width: 124,
-																boxLabel: DV.i18n.hide_subtitle,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.hidesubtitle = this;
-																	}
-																}
-															},
-															{
-																xtype: 'checkbox',
-																width: 128,
-																boxLabel: DV.i18n.user_orgunit,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.userorganisationunit = this;
-																	}
-																}
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border-style:none; background-color:transparent; padding-bottom:15px',
-														items: [
-															{
-																xtype: 'checkbox',
-																width: 126,
-																boxLabel: DV.i18n.trend_line,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.trendline = this;
-																	}
-																}
-															},
-															{
-																xtype: 'checkbox',
-																width: 124,
-																boxLabel: DV.i18n.hide_legend,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.hidelegend = this;
-																	}
-																}
-															},
-															{
-																xtype: 'checkbox',
-																width: 128,
-																boxLabel: DV.i18n.user_orgunit_children,
-																labelWidth: DV.conf.layout.form_label_width,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.userorganisationunitchildren = this;
-																	}
-																}
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border:0 none; background-color:transparent; padding-bottom:8px',
-														items: [
-															{
-																xtype: 'textfield',
-																cls: 'dv-textfield-alt1',
-																style: 'margin-right:6px',
-																fieldLabel: DV.i18n.domain_axis_label,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																labelWidth: DV.conf.layout.form_label_width,
-																width: 187,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.domainaxislabel = this;
-																	}
-																}
-															},
-															{
-																xtype: 'textfield',
-																cls: 'dv-textfield-alt1',
-																fieldLabel: DV.i18n.range_axis_label,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																labelWidth: DV.conf.layout.form_label_width,
-																width: 187,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.rangeaxislabel = this;
-																	}
-																}
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border:0 none; background-color:transparent; padding-bottom:8px',
-														items: [
-															{
-																xtype: 'numberfield',
-																cls: 'dv-textfield-alt1',
-																style: 'margin-right:6px',
-																hideTrigger: true,
-																fieldLabel: DV.i18n.target_line_value,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																width: 187,
-																spinUpEnabled: true,
-																spinDownEnabled: true,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.targetlinevalue = this;
-																	},
-																	change: function() {
-																		DV.cmp.favorite.targetlinelabel.xable();
-																	}
-																}
-															},
-															{
-																xtype: 'textfield',
-																cls: 'dv-textfield-alt1',
-																fieldLabel: DV.i18n.target_line_label,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																width: 187,
-																disabled: true,
-																xable: function() {
-																	if (DV.cmp.favorite.targetlinevalue.getValue()) {
-																		this.enable();
-																	}
-																	else {
-																		this.disable();
-																	}
-																},
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.targetlinelabel = this;
-																	}
-																}
-															}
-														]
-													},
-													{
-														xtype: 'panel',
-														layout: 'column',
-														bodyStyle: 'border:0 none; background-color:transparent; padding-bottom:5px',
-														items: [
-															{
-																xtype: 'numberfield',
-																cls: 'dv-textfield-alt1',
-																style: 'margin-right:6px',
-																hideTrigger: true,
-																fieldLabel: DV.i18n.base_line_value,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																width: 187,
-																spinUpEnabled: true,
-																spinDownEnabled: true,
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.baselinevalue = this;
-																	},
-																	change: function() {
-																		DV.cmp.favorite.baselinelabel.xable();
-																	}
-																}
-															},
-															{
-																xtype: 'textfield',
-																cls: 'dv-textfield-alt1',
-																fieldLabel: DV.i18n.base_line_label,
-																labelAlign: 'top',
-																labelSeparator: '',
-																maxLength: 100,
-																enforceMaxLength: true,
-																width: 187,
-																disabled: true,
-																xable: function() {
-																	if (DV.cmp.favorite.baselinevalue.getValue()) {
-																		this.enable();
-																	}
-																	else {
-																		this.disable();
-																	}
-																},
-																listeners: {
-																	added: function() {
-																		DV.cmp.favorite.baselinelabel = this;
-																	}
-																}
-															}
-														]
+												layout: 'column',
+												bodyStyle: 'padding-bottom:3px',
+												items: [
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.show_data,
+														labelWidth: DV.conf.layout.form_label_width,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.showdata = this;
+															}
+														}
+													},
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.hide_subtitle,
+														labelWidth: DV.conf.layout.form_label_width,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.hidesubtitle = this;
+															}
+														}
+													}
+												]
+											},
+											{
+												xtype: 'panel',
+												layout: 'column',
+												bodyStyle: 'padding-bottom:15px',
+												items: [
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.trend_line,
+														labelWidth: DV.conf.layout.form_label_width,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.trendline = this;
+															}
+														}
+													},
+													{
+														xtype: 'checkbox',
+														columnWidth: 0.5,
+														boxLabel: DV.i18n.hide_legend,
+														labelWidth: DV.conf.layout.form_label_width,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.hidelegend = this;
+															}
+														}
+													}
+												]
+											},
+											{
+												xtype: 'panel',
+												layout: 'column',
+												bodyStyle: 'padding-bottom:8px',
+												items: [
+													{
+														xtype: 'textfield',
+														cls: 'dv-textfield-alt1',
+														style: 'margin-right:6px',
+														fieldLabel: DV.i18n.domain_axis_label,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														labelWidth: DV.conf.layout.form_label_width,
+														width: 187,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.domainaxislabel = this;
+															}
+														}
+													},
+													{
+														xtype: 'textfield',
+														cls: 'dv-textfield-alt1',
+														fieldLabel: DV.i18n.range_axis_label,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														labelWidth: DV.conf.layout.form_label_width,
+														width: 187,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.rangeaxislabel = this;
+															}
+														}
+													}
+												]
+											},
+											{
+												xtype: 'panel',
+												layout: 'column',
+												bodyStyle: 'padding-bottom:8px',
+												items: [
+													{
+														xtype: 'numberfield',
+														cls: 'dv-textfield-alt1',
+														style: 'margin-right:6px',
+														hideTrigger: true,
+														fieldLabel: DV.i18n.target_line_value,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														width: 187,
+														spinUpEnabled: true,
+														spinDownEnabled: true,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.targetlinevalue = this;
+															},
+															change: function() {
+																DV.cmp.favorite.targetlinelabel.xable();
+															}
+														}
+													},
+													{
+														xtype: 'textfield',
+														cls: 'dv-textfield-alt1',
+														fieldLabel: DV.i18n.target_line_label,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														width: 187,
+														disabled: true,
+														xable: function() {
+															if (DV.cmp.favorite.targetlinevalue.getValue()) {
+																this.enable();
+															}
+															else {
+																this.disable();
+															}
+														},
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.targetlinelabel = this;
+															}
+														}
+													}
+												]
+											},
+											{
+												xtype: 'panel',
+												layout: 'column',
+												bodyStyle: 'padding-bottom:5px',
+												items: [
+													{
+														xtype: 'numberfield',
+														cls: 'dv-textfield-alt1',
+														style: 'margin-right:6px',
+														hideTrigger: true,
+														fieldLabel: DV.i18n.base_line_value,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														width: 187,
+														spinUpEnabled: true,
+														spinDownEnabled: true,
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.baselinevalue = this;
+															},
+															change: function() {
+																DV.cmp.favorite.baselinelabel.xable();
+															}
+														}
+													},
+													{
+														xtype: 'textfield',
+														cls: 'dv-textfield-alt1',
+														fieldLabel: DV.i18n.base_line_label,
+														labelAlign: 'top',
+														labelSeparator: '',
+														maxLength: 100,
+														enforceMaxLength: true,
+														width: 187,
+														disabled: true,
+														xable: function() {
+															if (DV.cmp.favorite.baselinevalue.getValue()) {
+																this.enable();
+															}
+															else {
+																this.disable();
+															}
+														},
+														listeners: {
+															added: function() {
+																DV.cmp.favorite.baselinelabel = this;
+															}
+														}
 													}
 												]
 											}

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css	2012-07-02 12:33:59 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/css/style.css	2012-07-02 14:01:54 +0000
@@ -10,6 +10,10 @@
     font-size: 11px;
 }
 
+.dv-accordion-options .x-panel-body-default {
+	border: 0 none;
+}
+
 /* Disable class invisible */
 .dv-invisible .x-form-item-body {
     display: none;