dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #08998
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2299: (GIS) Event 'select' added to component colorField. Listeners added to color and number fields. R...
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2299 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-12-06 16:07:55 +0100
message:
(GIS) Event 'select' added to component colorField. Listeners added to color and number fields. Refresh buttons removed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/colorfield/color-field.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/colorfield/color-field.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/colorfield/color-field.js 2010-03-08 15:23:59 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/colorfield/color-field.js 2010-12-06 15:05:09 +0000
@@ -132,6 +132,7 @@
menuListeners : {
select: function(e, c){
this.setValue(c);
+ this.fireEvent('select', this, c);
},
show : function(){ // retain focus styling
this.onFocus();
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2010-12-02 15:46:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2010-12-06 15:05:09 +0000
@@ -938,7 +938,15 @@
labelSeparator: GLOBAL.conf.labelseparator,
allowBlank: false,
width: GLOBAL.conf.combo_width,
- value: "#FFFF00"
+ value: "#FFFF00",
+ listeners: {
+ 'select': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ }
+ }
},
{
@@ -948,25 +956,13 @@
labelSeparator: GLOBAL.conf.labelseparator,
allowBlank: false,
width: GLOBAL.conf.combo_width,
- value: "#FF0000"
- },
-
- { html: '<div class="thematic-br">' },
-
- {
- xtype: 'button',
- text: i18n_refresh,
- isFormField: true,
- fieldLabel: GLOBAL.conf.emptytext,
- labelSeparator: GLOBAL.conf.labelseparator,
- scope: this,
- handler: function() {
- if (this.formValidation.validateForm(true)) {
- this.layer.setVisibility(true);
- this.classify(true, true);
- }
- else {
- Ext.message.msg(false, i18n_form_is_not_complete);
+ value: "#FF0000",
+ listeners: {
+ 'select': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
}
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2010-12-02 19:03:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2010-12-06 15:05:09 +0000
@@ -876,7 +876,15 @@
labelSeparator: GLOBAL.conf.labelseparator,
allowBlank: false,
width: GLOBAL.conf.combo_width,
- value: "#FFFF00"
+ value: "#FFFF00",
+ listeners: {
+ 'select': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ }
+ }
},
{
@@ -886,7 +894,15 @@
labelSeparator: GLOBAL.conf.labelseparator,
allowBlank: false,
width: GLOBAL.conf.combo_width,
- value: "#FF0000"
+ value: "#FF0000",
+ listeners: {
+ 'select': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ }
+ }
},
{ html: '<div class="thematic-br">' },
@@ -897,7 +913,15 @@
fieldLabel: 'Low radius',
labelSeparator: GLOBAL.conf.labelseparator,
width: GLOBAL.conf.combo_number_width_small,
- value: 5
+ value: 5,
+ listeners: {
+ 'change': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ }
+ }
},
{
@@ -906,26 +930,21 @@
fieldLabel: 'High radius',
labelSeparator: GLOBAL.conf.labelseparator,
width: GLOBAL.conf.combo_number_width_small,
- value: 20
- },
-
- { html: '<div class="thematic-br">' },
-
- {
- xtype: 'button',
- text: i18n_refresh,
- isFormField: true,
- fieldLabel: GLOBAL.conf.emptytext,
- labelSeparator: GLOBAL.conf.labelseparator,
- scope: this,
- handler: function() {
- if (this.formValidation.validateForm(true)) {
- this.layer.setVisibility(true);
- this.classify(true, true);
- }
- else {
- Ext.message.msg(false, i18n_form_is_not_complete);
- }
+ value: 20,
+ listeners: {
+ 'change': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ },
+ 'specialkey': {
+ scope: this,
+ fn: function() {
+ this.classify(false, true);
+ }
+ }
+
}
}