php warnings
[Pman.MTrack] / Pman.Tab.MTrackRepos.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.MTrackRepos = new Roo.XComponent({
8
9  _strings : {
10   'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
11   '9e727fdd3aec8274f46685441900280d' :"Project",
12   '7dce122004969d56ae2e0245cb754d35' :"Edit",
13   '73cdcee8881d309dd256134f98347769' :"Repopath",
14   '30269022e9d8f51beaabb52e5d0de2b7' :"Parent",
15   'de1f88f6f7789baf4d35f2919f100fc3' :"Repositories",
16   '97ec8018c492164da252cbaf95f0fa98' :"Shortname",
17   'a4cf31f8bea7da20524198fbe5c0db2a' :"No mtrack_repos found",
18   'f1c61eb7938469f5aa08964c8b2be862' :"Scmtype",
19   'b5a7adde1af5c87d7fd797b6245c2a39' :"Description",
20   '6c47888cc8867737f167632508b2f58b' :"Displaying mtrack_repos{0} - {1} of {2}"
21  },
22
23   part     :  ["MTrack", "Repos" ],
24   order    : '001-Pman.Tab.MTrackRepos',
25   region   : 'center',
26   parent   : 'Pman.Tab.MTrack',
27   name     : "Pman.Tab.MTrackRepos",
28   disabled : false, 
29   permname : '', 
30   _tree : function(_data)
31   {
32    var _this = this;
33    var MODULE = this;
34    return {
35    xtype : 'GridPanel',
36    background : true,
37    fitContainer : true,
38    fitToframe : true,
39    region : 'center',
40    tableName : 'mtrack_repos',
41    title : _this._strings['de1f88f6f7789baf4d35f2919f100fc3'] /* Repositories */,
42    listeners : {
43     activate : function() {
44          _this.panel = this;
45          if (_this.grid) {
46              _this.grid.footer.onClick('first');
47          }
48      }
49    },
50    xns : Roo,
51    '|xns' : 'Roo',
52    grid : {
53     xtype : 'Grid',
54     autoExpandColumn : 'shortname',
55     loadMask : true,
56     listeners : {
57      render : function() 
58       {
59           _this.grid = this; 
60           _this.dialog = Pman.Dialog.MTrackRepos;
61           if (_this.panel.active) {
62              this.footer.onClick('first');
63           }
64       },
65      rowdblclick : function (_self, rowIndex, e)
66       {
67           if (!_this.dialog)  { return; }
68           _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
69               _this.grid.footer.onClick('first');
70           }); 
71       }
72     },
73     xns : Roo.grid,
74     '|xns' : 'Roo.grid',
75     footer : {
76      xtype : 'PagingToolbar',
77      displayInfo : true,
78      displayMsg : _this._strings['6c47888cc8867737f167632508b2f58b'] /* Displaying mtrack_repos{0} - {1} of {2} */,
79      emptyMsg : _this._strings['a4cf31f8bea7da20524198fbe5c0db2a'] /* No mtrack_repos found */,
80      pageSize : 25,
81      xns : Roo,
82      '|xns' : 'Roo'
83     },
84     toolbar : {
85      xtype : 'Toolbar',
86      xns : Roo,
87      '|xns' : 'Roo',
88      items  : [
89       {
90        xtype : 'Button',
91        cls : 'x-btn-text-icon',
92        icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
93        text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
94        listeners : {
95         click : function()
96          {
97              if (!_this.dialog) { return; }
98              _this.dialog.show( { id : 0 } , function() {
99                  _this.grid.footer.onClick('first');
100             }); 
101          }
102        },
103        xns : Roo.Toolbar,
104        '|xns' : 'Roo.Toolbar'
105       },
106       {
107        xtype : 'Button',
108        cls : 'x-btn-text-icon',
109        icon : Roo.rootURL + 'images/default/tree/leaf.gif',
110        text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
111        listeners : {
112         click : function()
113          {
114              var s = _this.grid.getSelectionModel().getSelections();
115              if (!s.length || (s.length > 1))  {
116                  Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
117                  return;
118              }
119              if (!_this.dialog) { return; }
120              _this.dialog.show(s[0].data, function() {
121                  _this.grid.footer.onClick('reload');
122              }); 
123              
124          }
125        },
126        xns : Roo.Toolbar,
127        '|xns' : 'Roo.Toolbar'
128       }
129      ]
130     },
131     dataSource : {
132      xtype : 'Store',
133      remoteSort : true,
134      sortInfo : { field : 'shortname', direction: 'ASC' },
135      xns : Roo.data,
136      '|xns' : 'Roo.data',
137      proxy : {
138       xtype : 'HttpProxy',
139       method : 'GET',
140       url : baseURL + '/Roo/mtrack_repos.php',
141       xns : Roo.data,
142       '|xns' : 'Roo.data'
143      },
144      reader : {
145       xtype : 'JsonReader',
146       fields : [
147           {
148               'name': 'id',
149               'type': 'int'
150           },
151           {
152               'name': 'shortname',
153               'type': 'string'
154           },
155           {
156               'name': 'scmtype',
157               'type': 'string'
158           },
159           {
160               'name': 'repopath',
161               'type': 'string'
162           },
163           {
164               'name': 'browserurl',
165               'type': 'string'
166           },
167           {
168               'name': 'browsertype',
169               'type': 'string'
170           },
171           {
172               'name': 'description',
173               'type': 'string'
174           },
175           {
176               'name': 'serverurl',
177               'type': 'string'
178           },
179           {
180               'name': 'parent',
181               'type': 'string'
182           },
183           {
184               'name': 'clonedfrom',
185               'type': 'int'
186           },
187           {
188               'name': 'project_id',
189               'type': 'int'
190           }
191       ],
192       id : 'id',
193       root : 'data',
194       totalProperty : 'total',
195       xns : Roo.data,
196       '|xns' : 'Roo.data'
197      }
198     },
199     colModel : [
200      {
201       xtype : 'ColumnModel',
202       dataIndex : 'project_id_name',
203       header : _this._strings['9e727fdd3aec8274f46685441900280d'] /* Project */,
204       renderer : function(v) { return String.format('{0}', v); },
205       width : 150,
206       xns : Roo.grid,
207       '|xns' : 'Roo.grid'
208      },
209      {
210       xtype : 'ColumnModel',
211       dataIndex : 'shortname',
212       header : _this._strings['97ec8018c492164da252cbaf95f0fa98'] /* Shortname */,
213       renderer : function(v) { return String.format('{0}', v); },
214       width : 200,
215       xns : Roo.grid,
216       '|xns' : 'Roo.grid'
217      },
218      {
219       xtype : 'ColumnModel',
220       dataIndex : 'scmtype',
221       header : _this._strings['f1c61eb7938469f5aa08964c8b2be862'] /* Scmtype */,
222       renderer : function(v) { return String.format('{0}', v); },
223       width : 70,
224       xns : Roo.grid,
225       '|xns' : 'Roo.grid'
226      },
227      {
228       xtype : 'ColumnModel',
229       dataIndex : 'repopath',
230       header : _this._strings['73cdcee8881d309dd256134f98347769'] /* Repopath */,
231       renderer : function(v) { return String.format('{0}', v); },
232       width : 100,
233       xns : Roo.grid,
234       '|xns' : 'Roo.grid'
235      },
236      {
237       xtype : 'ColumnModel',
238       dataIndex : 'description',
239       header : _this._strings['b5a7adde1af5c87d7fd797b6245c2a39'] /* Description */,
240       renderer : function(v) { return String.format('{0}', v); },
241       width : 200,
242       xns : Roo.grid,
243       '|xns' : 'Roo.grid'
244      },
245      {
246       xtype : 'ColumnModel',
247       dataIndex : 'parent',
248       header : _this._strings['30269022e9d8f51beaabb52e5d0de2b7'] /* Parent */,
249       renderer : function(v) { return String.format('{0}', v); },
250       width : 100,
251       xns : Roo.grid,
252       '|xns' : 'Roo.grid'
253      }
254     ]
255    }
256   };  }
257 });