1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 // register the module first
8 Pman.on('beforeload', function()
11 modKey : '001-Pman.Tab.BuilderView',
12 module : Pman.Tab.BuilderView,
14 parent : Pman.Tab.BuilderTab,
15 name : "Pman.Tab.BuilderView",
21 Pman.Tab.BuilderView = new Roo.util.Observable({
27 add : function(parentLayout, region)
31 this.parentLayout = parentLayout;
33 this.panel = parentLayout.addxtype({
34 xtype: 'ContentPanel',
37 activate : function (_self)
47 clearAll : function(isAuto) {
48 // this.renderObj = { isBuilder : true };
52 this.scroll = this.panelroot.el.getScroll();
53 this.layout.remove('center', this.panelroot);
54 this.panelroot = false;
56 if (this.dialogroot) {
57 this.dialogroot.remove();
58 this.dialogroot = false;
61 redraw : function(isAuto)
64 // top level is not relivant
66 // var btop = Pman.Tab.BuilderTop2;
67 // if (isAuto && btop.redrawBtn && !btop.redrawBtn.auto) {
68 // return; /// auto redraw is turned off..
71 this.clearAll(isAuto);
73 var cfg = this.toJS();
79 this.munge(cfg.items[0]);
81 // we draw either a dialog or a tab..
83 if (cfg.items[0].xtype == 'LayoutDialog') {
85 cfg.items[0].modal = false;
86 var xy = this.panel.el.getXY();
87 cfg.items[0].x = xy[0];
88 cfg.items[0].y = xy[1];
89 cfg.items[0].constraintoviewport = false;
91 this.dialogroot = Roo.get( document.body).createChild();
93 this.dialog = new Roo[cfg.items[0].xtype](this.dialogroot, cfg.items[0]);
94 this.dialog.el.on('click', this.panelClick, this);
100 // force center region..
101 cfg.items[0].region = 'center';
102 cfg.items[0].background = false;
104 this.panelroot = this.layout.addxtype(cfg.items[0]);
107 //this.highlightElement(Pman.Tab.BuilderTree.currentNode);
109 if (this.panelroot.el) {
110 this.panelroot.el.scrollTo('top', this.scroll.top);
111 this.panelroot.el.scrollTo('left', this.scroll.left);
116 var bt = Pman.Tab.BuilderTree;
118 return this.toJS(bt.tree.root);
122 var ret = bt.cloneConfig(n.elConfig);
124 // flag to prevent rendering..
125 if ((typeof(ret['+buildershow']) != 'undefined') && !ret['+buildershow']) {
129 ret.id = typeof(ret.id) == 'undefined' ? 'builder-' + n.id : ret.id;
131 if (n.childNodes.length) {
133 n.eachChild(function(cn) {
134 var add = _this.toJS(cn);
147 this.layout = this.panel.layout;