Commit 0c2b3220773ca110a8bb5c5e45751a1bf079db19
1 parent
07954c73
Exists in
master
and in
111 other branches
epntap: Remove metadata-related code
Showing
1 changed file
with
14 additions
and
58 deletions
Show diff stats
js/app/controllers/EpnTapModule.js
@@ -86,20 +86,6 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -86,20 +86,6 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
86 | this.onGranuleSelected(record.data['id']); | 86 | this.onGranuleSelected(record.data['id']); |
87 | }, this); | 87 | }, this); |
88 | 88 | ||
89 | - this.productTypeCB.on('select', function(cb) { | ||
90 | - this.onProductTypeCBChanged(cb.value); | ||
91 | - this.updateNbResults(); | ||
92 | - }, this); | ||
93 | - | ||
94 | - this.targetNameCB.on('select', function(cb) { | ||
95 | - this.onTargetNameCBChanged(cb.value); | ||
96 | - this.updateNbResults(); | ||
97 | - }, this); | ||
98 | - | ||
99 | - this.rowsPerPageNf.on('change', function(rowsPerPageNf, newValue) { | ||
100 | - this.onRowsPerPageChanged(newValue); | ||
101 | - }, this); | ||
102 | - | ||
103 | this.firstPageBtn.on('click', function() { | 89 | this.firstPageBtn.on('click', function() { |
104 | this.onFirstPageBtnClicked(); | 90 | this.onFirstPageBtnClicked(); |
105 | }, this); | 91 | }, this); |
@@ -117,6 +103,10 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -117,6 +103,10 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
117 | }, this); | 103 | }, this); |
118 | }, | 104 | }, |
119 | 105 | ||
106 | + /********************** | ||
107 | + *** Utils functions *** | ||
108 | + **********************/ | ||
109 | + | ||
120 | /** | 110 | /** |
121 | Capitalize a name and replace underscores with spaces. | 111 | Capitalize a name and replace underscores with spaces. |
122 | - `name`: The string to make pretty. | 112 | - `name`: The string to make pretty. |
@@ -144,6 +134,16 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -144,6 +134,16 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
144 | return true; | 134 | return true; |
145 | }, | 135 | }, |
146 | 136 | ||
137 | + /** | ||
138 | + Disable or enable the navigation buttons (see `EpnTapUI.createNavigationPanel()`). | ||
139 | + */ | ||
140 | + disableNavBtns: function(firt, previous, next, last) { | ||
141 | + this.firstPageBtn.setDisabled(firt); | ||
142 | + this.previousPageBtn.setDisabled(previous); | ||
143 | + this.nextPageBtn.setDisabled(next); | ||
144 | + this.lastPageBtn.setDisabled(last); | ||
145 | + }, | ||
146 | + | ||
147 | /**************************** | 147 | /**************************** |
148 | *** Service filter events *** | 148 | *** Service filter events *** |
149 | ****************************/ | 149 | ****************************/ |
@@ -158,65 +158,21 @@ Ext.define('amdaDesktop.EpnTapModule', { | @@ -158,65 +158,21 @@ Ext.define('amdaDesktop.EpnTapModule', { | ||
158 | this.addUIListeners(); | 158 | this.addUIListeners(); |
159 | 159 | ||
160 | // this.servicesStore.clearFilter(); | 160 | // this.servicesStore.clearFilter(); |
161 | - // this.metadataStore.clearFilter(); | ||
162 | this.granulesStore.removeAll(); | 161 | this.granulesStore.removeAll(); |
163 | 162 | ||
164 | - this.productTypeCB.getStore().add({'id': 'all', 'name': 'All dataproduct types'}); | ||
165 | - | ||
166 | if(target) { | 163 | if(target) { |
167 | this.targetNameCB.getStore().add({'id': target[0], 'name': this.prettify(target[0])}); | 164 | this.targetNameCB.getStore().add({'id': target[0], 'name': this.prettify(target[0])}); |
168 | this.targetNameCB.select(target[0]); | 165 | this.targetNameCB.select(target[0]); |
169 | this.productTypeCB.select(target[1]); | 166 | this.productTypeCB.select(target[1]); |
170 | this.updateNbResults(); | 167 | this.updateNbResults(); |
171 | - } else { | ||
172 | - this.targetNameCB.select('all'); | ||
173 | - this.productTypeCB.select('all'); | ||
174 | - | ||
175 | - // this.servicesStore.each(function(record, idx) { | ||
176 | - // record.set('nb_results', this.metadataStore.sum('nb_results')); | ||
177 | - // }, this); | ||
178 | } | 168 | } |
179 | }, | 169 | }, |
180 | 170 | ||
181 | - /** | ||
182 | - Trigerred when *the user* (not `productTypeCB.select()`) select a new item in `productTypeCB` | ||
183 | - (see `EpnTapUI.createProductTypeCB()`). | ||
184 | - Among other things, updates the `servicesGrid` table. | ||
185 | - */ | ||
186 | - onProductTypeCBChanged: function() { | ||
187 | - }, | ||
188 | - | ||
189 | - /** | ||
190 | - Trigerred when the user select a new item in `targetNameCB` (see `EpnTapUI.createTargetNameCB()`). | ||
191 | - Updates the `servicesGrid` table. | ||
192 | - */ | ||
193 | - onTargetNameCBChanged: function() { | ||
194 | - this.granulesStore.removeAll(); | ||
195 | - }, | ||
196 | - | ||
197 | - /** | ||
198 | - Trigerred when the value of `rowsPerPageNf` is updated (see `EpnTapUI.createRowsPerPageNf()`). Do nothing yet, used | ||
199 | - for debug purposes only. | ||
200 | - */ | ||
201 | - onRowsPerPageChanged: function() { | ||
202 | - // console.log("rows per page: " + this.productTypeCB); | ||
203 | - }, | ||
204 | - | ||
205 | /********************* | 171 | /********************* |
206 | *** Buttons events *** | 172 | *** Buttons events *** |
207 | *********************/ | 173 | *********************/ |
208 | 174 | ||
209 | /** | 175 | /** |
210 | - Disable or enable the navigation buttons (see `EpnTapUI.createNavigationPanel()`). | ||
211 | - */ | ||
212 | - disableNavBtns: function(firt, previous, next, last) { | ||
213 | - this.firstPageBtn.setDisabled(firt); | ||
214 | - this.previousPageBtn.setDisabled(previous); | ||
215 | - this.nextPageBtn.setDisabled(next); | ||
216 | - this.lastPageBtn.setDisabled(last); | ||
217 | - }, | ||
218 | - | ||
219 | - /** | ||
220 | Trigerred when the `firstPageBtn` button is clicked (see `EpnTapUI.createNavigationPanel()`). Among other things, | 176 | Trigerred when the `firstPageBtn` button is clicked (see `EpnTapUI.createNavigationPanel()`). Among other things, |
221 | send a new query and fill `granulesGrid`. | 177 | send a new query and fill `granulesGrid`. |
222 | */ | 178 | */ |