git_sitools_idoc / szcluster-db / workspace / client-user / js / components / datasetServices / columnsDefinitionService.js @ master
1 | 36171e6e | Alessandro_N | /*******************************************************************************
|
---|---|---|---|
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 it under the
|
||
7 | * terms of the GNU General Public License as published by the Free Software
|
||
8 | * Foundation, either version 3 of the License, or (at your option) any later
|
||
9 | * version.
|
||
10 | *
|
||
11 | * SITools2 is distributed in the hope that it will be useful, but WITHOUT ANY
|
||
12 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||
13 | * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||
14 | *
|
||
15 | * You should have received a copy of the GNU General Public License along with
|
||
16 | * SITools2. If not, see <http://www.gnu.org/licenses/>.
|
||
17 | ******************************************************************************/
|
||
18 | /*
|
||
19 | * global Ext, sitools, ID, i18n, document, showResponse, alertFailure, LOCALE,
|
||
20 | * ImageChooser, loadUrl, extColModelToStorage, SitoolsDesk
|
||
21 | */
|
||
22 | |||
23 | Ext.namespace('sitools.user.component.dataviews.services');
|
||
24 | |||
25 | /**
|
||
26 | * GUI Service to download a data selection from the dataset
|
||
27 | *
|
||
28 | * @required datasetId
|
||
29 | * @required datasetUrl
|
||
30 | * @cfg {Ext.data.JsonStore} the store where nodes are saved
|
||
31 | * @class sitools.user.component.dataviews.services.addSelectionService
|
||
32 | * @extends Ext.Window
|
||
33 | */
|
||
34 | |||
35 | sitools.user.component.dataviews.services.columnsDefinitionService = {}; |
||
36 | |||
37 | sitools.user.component.dataviews.services.columnsDefinitionService.getParameters = function() { |
||
38 | return [];
|
||
39 | }; |
||
40 | |||
41 | sitools.user.component.dataviews.services.columnsDefinitionService.executeAsService = function( |
||
42 | config) { |
||
43 | var windowConfig = {
|
||
44 | title : "Dataset definitions", //i18n.get('label.definitionTitle') + " : " |
||
45 | // + config.dataview.datasetName,
|
||
46 | datasetName : config.dataview.datasetName,
|
||
47 | iconCls : "semantic", |
||
48 | datasetDescription : config.datasetDescription,
|
||
49 | type : "defi", |
||
50 | saveToolbar : true, |
||
51 | toolbarItems : []
|
||
52 | }; |
||
53 | |||
54 | var javascriptObject = sitools.user.component.columnsDefinition;
|
||
55 | |||
56 | Ext.apply(windowConfig, { |
||
57 | id : "defi" + config.dataview.datasetId |
||
58 | }); |
||
59 | var componentCfg = {
|
||
60 | datasetId : config.dataview.datasetId,
|
||
61 | datasetCm : config.dataview.datasetCm,
|
||
62 | datasetName : config.dataview.datasetName,
|
||
63 | dictionaryMappings : config.dataview.dictionaryMappings,
|
||
64 | preferencesPath : "/" + config.dataview.datasetName, |
||
65 | preferencesFileName : "semantic" |
||
66 | }; |
||
67 | |||
68 | SitoolsDesk.addDesktopWindow(windowConfig, componentCfg, javascriptObject); |
||
69 | }; |