this.dialogroot.remove();
this.dialogroot = false;
}
-
+ if (this.layoutbase) {
+
+ while (document.body.childNodes.length) {
+ Roo.get(document.body.childNodes[0]).remove();
+ }
+
+ this.layoutbase= false;
+ }
},
}
- return
- /*
- // force center region..
- cfg.items[0].region = 'center';
- cfg.items[0].background = false;
-
- this.panelroot = this.layout.addxtype(cfg.items[0]);
+ // otherwise we are creating a layout area on the document..
- this.highlightElement(Pman.Tab.BuilderTree.currentNode);
-
- if (this.panelroot.el) {
-
- this.panelroot.el.scrollTo('top', this.scroll.top);
- this.panelroot.el.scrollTo('left', this.scroll.left);
-
- }
-
- */
-
-
+ // handles
+ // contentpanel, nestedlayoutpanel, contentpanel.. etc.
+ // force center region..
+ cfg.region = 'center';
+ cfg.background = false;
+ this.layoutbase = new Ext.BorderLayout(document.body, {
+
+ center: {
+ titlebar: false,
+ autoScroll:false,
+ closeOnTab: true,
+ tabPosition: 'top',
+ //resizeTabs: true,
+ alwaysShowTabs: true,
+ minTabWidth: 140
+ }
+ });
+
+ this.layoutbase.addxtype( cfg );
var pr = xi['*prop'];
this.munge(xi);
// if prop is an array - then it's items are really the value..
+ if (pr.match(/\[\]$/)) {
+ pr = pr.replace(/\[\]$/, '');
+ cfg[pr] = cfg[pr] || [];
+ cfg[pr].push(xi);
+ continue;
+ }
+
if (xi.xtype && xi.xtype == 'Array') {
cfg[pr] = xi.items;
dump : function (arr,level) {
var dumped_text = "";
if(!level) level = 0;
-
+ if (level > 3) {
+ return '... TO DEEP ...';
+ }
//The padding given at the beginning of the line.
var level_padding = "";
for(var j=0;j<level+1;j++) level_padding += " ";
if(typeof(arr) == 'object') { //Array/Hashes/Objects
for(var item in arr) {
- var value = arr[item];
+ var value = arr[item];
+ if (item == 'xns') {
+ continue;
+ }
+ if(typeof(value) == 'function') { //If it is an array,
+ // fake dump...
+ dumped_text += level_padding + "'" + item + "' : function() { ... },\n";
+ continue;
+ }
if(typeof(value) == 'object') { //If it is an array,
- dumped_text += level_padding + "'" + item + "' ...\n";
+ dumped_text += level_padding + "'" + item + "': {\n";
dumped_text += this.dump(value,level+1);
- } else {
- dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
+ dumped_text += level_padding + "}\n";
+ continue;
}
+ dumped_text += level_padding + "'" + item + "' : \"" + value + "\"\n";
+
}
} else { //Stings/Chars/Numbers etc.
dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
// console.log(ftg.id);
if (ftg.id && typeof(ftg.id) == 'string' && ftg.id.match(/builder-/)) {
var nid = ftg.id.replace('builder-', '').replace('x-form-el-', '');
- this.logMove( nid );
+ this[method]( nid );
return true;
}
// needs fixing..
//console.log('no target in parents');
},
- logClick : function(
+ logClick : function(id)
+ {
+ var bid = id.length ? 'builder-' + id : '';
+ console.log('{ "id" : "' + bid + '"}');
+ },
hover : function(e) {