Commit 30855b2db02eb796757ba8dfd2bc6c1355d3c07f
1 parent
465b7a40
Exists in
master
and in
111 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 | 93 | }, this); |
94 | 94 | |
95 | 95 | this.getBtn.on('click', function() { |
96 | - this.onGetBtnClicked(); | |
96 | + this.updateNbResults(); | |
97 | 97 | }, this); |
98 | 98 | }, |
99 | 99 | |
... | ... | @@ -117,7 +117,7 @@ Ext.define('amdaDesktop.EpnTapModule', { |
117 | 117 | /** |
118 | 118 | Trigerred when the 'Get results' button is clicked. |
119 | 119 | */ |
120 | - onGetBtnClicked: function() { | |
120 | + updateNbResults: function() { | |
121 | 121 | var targetName = this.targetNameCB.rawValue; |
122 | 122 | var productTypes = this.productTypeCB.value.join(';'); |
123 | 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 | 144 | success: function(response, options) { |
145 | 145 | var record = this.servicesStore.getById(options.params['serviceId']); |
146 | 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 | 149 | failure: function(response, options) { |
150 | 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 | 153 | scope: this |
154 | 154 | }); |
... | ... | @@ -158,7 +158,7 @@ Ext.define('amdaDesktop.EpnTapModule', { |
158 | 158 | /** |
159 | 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 | 162 | record.set('nb_results', nbRes); |
163 | 163 | record.set('info', info); |
164 | 164 | this.servicesStore.sort(); | ... | ... |