Project

General

Profile

GraphNodeModel » History » Version 1

Anonymous, 15/02/2016 17:21

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