Commit 30855b2db02eb796757ba8dfd2bc6c1355d3c07f
1 parent
465b7a40
Exists in
master
and in
112 other branches
Fix epntap panel crash when loaded from treeview
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
js/app/controllers/EpnTapModule.js
@@ -93,7 +93,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -93,7 +93,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
93 | }, this); | 93 | }, this); |
94 | 94 | ||
95 | this.getBtn.on('click', function() { | 95 | this.getBtn.on('click', function() { |
96 | - this.onGetBtnClicked(); | 96 | + this.updateNbResults(); |
97 | }, this); | 97 | }, this); |
98 | }, | 98 | }, |
99 | 99 | ||
@@ -117,7 +117,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -117,7 +117,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
117 | /** | 117 | /** |
118 | Trigerred when the 'Get results' button is clicked. | 118 | Trigerred when the 'Get results' button is clicked. |
119 | */ | 119 | */ |
120 | - onGetBtnClicked: function() { | 120 | + updateNbResults: function() { |
121 | var targetName = this.targetNameCB.rawValue; | 121 | var targetName = this.targetNameCB.rawValue; |
122 | var productTypes = this.productTypeCB.value.join(';'); | 122 | var productTypes = this.productTypeCB.value.join(';'); |
123 | var timeMin = Ext.Date.format(this.timeSelector.getStartTime(), 'd/m/Y H:i:s'); // start time | 123 | var timeMin = Ext.Date.format(this.timeSelector.getStartTime(), 'd/m/Y H:i:s'); // start time |
@@ -144,11 +144,11 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -144,11 +144,11 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
144 | success: function(response, options) { | 144 | success: function(response, options) { |
145 | var record = this.servicesStore.getById(options.params['serviceId']); | 145 | var record = this.servicesStore.getById(options.params['serviceId']); |
146 | var responseObj = Ext.decode(response.responseText); | 146 | var responseObj = Ext.decode(response.responseText); |
147 | - this.updateNbResults(record, responseObj['success'] ? responseObj['data'] : -2, responseObj['msg']); | 147 | + this.updateService(record, responseObj['success'] ? responseObj['data'] : -2, responseObj['msg']); |
148 | }, | 148 | }, |
149 | failure: function(response, options) { | 149 | failure: function(response, options) { |
150 | var record = this.servicesStore.getById(options.params['serviceId']); | 150 | var record = this.servicesStore.getById(options.params['serviceId']); |
151 | - this.updateNbResults(record, -1, response.statusText); | 151 | + this.updateService(record, -1, response.statusText); |
152 | }, | 152 | }, |
153 | scope: this | 153 | scope: this |
154 | }); | 154 | }); |
@@ -158,7 +158,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -158,7 +158,7 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
158 | /** | 158 | /** |
159 | Update the nb_result field of the services store (see `EpnTapUI.servicesStore`), according to the field values in `serviceFilterPanel`. | 159 | Update the nb_result field of the services store (see `EpnTapUI.servicesStore`), according to the field values in `serviceFilterPanel`. |
160 | */ | 160 | */ |
161 | - updateNbResults: function(record, nbRes, info) { | 161 | + updateService: function(record, nbRes, info) { |
162 | record.set('nb_results', nbRes); | 162 | record.set('nb_results', nbRes); |
163 | record.set('info', info); | 163 | record.set('info', info); |
164 | this.servicesStore.sort(); | 164 | this.servicesStore.sort(); |