projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
builder.sh
[app.Builder.js]
/
builder.html.js
diff --git
a/builder.html.js
b/builder.html.js
index
11c6957
..
875e9e9
100644
(file)
--- a/
builder.html.js
+++ b/
builder.html.js
@@
-1,18
+1,24
@@
//<script type="text/javascript">
//<script type="text/javascript">
-var _this = { isBuilder : true };
-
+
+var MODULE = { isBuilder : true };
+// BC
+var _this = MODULE;
+
+// the apprenderer.
Builder = {
render : function(data)
{
Builder = {
render : function(data)
{
- console.log(data);
- return;
+ // for debugging
+ //console.log(data); return;
+
+
this.tree = data;
this.tree = data;
- _this = { isBuilder : true };
+ MODULE = { isBuilder : true };
+ _this = MODULE;
if (!Builder.click) {
Builder.click= Roo.get(document.body).on('click', this.onclick, this);
if (!Builder.click) {
Builder.click= Roo.get(document.body).on('click', this.onclick, this);
-
}
this.redraw(false);
}
this.redraw(false);
@@
-101,9
+107,9
@@
Builder = {
});
});
-
this
.dialog = new Roo[cfg.xtype](this.dialogroot, cfg);
+
MODULE
.dialog = new Roo[cfg.xtype](this.dialogroot, cfg);
//this.dialog.el.on('click', this.panelClick, this);
//this.dialog.el.on('click', this.panelClick, this);
-
this
.dialog.show();
+
MODULE
.dialog.show();
return;
}
return;
}
@@
-186,12
+192,13
@@
Builder = {
delete cfg[p];
continue;
}
delete cfg[p];
continue;
}
+ var pp = p.charAt(0) == '|' ? p.substring(1) : p;
try {
try {
- var pp = p.charAt(0) == '|' ? p.substring(1) : p;
- var _tmp = false;
+ var _tmp = false;
+ /** eval:var:MOUDULE **/
/** eval:var:_this **/
/** eval:var:_tmp **/
// stupid IE can not return objects evaluated..
/** eval:var:_this **/
/** eval:var:_tmp **/
// stupid IE can not return objects evaluated..
@@
-206,7
+213,10
@@
Builder = {
} catch(e) {
console.log('Error evaluating: ' + cfg[p] + "\r\n" + JSON.stringify(e));
};
} catch(e) {
console.log('Error evaluating: ' + cfg[p] + "\r\n" + JSON.stringify(e));
};
- delete cfg[p];
+ if (pp != p) {
+ delete cfg[p];
+ }
+
continue;
continue;
@@
-236,9
+246,11
@@
Builder = {
throw "Invalid Xtype " + cfg.xtype + ' on ' + cfg.xtreepath;
}
}
throw "Invalid Xtype " + cfg.xtype + ' on ' + cfg.xtreepath;
}
}
-
+ if (!isListener) {
+ cfg.listeners = cfg.listeners || {};
+ }
// we can overlay some event handlers here..
// we can overlay some event handlers here..
- cfg.listeners = cfg.listeners || {};
+
//console.log('xtype' + xtype)
switch(xtype) {
//console.log('xtype' + xtype)
switch(xtype) {
@@
-257,6
+269,7
@@
Builder = {
// now for all the children.. (items)
if (xitems === false) {
// now for all the children.. (items)
if (xitems === false) {
+
return;
}
cfg.items = [];
return;
}
cfg.items = [];