1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Dialog.BuilderAddTable = {
10 show : function(data, cb)
18 this.dialog.show(this.data._el);
21 this.form.setValues(data);
22 this.form.fireEvent('actioncomplete', this.form, { type: 'setdata', data: data });
30 this.dialog = Roo.factory({
31 xtype: 'LayoutDialog',
34 show : function (_self)
36 _this.grid.ds.load({});
43 title : "Select columns to use",
50 activate : function() {
53 _this.grid.ds.load({});
70 //_this.dialog = Pman.Dialog.FILL_IN
71 if (_this.panel.active) {
75 cellclick : function (_self, ri, ci , e)
77 if (ci > 1) {return; }
79 var rec = this.ds.getAt(ri);
80 var di = this.cm.getDataIndex(ci);
81 rec.set(di, (rec.data[di] * 1) ? 0 : 1);
88 autoExpandColumn : 'desc',
94 beforeload : function (_self, options)
96 if (typeof(_this.data) == 'undefined') {
100 options.params = options.params || {};
101 options.params.table = _this.data.table;
105 sortInfo : { field : 'filename', direction: 'ASC' },
110 url : baseURL + '/Builder/ERM.php'
117 totalProperty : 'total',
119 { name: 'use', type: 'int'} ,
120 { name: 'use_ex', type: 'int'},
121 'table', 'column', 'ctype', 'desc', 'columnshort'
138 cls : 'x-btn-text-icon',
140 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
148 // Pman.genericDelete(_this, 'Images');
151 cls : 'x-btn-text-icon',
153 icon : rootURL + '/Pman/templates/images/trash.gif'
159 xtype: 'ColumnModel',
164 renderer : function(v) {
165 var state = v> 0 ? '-checked' : '';
167 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
171 xtype: 'ColumnModel',
173 dataIndex : 'use_ex',
174 header : 'Display/Expand',
176 renderer : function(v) {
177 var state = v> 0 ? '-checked' : '';
179 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
184 xtype: 'ColumnModel',
189 renderer : function(v) { return String.format('{0}', v); }
192 xtype: 'ColumnModel',
194 dataIndex : 'column',
197 renderer : function(v,x,r) {
198 if (r.data.table == _this.data.table) {
200 return String.format('{0}', v);
202 return String.format('.....{0}', r.data.columnshort);
206 xtype: 'ColumnModel',
211 renderer : function(v) {
217 if ((v & 8) > 0 && (v & 4) > 0) return 'DATETIME';
218 if ((v & 8) > 0) return 'TIME';
219 if ((v & 4) > 0) return 'DATE';
220 if ((v & 16) > 0) return 'BOOL';
221 if ((v & 2) > 0) return 'STRING';
222 if ((v & 1) > 0) return 'NUMBER';
228 xtype: 'ColumnModel',
231 header : 'Description',
233 renderer : function(v) { return String.format('{0}', v); }
240 xtype: 'LayoutRegion',
248 click : function (_self, e)
259 click : function (_self, e)
264 _this.dialog.el.mask("Saving");
265 _this.form.doAction("submit");