From 0c2b3220773ca110a8bb5c5e45751a1bf079db19 Mon Sep 17 00:00:00 2001 From: Nathanael Jourdane Date: Thu, 24 Aug 2017 16:30:09 +0200 Subject: [PATCH] epntap: Remove metadata-related code --- js/app/controllers/EpnTapModule.js | 72 ++++++++++++++---------------------------------------------------------- 1 file changed, 14 insertions(+), 58 deletions(-) diff --git a/js/app/controllers/EpnTapModule.js b/js/app/controllers/EpnTapModule.js index 10af33f..1e3161f 100644 --- a/js/app/controllers/EpnTapModule.js +++ b/js/app/controllers/EpnTapModule.js @@ -86,20 +86,6 @@ Ext.define('amdaDesktop.EpnTapModule', { this.onGranuleSelected(record.data['id']); }, this); - this.productTypeCB.on('select', function(cb) { - this.onProductTypeCBChanged(cb.value); - this.updateNbResults(); - }, this); - - this.targetNameCB.on('select', function(cb) { - this.onTargetNameCBChanged(cb.value); - this.updateNbResults(); - }, this); - - this.rowsPerPageNf.on('change', function(rowsPerPageNf, newValue) { - this.onRowsPerPageChanged(newValue); - }, this); - this.firstPageBtn.on('click', function() { this.onFirstPageBtnClicked(); }, this); @@ -117,6 +103,10 @@ Ext.define('amdaDesktop.EpnTapModule', { }, this); }, + /********************** + *** Utils functions *** + **********************/ + /** Capitalize a name and replace underscores with spaces. - `name`: The string to make pretty. @@ -144,6 +134,16 @@ Ext.define('amdaDesktop.EpnTapModule', { return true; }, + /** + Disable or enable the navigation buttons (see `EpnTapUI.createNavigationPanel()`). + */ + disableNavBtns: function(firt, previous, next, last) { + this.firstPageBtn.setDisabled(firt); + this.previousPageBtn.setDisabled(previous); + this.nextPageBtn.setDisabled(next); + this.lastPageBtn.setDisabled(last); + }, + /**************************** *** Service filter events *** ****************************/ @@ -158,65 +158,21 @@ Ext.define('amdaDesktop.EpnTapModule', { this.addUIListeners(); // this.servicesStore.clearFilter(); - // this.metadataStore.clearFilter(); this.granulesStore.removeAll(); - this.productTypeCB.getStore().add({'id': 'all', 'name': 'All dataproduct types'}); - if(target) { this.targetNameCB.getStore().add({'id': target[0], 'name': this.prettify(target[0])}); this.targetNameCB.select(target[0]); this.productTypeCB.select(target[1]); this.updateNbResults(); - } else { - this.targetNameCB.select('all'); - this.productTypeCB.select('all'); - - // this.servicesStore.each(function(record, idx) { - // record.set('nb_results', this.metadataStore.sum('nb_results')); - // }, this); } }, - /** - Trigerred when *the user* (not `productTypeCB.select()`) select a new item in `productTypeCB` - (see `EpnTapUI.createProductTypeCB()`). - Among other things, updates the `servicesGrid` table. - */ - onProductTypeCBChanged: function() { - }, - - /** - Trigerred when the user select a new item in `targetNameCB` (see `EpnTapUI.createTargetNameCB()`). - Updates the `servicesGrid` table. - */ - onTargetNameCBChanged: function() { - this.granulesStore.removeAll(); - }, - - /** - Trigerred when the value of `rowsPerPageNf` is updated (see `EpnTapUI.createRowsPerPageNf()`). Do nothing yet, used - for debug purposes only. - */ - onRowsPerPageChanged: function() { - // console.log("rows per page: " + this.productTypeCB); - }, - /********************* *** Buttons events *** *********************/ /** - Disable or enable the navigation buttons (see `EpnTapUI.createNavigationPanel()`). - */ - disableNavBtns: function(firt, previous, next, last) { - this.firstPageBtn.setDisabled(firt); - this.previousPageBtn.setDisabled(previous); - this.nextPageBtn.setDisabled(next); - this.lastPageBtn.setDisabled(last); - }, - - /** Trigerred when the `firstPageBtn` button is clicked (see `EpnTapUI.createNavigationPanel()`). Among other things, send a new query and fill `granulesGrid`. */ -- libgit2 0.21.2