diff --git a/js/app/controllers/EpnTapModule.js b/js/app/controllers/EpnTapModule.js index 1ec2715..d0d2d7e 100644 --- a/js/app/controllers/EpnTapModule.js +++ b/js/app/controllers/EpnTapModule.js @@ -93,7 +93,7 @@ Ext.define('amdaDesktop.EpnTapModule', { }, this); this.getBtn.on('click', function() { - this.onGetBtnClicked(); + this.updateNbResults(); }, this); }, @@ -117,7 +117,7 @@ Ext.define('amdaDesktop.EpnTapModule', { /** Trigerred when the 'Get results' button is clicked. */ - onGetBtnClicked: function() { + updateNbResults: function() { var targetName = this.targetNameCB.rawValue; var productTypes = this.productTypeCB.value.join(';'); var timeMin = Ext.Date.format(this.timeSelector.getStartTime(), 'd/m/Y H:i:s'); // start time @@ -144,11 +144,11 @@ Ext.define('amdaDesktop.EpnTapModule', { success: function(response, options) { var record = this.servicesStore.getById(options.params['serviceId']); var responseObj = Ext.decode(response.responseText); - this.updateNbResults(record, responseObj['success'] ? responseObj['data'] : -2, responseObj['msg']); + this.updateService(record, responseObj['success'] ? responseObj['data'] : -2, responseObj['msg']); }, failure: function(response, options) { var record = this.servicesStore.getById(options.params['serviceId']); - this.updateNbResults(record, -1, response.statusText); + this.updateService(record, -1, response.statusText); }, scope: this }); @@ -158,7 +158,7 @@ Ext.define('amdaDesktop.EpnTapModule', { /** Update the nb_result field of the services store (see `EpnTapUI.servicesStore`), according to the field values in `serviceFilterPanel`. */ - updateNbResults: function(record, nbRes, info) { + updateService: function(record, nbRes, info) { record.set('nb_results', nbRes); record.set('info', info); this.servicesStore.sort(); -- libgit2 0.21.2