Blame view

js/app/models/Catalog.js 1.35 KB
f792a3de   elena   catalog ihm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
 * Project      : AMDA-NG
 * Name         : Catalog.js 
 * Description  : Catalog Object Definition
 * @class amdaModel.Catalog
 * @extends amdaModel.TimeTable 
 * @author  elena
 */

  

Ext.define('amdaModel.Catalog', {
	
    extend: 'amdaModel.TimeTable',
    
    fields : [
8b11b1af   Benjamin Renard   Insert intervals ...
17
	      { name: 'parameters' },
e1fdab74   Hacene SI HADJ MOHAND   starting
18
19
              { name: 'nbParameters', type: 'int', defaultValue: 1},
              {name: 'relatedTimeTableId', type: 'string', defaultValue: ""}
f792a3de   elena   catalog ihm
20
21
22
23
24
25
26
27
	],
    
    getJsonValues : function (hasId) {
    	var values  = new Object();	    
    	if (hasId) {
    		values.id = this.get('id');
    	}
    	
d18b535d   elena   catalog draft + c...
28
	values.timesrc =   this.get('timesrc');
f792a3de   elena   catalog ihm
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    	values.name = this.get('name');
    	values.created = this.get('created');
	
    	if (this.get('description').match(/[a-z,0-9]/gi) != null) {
    		values.description = this.get('description');
    	}
//     	if (this.get('history').match(/[a-z,0-9]/gi) != null) {
//     		values.history = this.get('history');
//     	}
    	values.objName = this.get('objName');
    	values.objFormat = this.get('objFormat');
        values.folderId = this.get('folderId');
    	values.nbIntervals = this.get('nbIntervals');
    	values.cacheToken = this.get('cacheToken');
d18b535d   elena   catalog draft + c...
43
   	values.parameters = this.get('parameters');
f792a3de   elena   catalog ihm
44
45
46
47
48
49
50
    	values.leaf = true;
    	values.nodeType = amdaModel.CatalogNode.nodeType;
    	return values;
    }
	
	
 
8b11b1af   Benjamin Renard   Insert intervals ...
51
});