1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.BuilderDatabase = new Roo.XComponent({
10 'dc45dca245ff2f7b0a897d8a21b1873b' :"Displaying Images{0} - {1} of {2}",
11 '64e05c1766219647a3861e1419c75b6e' :"TOP LEVEL",
12 '651ae5789ab776f2fcaf80b5e62801dc' :"Tables",
13 '0c81971f67c0bd4b33799c5365ec2bf5' :"No Images found",
14 '6a844388ad911a9a292ca8936cd01208' :"Remove Group",
15 '4de4baf3480c0029c625937efcc38c37' :"Add Table/Container",
16 '51c45b795d5d18a3e4e0c37e8b20a141' :"Table",
17 '2f1fb3d9f25082e7fdb0befdad16da5f' :"Export Data",
18 '73eaab781d40c3cc779790197fbaae86' :"Manage Database",
19 'e1a0e2b1f38b57a8dc5aa6fecf0d5174' :"Sync Tables",
20 '81906cf98aa73f3353f46859f79e7ba1' :"Refresh/Manage Tables",
21 'b112803ab9deb7deba2a6b24ef3bb91a' :"Add Group",
22 'c1218806136c5a6445dcc48cec641fec' :"Refresh Schema"
25 part : ["Builder", "Database" ],
26 order : '999-Pman.Tab.BuilderDatabase',
28 parent : 'Pman.Tab.Builder',
29 name : "Pman.Tab.BuilderDatabase",
37 xtype : 'NestedLayoutPanel',
40 title : _this._strings['73eaab781d40c3cc779790197fbaae86'] /* Manage Database */,
42 activate : function (_self)
44 _this.treepanel.tree.root.reload();
50 xtype : 'BorderLayout',
54 xtype : 'LayoutRegion',
59 xtype : 'LayoutRegion',
70 render : function (_self)
72 _this.treepanel = _self;
84 text : _this._strings['b112803ab9deb7deba2a6b24ef3bb91a'] /* Add Group */,
86 click : function (_self, e)
88 _this.nIndex = _this.nIndex || 0;
90 var m = _this.cxnode.firstChild ? 'insertBefore' : 'appendChild';
91 var tree = _this.treepanel.tree;
93 var n = tree.loader.createNode({
95 descrip :'New Group ' + (++_this.nIndex),
99 var node = _this.cxnode[m]( n , _this.cxnode.firstChild);
100 setTimeout(function(){
101 tree.editor.editNode = node;
102 tree.editor.startEdit(node.ui.textNode);
116 text : _this._strings['6a844388ad911a9a292ca8936cd01208'] /* Remove Group */,
118 click : function (_self, e)
120 _this.nIndex = _this.nIndex || 0;
123 // try and delete it..
125 url : baseURL + '/Roo/Builder_tables',
127 _delete : _this.cxnode.attributes.id
129 success : function() {
130 _this.cxnode.parentNode.removeChild(_this.cxnode);
131 _this.cxnode = false;
149 xtype : 'SplitButton',
150 text : _this._strings['81906cf98aa73f3353f46859f79e7ba1'] /* Refresh/Manage Tables */,
152 click : function (_self, e)
154 _this.treepanel.tree.root.reload();
158 '|xns' : 'Roo.Toolbar',
166 text : _this._strings['4de4baf3480c0029c625937efcc38c37'] /* Add Table/Container */,
177 text : _this._strings['e1a0e2b1f38b57a8dc5aa6fecf0d5174'] /* Sync Tables */,
179 click : function (_self, e)
183 url: baseURL + '/Roo/Builder_tables.php',
201 text : _this._strings['2f1fb3d9f25082e7fdb0befdad16da5f'] /* Export Data */,
203 click : function (_self, e)
206 var node = _this.treepanel.tree.getSelectionModel().getSelectedNode();
209 Roo.MessageBox.alert('Error', 'Please select a table');
213 Roo.log(node.attributes.name);
216 url : baseURL + '/Roo/Builder_tables.php',
222 success : function() {
238 containerScroll : true,
243 beforeload : function (node)
245 if (!_this.panel.active) {
249 beforenodedrop : function (dropEvent)
252 var node = dropEvent.dropNode;
253 var targ = dropEvent.target;
254 var parent = dropEvent.target;
255 switch(dropEvent.point) {
258 parent = dropEvent.target.parentNode;
263 // technically you should not be able to drag tables into other modules..
264 if (parent.attributes.id < 1) {
265 dropEvent.cancel = 1;
268 url : baseURL + '/Roo/Builder_tables',
270 id : node.attributes.id,
271 parent_id : parent.attributes.id
277 contextmenu : function (node, e)
279 if (!node.expanded || node.leaf) {
283 _this.treepanel.menu = Roo.factory(_this.treepanel.menu);
284 _this.treepanel.menu.show(node.ui.anchor,'tr');
291 xtype : 'TreeEditor',
293 beforenodeedit : function (_self,node)
295 Roo.log('before start edit');
296 Roo.log(this.editNode);
297 if (node.attributes.name.length) {
303 complete : function (_self, value, startValue)
305 Roo.log(this.editNode);
307 var attr = this.editNode.attributes;
309 var pa = this.editNode.parentNode.attributes;
324 url : baseURL + '/Roo/Builder_tables',
337 xtype : 'AsyncTreeNode',
338 text : _this._strings['64e05c1766219647a3861e1419c75b6e'] /* TOP LEVEL */,
343 xtype : 'TreeLoader',
344 baseParams : { _tree: 1, 'sort': 'name', dir: 'ASC', limit : 9999 },
345 dataUrl : baseURL + '/Roo/Builder_tables.php',
346 queryParam : 'parent_id',
347 requestMethod : 'GET',
350 create : function (_self, attr)
354 attr.text = attr.name.length ? attr.name : attr.descrip;
356 attr.leaf = attr.name.length ? true : false;
357 attr.html = String.format('<B>{0}</B><i>{1}</i>',
373 xtype : 'MultiSelectionModel',
385 tableName : 'Tables',
386 title : _this._strings['651ae5789ab776f2fcaf80b5e62801dc'] /* Tables */,
388 activate : function() {
391 _this.grid.footer.onClick('first');
399 autoExpandColumn : 'table',
405 //_this.dialog = Pman.Dialog.FILL_IN
406 if (_this.panel.active) {
407 this.footer.onClick('first');
410 rowdblclick : function (_self, rowIndex, e)
416 _this.dialog.show( this.getDataSource().getAt(rowIndex), function() {
417 _this.grid.footer.onClick('first');
424 xtype : 'PagingToolbar',
426 displayMsg : _this._strings['dc45dca245ff2f7b0a897d8a21b1873b'] /* Displaying Images{0} - {1} of {2} */,
427 emptyMsg : _this._strings['0c81971f67c0bd4b33799c5365ec2bf5'] /* No Images found */,
439 cls : 'x-btn-text-icon',
440 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
441 text : _this._strings['c1218806136c5a6445dcc48cec641fec'] /* Refresh Schema */,
445 Roo.MessageBox.alert("Updating", "Updating the cache");
447 url : baseURL + '/Core/RefreshDatabaseCache',
449 success : function() {
450 Roo.MessageBox.hide();
456 '|xns' : 'Roo.Toolbar'
463 sortInfo : { field : 'filename', direction: 'ASC' },
469 url : baseURL + '/Builder/ERM.php',
474 xtype : 'JsonReader',
509 'name': 'displayorder',
517 'name': 'parent_image_id',
523 'dateFormat': 'Y-m-d'
550 'name': 'parent_image_id_id',
554 'name': 'parent_image_id_filename',
558 'name': 'parent_image_id_ontable',
562 'name': 'parent_image_id_onid',
566 'name': 'parent_image_id_mimetype',
570 'name': 'parent_image_id_width',
574 'name': 'parent_image_id_height',
578 'name': 'parent_image_id_filesize',
582 'name': 'parent_image_id_displayorder',
586 'name': 'parent_image_id_language',
590 'name': 'parent_image_id_parent_image_id',
594 'name': 'parent_image_id_created',
598 'name': 'parent_image_id_imgtype',
602 'name': 'parent_image_id_linkurl',
606 'name': 'parent_image_id_descript',
610 'name': 'parent_image_id_title',
614 'name': 'parent_image_id_credit',
618 'name': 'parent_image_id_source',
624 totalProperty : 'total',
631 xtype : 'ColumnModel',
633 header : _this._strings['51c45b795d5d18a3e4e0c37e8b20a141'] /* Table */,
634 renderer : function(v) { return String.format('{0}', v); },