php7 fixes
[Pman.Builder] / Pman.Tab.BuilderPalette.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Roo.namespace('Pman.Tab');
6
7 Pman.Tab.BuilderPalette = new Roo.XComponent({
8
9  _strings : {
10   '5ca5a8d02077b7f6a0da48bda450f755' :"palette",
11   '49ee3087348e8d44e1feda1917443987' :"Name"
12  },
13
14   part     :  ["Builder", "Palette" ],
15   order    : '001-Pman.Tab.BuilderPalette',
16   region   : 'center',
17   parent   : 'Pman.Tab.BuilderTab',
18   name     : "Pman.Tab.BuilderPalette",
19   disabled : false, 
20   permname : '', 
21   _tree : function(_data)
22   {
23    var _this = this;
24    var MODULE = this;
25    return {
26    xtype : 'GridPanel',
27    background : true,
28    fitContainer : true,
29    fitToframe : true,
30    region : 'east',
31    tableName : 'palette',
32    title : _this._strings['5ca5a8d02077b7f6a0da48bda450f755'] /* palette */,
33    listeners : {
34     activate : function() {
35          _this.panel = this;
36          if (_this.grid) {
37             _this.grid.ds.load({})
38          }
39      }
40    },
41    xns : Roo,
42    '|xns' : 'Roo',
43    grid : {
44     xtype : 'Grid',
45     autoExpandColumn : 'name',
46     ddGroup : 'component',
47     enableDrag : true,
48     loadMask : true,
49     listeners : {
50      render : function() 
51       {
52           _this.grid = this; 
53           //_this.dialog = Pman.Dialog.FILL_IN
54           if (_this.panel.active) {
55              this.ds.load({});
56           }
57           if (_this.ss) {
58               return;
59           }
60           _this.ss =   Roo.util.CSS.createStyleSheet(
61               '.pman-builder-palete-hide { display: none; } ' + "\n" 
62           , Roo.id());
63                   
64           
65           
66       },
67      rowclass : function (gridview, rowcfg)
68       {
69           var sn = Pman.Builder.Tree.currentNodeType();
70         //  Roo.log(rowcfg);
71           if (!sn) {
72               sn = '*top';
73           }
74           var cls = 'pman-builder-palete-hide';
75        
76           Roo.each(rowcfg.record.json.parents, function(n) {
77               if (n == sn || n.split(':').shift() == sn) {
78                   cls = '';
79                   return true;
80               }
81            });
82            
83            //Roo.log(cls);
84            rowcfg.rowClass = cls;
85           // what is the currently selected element..
86        
87       }
88     },
89     xns : Roo.grid,
90     '|xns' : 'Roo.grid',
91     dataSource : {
92      xtype : 'Store',
93      remoteSort : true,
94      sortInfo : { field : 'name', direction: 'ASC' },
95      xns : Roo.data,
96      '|xns' : 'Roo.data',
97      proxy : {
98       xtype : 'HttpProxy',
99       method : 'GET',
100       url : baseURL + '/Builder/Palette.php',
101       xns : Roo.data,
102       '|xns' : 'Roo.data'
103      },
104      reader : {
105       xtype : 'JsonReader',
106       fields : [
107           
108           {
109               'name': 'name',
110               'type': 'string'
111           }
112       ],
113       id : 'id',
114       root : 'data',
115       totalProperty : 'total',
116       xns : Roo.data,
117       '|xns' : 'Roo.data'
118      }
119     },
120     sm : {
121      xtype : 'RowSelectionModel',
122      singleSelect : true,
123      xns : Roo.grid,
124      '|xns' : 'Roo.grid'
125     },
126     colModel : [
127      {
128       xtype : 'ColumnModel',
129       dataIndex : 'name',
130       header : _this._strings['49ee3087348e8d44e1feda1917443987'] /* Name */,
131       renderer : function(v) { return String.format('{0}', v); },
132       width : 200,
133       xns : Roo.grid,
134       '|xns' : 'Roo.grid'
135      }
136     ]
137    }
138   };  }
139 });