Project

General

Profile

GraphNodeModel » History » Version 2

Guanji Wang, 15/02/2016 17:22

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