GraphNodeModel » History » Version 1
Guanji Wang, 15/02/2016 17:21
1 | 1 | Guanji Wang | h1. GraphNodeModel |
---|---|---|---|
2 | 1 | Guanji Wang | |
3 | 1 | Guanji Wang | @/*************************************** |
4 | 1 | Guanji Wang | * Copyright 2010-2014 CNES - CENTRE NATIONAL d'ETUDES SPATIALES |
5 | 1 | Guanji Wang | * |
6 | 1 | Guanji Wang | * This file is part of SITools2. |
7 | 1 | Guanji Wang | * |
8 | 1 | Guanji Wang | * SITools2 is free software: you can redistribute it and/or modify |
9 | 1 | Guanji Wang | * it under the terms of the GNU General Public License as published by |
10 | 1 | Guanji Wang | * the Free Software Foundation, either version 3 of the License, or |
11 | 1 | Guanji Wang | * (at your option) any later version. |
12 | 1 | Guanji Wang | * |
13 | 1 | Guanji Wang | * SITools2 is distributed in the hope that it will be useful, |
14 | 1 | Guanji Wang | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | 1 | Guanji Wang | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | 1 | Guanji Wang | * GNU General Public License for more details. |
17 | 1 | Guanji Wang | * |
18 | 1 | Guanji Wang | * You should have received a copy of the GNU General Public License |
19 | 1 | Guanji Wang | * along with SITools2. If not, see <http://www.gnu.org/licenses/>. |
20 | 1 | Guanji Wang | ***************************************/ |
21 | 1 | Guanji Wang | /*global Ext, sitools, ID, i18n, document, showResponse, alertFailure, LOCALE, ImageChooser, |
22 | 1 | Guanji Wang | showHelp, loadUrl*/ |
23 | 1 | Guanji Wang | // define the key elements of a tree node |
24 | 1 | Guanji Wang | |
25 | 1 | Guanji Wang | Ext.define('sitools.admin.graphs.GraphNodeModel', { |
26 | 1 | Guanji Wang | extend : 'Ext.data.Model', |
27 | 1 | Guanji Wang | fields : [{ |
28 | 1 | Guanji Wang | name :'type' |
29 | 1 | Guanji Wang | }, { |
30 | 1 | Guanji Wang | name : 'description' |
31 | 1 | Guanji Wang | }, { |
32 | 1 | Guanji Wang | name : 'image' |
33 | 1 | Guanji Wang | }, { |
34 | 1 | Guanji Wang | name : 'nbRecord' |
35 | 1 | Guanji Wang | }, { |
36 | 1 | Guanji Wang | name : 'datasetId' |
37 | 1 | Guanji Wang | }, { |
38 | 1 | Guanji Wang | name : 'imageDs' |
39 | 1 | Guanji Wang | }, { |
40 | 1 | Guanji Wang | name : 'readme' |
41 | 1 | Guanji Wang | }, { |
42 | 1 | Guanji Wang | name : 'status' |
43 | 1 | Guanji Wang | }, { |
44 | 1 | Guanji Wang | name : 'visible' |
45 | 1 | Guanji Wang | }, { |
46 | 1 | Guanji Wang | name : 'url' |
47 | 1 | Guanji Wang | }, { |
48 | 1 | Guanji Wang | name : 'text' |
49 | 1 | Guanji Wang | }, { |
50 | 1 | Guanji Wang | name : 'iconCls', |
51 | 1 | Guanji Wang | convert : function (value, record) { |
52 | 1 | Guanji Wang | if (record.get("leaf")) { |
53 | 1 | Guanji Wang | return "x-tree-node-dataset"; |
54 | 1 | Guanji Wang | } else { |
55 | 1 | Guanji Wang | return "x-tree-node-folder"; |
56 | 1 | Guanji Wang | } |
57 | 1 | Guanji Wang | } |
58 | 1 | Guanji Wang | }] |
59 | 1 | Guanji Wang | });@ |