From: Alan Knowles Date: Fri, 9 Sep 2016 02:46:33 +0000 (+0800) Subject: roojs-doc.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=0da9aaefa42322f066bb5730f3f9e1a2915988ad roojs-doc.js roojs-doc-debug.js --- diff --git a/roojs-doc-debug.js b/roojs-doc-debug.js index 04e082c55c..46ea73dee9 100644 --- a/roojs-doc-debug.js +++ b/roojs-doc-debug.js @@ -30,13 +30,10 @@ Roo.doc.Entry = function(config){ marginheight : 0, offset : 0 }); - Roo.doc.Entry._calls++; - if (Roo.doc.Entry._calls > 1) { - return; - } + // call onRender once... and block next call...? this.onRender(body); - this.onRender = function() { }; + //this.onRender = function() { }; }; @@ -74,10 +71,21 @@ Roo.extend(Roo.doc.Entry, Roo.bootstrap.Component, { addxtype : function (tree, cntr) { return this.addxtypeChild(tree,cntr); - } - + }, + + onRender : function(ct, position) + { + + Roo.doc.Entry._calls++; + if (Roo.doc.Entry._calls > 1) { + return; + } + + // call onRender once... and block next call...? + Roo.bootstrap.Component.prototype.onRender.call(this, ct, position); + } }); diff --git a/roojs-doc.js b/roojs-doc.js index 674f123d4c..9277f68ca7 100644 --- a/roojs-doc.js +++ b/roojs-doc.js @@ -1,7 +1,6 @@ // Roo/doc/Entry.js -Roo.doc=Roo.doc||{};Roo.doc.Entry=function(A){Roo.doc.Entry.superclass.constructor.call(this,A);var B=Roo.get(document.body);B.attr({leftmargin:0,marginwidth:0,topmargin:0,marginheight:0,offset:0});Roo.doc.Entry._calls++;if(Roo.doc.Entry._calls>1){return;} -this.onRender(B);this.onRender=function(){};};Roo.doc.Entry._calls=0;Roo.extend(Roo.doc.Entry,Roo.bootstrap.Component,{name:'',purpose:'',getAutoCreate:function(){var A={cls:'refentry',cn:[{tag:'h1',cls:'refname',html:this.name},{cls:'refnamediv',html:this.purpose} -]};return A;},addxtype:function(A,B){return this.addxtypeChild(A,B);}}); +Roo.doc=Roo.doc||{};Roo.doc.Entry=function(A){Roo.doc.Entry.superclass.constructor.call(this,A);var B=Roo.get(document.body);B.attr({leftmargin:0,marginwidth:0,topmargin:0,marginheight:0,offset:0});this.onRender(B);};Roo.doc.Entry._calls=0;Roo.extend(Roo.doc.Entry,Roo.bootstrap.Component,{name:'',purpose:'',getAutoCreate:function(){var A={cls:'refentry',cn:[{tag:'h1',cls:'refname',html:this.name} +,{cls:'refnamediv',html:this.purpose}]};return A;},addxtype:function(A,B){return this.addxtypeChild(A,B);},onRender:function(ct,A){Roo.doc.Entry._calls++;if(Roo.doc.Entry._calls>1){return;}Roo.bootstrap.Component.prototype.onRender.call(this,ct,A);}}); // Roo/doc/Example.js Roo.doc.Example=function(A){Roo.doc.Example.superclass.constructor.call(this,A);};Roo.extend(Roo.doc.Example,Roo.bootstrap.Component,{lang:'php',code:'',getAutoCreate:function(){var A={cls:this.lang,cn:[{tag:'code',html:String.format('{0}',this.code).replace(/\n/g,'
')} ]};return A;}});