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");
192 Pman.Dialog.BuilderPart.show( {
194 module_id: _this.modsel.getValue()
197 _this.filesel.reset();
201 _this.filesel.setfromdata(data);
202 Pman.Builder.Tree.clearAll();
203 Pman.Builder.Tree.setCurrentNode(Pman.Tab.BuilderTree.tree.root,true);
205 Pman.Tab.BuilderPanel.redraw.defer(100,Pman.Tab.BuilderPanel,[true]);
211 icon : Roo.rootURL + 'images/default/dd/drop-add.gif'
217 click : function (_self, e)
219 Roo.MessageBox.confirm("Confirm", "Are you sure you want to delete it?", function(a) {
226 url : baseURL + '/Roo/Builder_part',
229 _delete : _this.filesel.getValue()
231 success : function() {
232 _this.filesel.setValue('');
234 _this.filesel.fireEvent('select', false);
235 // Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
253 select : function (combo, rec, index)
255 //cb.lastData = rec.data;
260 var bt = Pman.Tab.BuilderTree.tree;
261 var pt = Pman.Builder.Tree;
265 pt.setCurrentNode(bt.root,true);
266 // var bv = Pman.Tab.BuilderView;
267 Pman.Tab.BuilderView.panel.clearAll();
268 Pman.Tab.BuilderTab.layout.getRegion('west').el.mask("select part");
269 // bv.panel.el.mask("select Module / Part");
272 //bv.panel.el.unmask();
273 Pman.Tab.BuilderTab.layout.getRegion('west').el.unmask();
274 pt.loadBJS(_this.modsel.getValue(), rec.data.id)
278 render : function (_self)
280 _this.filesel = this;
285 displayField : 'name',
287 forceSelection : true,
289 loadingText : "Searching...",
292 queryParam : 'query[name]',
293 selectOnFocus : true,
294 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b></div>',
295 triggerAction : 'all',
303 beforeload : function (_self, o)
305 o.params = o.params || {};
306 // o.params.btype = 'FORM';
307 if (!_this.modsel.getValue()) {
308 Roo.MessageBox.alert("Error", "Select Module");
311 o.params.module_id = _this.modsel.getValue();
312 o.params._columns = 'id,name';
316 sortInfo : { field : 'name' , direction : 'ASC' },
321 url : baseURL + '/Roo/Builder_part.php'
328 totalProperty : 'total',
340 xtype: 'SplitButton',
343 click : function (_self, e)
347 render : function (_self)
349 _this.saveBtn = this;
352 cls : 'x-btn-text-icon',
354 icon : rootURL + '/Pman/templates/images/save.gif',
363 click : function (_self, e)
365 Pman.Builder.save(false,0);
368 text : "Save a copy as",
369 icon : rootURL + '/Pman/templates/images/save.gif'
375 click : function (_self, e)
381 Pman.Dialog.BuilderViewCode.show(data );
387 text : "Show JSON / Javascript HTML"
397 xtype: 'SplitButton',
400 click : function (_self, e)
402 Pman.Tab.BuilderView.panel.redraw();
414 click : function (_self, e)
416 _this.redrawBtn.setText("Redraw (AUTO OFF)");
417 _this.redrawBtn.auto = 0;
421 text : "Auto redraw - OFF"
427 click : function (_self, e)
430 _this.redrawBtn.setText("Redraw");
431 _this.redrawBtn.auto = 1;
432 var bp = Pman.Tab.BuilderPanel;
433 bp.redraw.defer(100,bp,[true]);
438 text : "Auto redraw - On"
451 displayField : 'name',
453 emptyText : "Select Theme",
454 fieldLabel : 'CampaignAssign',
455 forceSelection : true,
458 loadingText : "Searching...",
462 qtip : "Select CampaignAssign",
464 selectOnFocus : true,
465 tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
466 triggerAction : 'all',
474 sortInfo : { direction : 'ASC', field: 'id' },
476 beforeload : function (_self, o){
477 o.params = o.params || {};
485 url : baseURL + '/Roo/CampaignAssign.php'
492 totalProperty : 'total',
493 fields : [{"name":"id","type":"int"},{"name":"assigntype","type":"string"}]