=== 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: '
' }, - - { - 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: '
' }, @@ -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: '
' }, - - { - 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); + } + } + } }