git_sitools_idoc / flarecast / workspace / client-public-3.0 / js / widget / sitoolsFilter / FiltersCollection.js @ master
1 |
/*******************************************************************************
|
---|---|
2 |
* Copyright 2010-2014 CNES - CENTRE NATIONAL d'ETUDES SPATIALES
|
3 |
*
|
4 |
* This file is part of SITools2.
|
5 |
*
|
6 |
* SITools2 is free software: you can redistribute it and/or modify
|
7 |
* it under the terms of the GNU General Public License as published by
|
8 |
* the Free Software Foundation, either version 3 of the License, or
|
9 |
* (at your option) any later version.
|
10 |
*
|
11 |
* SITools2 is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with SITools2. If not, see <http://www.gnu.org/licenses/>.
|
18 |
******************************************************************************/
|
19 |
/*global Ext, i18n, loadUrl, getDesktop, sitools, SitoolsDesk */
|
20 |
Ext.namespace("sitools.public.widget.sitoolsFilter");
|
21 |
|
22 |
Ext.define('sitools.public.widget.sitoolsFilter.FiltersCollection', {
|
23 |
extend : 'Ext.util.MixedCollection', |
24 |
|
25 |
constructor : function (config) { |
26 |
this.callParent([config]);
|
27 |
if (!Ext.isEmpty(config)) {
|
28 |
this.addAll(config.filters);
|
29 |
} |
30 |
}, |
31 |
|
32 |
|
33 |
getFilterData : function(){ |
34 |
var filters = [];
|
35 |
this.each(function (filter, index, length) { |
36 |
filters.push(filter); |
37 |
}); |
38 |
return filters;
|
39 |
} |
40 |
|
41 |
}); |