1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Pman.Tab.BuilderTop = new Roo.XComponent({
6 part : ["Builder","Top"],
7 order : '001-Pman.Tab.BuilderTop',
9 parent : 'Pman.Tab.BuilderTab',
10 name : "Pman.Tab.BuilderTop",
18 xtype: 'ContentPanel',
30 text : "Manage Modules",
39 click : function (_self, e)
41 Pman.Dialog.BuilderModule.show({
45 _this.modsel.setFromData(data);
52 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
58 click : function (_self, e)
61 if (!_this.modsel.getValue()) {
62 Roo.MessageBox.alert("Error", "Select Module");
65 Pman.Dialog.BuilderModule.show( { id : _this.modsel.getValue() } ,function(data) {
67 _this.modsel.setFromData(data);
79 click : function (_self, e)
95 click : function (_self, e)
99 url : baseURL + '/Roo/Builder_modules.php',
103 success : function() {
104 Roo.MessageBox.alert("Done", "Re-syned modules");
118 select : function (combo, record, index)
120 _this.filesel.reset();
121 _this.filesel.fireEvent('select', false);
124 render : function (_self)
131 displayField : 'name',
133 forceSelection : true,
135 loadingText : "Searching...",
138 queryParam : 'query[name]',
139 selectOnFocus : true,
140 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b></div>',
141 triggerAction : 'all',
149 sortInfo : { field : 'name' , direction : 'ASC' },
154 url : baseURL + '/Roo/Builder_modules.php'
161 totalProperty : 'total',
176 text : "Manage Parts ",
185 click : function (_self, e)
187 if (!_this.modsel.getValue()) {
188 Roo.MessageBox.alert("Error", "Select Module");
191 if (!_this.filesel.getValue()) {
192 Roo.MessageBox.alert("Error", "Select Part");
195 Pman.Dialog.BuilderPart.show( {
196 id : _this.filesel.getValue(),
197 module_id: _this.modsel.getValue()
200 //_this.filesel.reset();
204 _this.filesel.setFromData(data);
205 // set the part name on the json..
208 pt.loadBJS(_this.modsel.getValue(), _this.filesel.getValue())
214 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
224 click : function (_self, e)
226 if (!_this.modsel.getValue()) {
227 Roo.MessageBox.alert("Error", "Select Module");
231 Pman.Dialog.BuilderPart.show( {
233 module_id: _this.modsel.getValue()
236 _this.filesel.reset();
240 _this.filesel.setfromdata(data);
241 Pman.Builder.Tree.clearAll();
242 Pman.Builder.Tree.setCurrentNode(Pman.Tab.BuilderTree.tree.root,true);
244 Pman.Tab.BuilderPanel.redraw.defer(100,Pman.Tab.BuilderPanel,[true]);
250 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
256 click : function (_self, e)
258 Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete it?", function(a) {
265 url : baseURL + '/Roo/Builder_part',
268 _delete : _this.filesel.getValue()
270 success : function() {
271 _this.filesel.setValue('');
273 _this.filesel.fireEvent('select', false);
274 // Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
293 click : function (_self, e)
295 if (!_this.modsel.getValue()) {
296 Roo.MessageBox.alert("Error", "Select Module");
299 if (!_this.filesel.getValue()) {
300 Roo.MessageBox.alert("Error", "Select Part");
303 Pman.Dialog.BuilderImport.show( {
304 id : _this.filesel.getValue(),
305 module_id: _this.modsel.getValue()
308 var bt = Pman.Tab.BuilderTree.tree;
309 var pt = Pman.Builder.Tree;
312 //bv.panel.el.unmask();
313 Pman.Tab.BuilderTab.layout.getRegion('west').el.unmask();
314 pt.loadBJS(_this.modsel.getValue(), _this.filesel.getValue())
321 text : "Import (by pasting)",
322 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
331 select : function (combo, rec, index)
333 //cb.lastData = rec.data;
338 var bt = Pman.Tab.BuilderTree.tree;
339 var pt = Pman.Builder.Tree;
343 pt.setCurrentNode(bt.root,true);
344 // var bv = Pman.Tab.BuilderView;
345 Pman.Tab.BuilderView.panel.clearAll();
346 Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
347 // bv.panel.el.mask("select Module / Part");
350 //bv.panel.el.unmask();
351 Pman.Tab.BuilderTab.layout.getRegion('west').el.unmask();
352 pt.loadBJS(_this.modsel.getValue(), rec.data.id)
356 render : function (_self)
358 _this.filesel = this;
363 displayField : 'name',
365 forceSelection : true,
367 loadingText : "Searching...",
370 queryParam : 'query[name]',
371 selectOnFocus : true,
372 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b></div>',
373 triggerAction : 'all',
381 beforeload : function (_self, o)
383 o.params = o.params || {};
384 // o.params.btype = 'FORM';
385 if (!_this.modsel.getValue()) {
386 Roo.MessageBox.alert("Error", "Select Module");
389 o.params.module_id = _this.modsel.getValue();
390 o.params._columns = 'id,name';
394 sortInfo : { field : 'name' , direction : 'ASC' },
399 url : baseURL + '/Roo/Builder_part.php'
406 totalProperty : 'total',
418 xtype: 'SplitButton',
421 click : function (_self, e)
425 render : function (_self)
427 _this.saveBtn = this;
430 cls : 'x-btn-text-icon',
432 icon : rootURL + '/Pman/templates/images/save.gif',
441 click : function (_self, e)
443 Pman.Builder.save(false,0);
446 text : "Save a copy as",
447 icon : rootURL + '/Pman/templates/images/save.gif'
453 click : function (_self, e)
459 Pman.Dialog.BuilderViewCode.show(data );
465 text : "Show JSON / Javascript HTML"
475 xtype: 'SplitButton',
478 click : function (_self, e)
480 Pman.Tab.BuilderView.panel.redraw();
492 click : function (_self, e)
494 _this.redrawBtn.setText("Redraw (AUTO OFF)");
495 _this.redrawBtn.auto = 0;
499 text : "Auto redraw - OFF"
505 click : function (_self, e)
508 _this.redrawBtn.setText("Redraw");
509 _this.redrawBtn.auto = 1;
510 var bp = Pman.Tab.BuilderPanel;
511 bp.redraw.defer(100,bp,[true]);
516 text : "Auto redraw - On"
529 select : function (combo, record, index)
531 Pman.Builder.View.frameUpdateTheme(record.data.name);
535 displayField : 'name',
537 emptyText : "Select Theme",
538 forceSelection : true,
541 loadingText : "Searching...",
545 qtip : "Select Theme",
547 selectOnFocus : true,
548 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
549 triggerAction : 'all',
557 beforeload : function (_self, o){
558 o.params = o.params || {};
563 sortInfo : { direction : 'ASC', field: 'name' },
568 url : baseURL + '/Builder/Themes'
575 totalProperty : 'total',