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)
45 var bt = Pman.Tab.BuilderTree;
47 return this.toJS(bt.tree.root);
51 var ret = bt.cloneConfig(n.elConfig);
53 // flag to prevent rendering..
54 if ((typeof(ret['+buildershow']) != 'undefined') && !ret['+buildershow']) {
58 ret.id = typeof(ret.id) == 'undefined' ? 'builder-' + n.id : ret.id;
60 if (n.childNodes.length) {
62 n.eachChild(function(cn) {
63 var add = _this.toJS(cn);
75 clearAll : function(isAuto) {
76 // this.renderObj = { isBuilder : true };
80 this.scroll = this.panelroot.el.getScroll();
81 this.layout.remove('center', this.panelroot);
82 this.panelroot = false;
84 if (this.dialogroot) {
85 this.dialogroot.remove();
86 this.dialogroot = false;
89 redraw : function(isAuto)
92 // top level is not relivant
94 // var btop = Pman.Tab.BuilderTop2;
95 // if (isAuto && btop.redrawBtn && !btop.redrawBtn.auto) {
96 // return; /// auto redraw is turned off..
99 this.clearAll(isAuto);
101 var cfg = this.toJS();
107 this.munge(cfg.items[0]);
109 // we draw either a dialog or a tab..
111 if (cfg.items[0].xtype == 'LayoutDialog') {
113 cfg.items[0].modal = false;
114 var xy = this.panel.el.getXY();
115 cfg.items[0].x = xy[0];
116 cfg.items[0].y = xy[1];
117 cfg.items[0].constraintoviewport = false;
119 this.dialogroot = Roo.get( document.body).createChild();
121 this.dialog = new Roo[cfg.items[0].xtype](this.dialogroot, cfg.items[0]);
122 this.dialog.el.on('click', this.panelClick, this);
128 // force center region..
129 cfg.items[0].region = 'center';
130 cfg.items[0].background = false;
132 this.panelroot = this.layout.addxtype(cfg.items[0]);
135 //this.highlightElement(Pman.Tab.BuilderTree.currentNode);
137 if (this.panelroot.el) {
138 this.panelroot.el.scrollTo('top', this.scroll.top);
139 this.panelroot.el.scrollTo('left', this.scroll.left);
144 this.layout = this.panel.layout;