projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7c1aff7
)
add support for onLoad on template
author
Alan Knowles
<alan@roojs.com>
Thu, 4 Mar 2021 07:48:34 +0000
(15:48 +0800)
committer
Alan Knowles
<alan@roojs.com>
Thu, 4 Mar 2021 07:48:34 +0000
(15:48 +0800)
docs/json/roodata.json
patch
|
blob
|
history
docs/src/Roo_Template.js.html
patch
|
blob
|
history
docs/symbols/Roo.DomTemplate.json
patch
|
blob
|
history
docs/symbols/Roo.MasterTemplate.json
patch
|
blob
|
history
docs/symbols/Roo.Template.json
patch
|
blob
|
history
docs/symbols/Roo.XTemplate.json
patch
|
blob
|
history
diff --git
a/docs/json/roodata.json
b/docs/json/roodata.json
index
f5120a9
..
b51fc0f
100644
(file)
--- a/
docs/json/roodata.json
+++ b/
docs/json/roodata.json
@@
-4778,6
+4778,12
@@
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template"
+ },
{
"name" : "url",
"type" : "String",
{
"name" : "url",
"type" : "String",
@@
-10585,6
+10591,12
@@
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template"
+ },
{
"name" : "url",
"type" : "String",
{
"name" : "url",
"type" : "String",
@@
-13519,6
+13531,12
@@
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : ""
},
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : ""
},
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : ""
+ },
{
"name" : "url",
"type" : "String",
{
"name" : "url",
"type" : "String",
@@
-16029,6
+16047,12
@@
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
"desc" : "The HTML fragment or an array of fragments to join(\"\") or multiple arguments to join(\"\")",
"memberOf" : "Roo.Template"
},
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template"
+ },
{
"name" : "url",
"type" : "String",
{
"name" : "url",
"type" : "String",
diff --git
a/docs/src/Roo_Template.js.html
b/docs/src/Roo_Template.js.html
index
916144f
..
899b4c0
100644
(file)
--- a/
docs/src/Roo_Template.js.html
+++ b/
docs/src/Roo_Template.js.html
@@
-53,6
+53,12
@@
t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'}
};
</span><span class="jsdoc-var">Roo.Template.prototype </span><span class="jsdoc-syntax">= {
};
</span><span class="jsdoc-var">Roo.Template.prototype </span><span class="jsdoc-syntax">= {
+ </span><span class="jsdoc-comment">/**
+ * @cfg {Function} onLoad Called after the template has been loaded and complied (usually from a remove source)
+ */
+ </span><span class="jsdoc-var">onLoad </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">,
+
+
</span><span class="jsdoc-comment">/**
* @cfg {String} url The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..
* it should be fixed so that template is observable...
</span><span class="jsdoc-comment">/**
* @cfg {String} url The Url to load the template from. beware if you are loading from a url, the data may not be ready if you use it instantly..
* it should be fixed so that template is observable...
@@
-130,6
+136,9
@@
t.append('some-element', {id: 'myid', cls: 'myclass', name: 'foo', value: 'bar'}
</span><span class="jsdoc-var">_t.html </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">response.responseText</span><span class="jsdoc-syntax">;
</span><span class="jsdoc-var">_t.url </span><span class="jsdoc-syntax">= </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">;
</span><span class="jsdoc-var">_t.compile</span><span class="jsdoc-syntax">();
</span><span class="jsdoc-var">_t.html </span><span class="jsdoc-syntax">= </span><span class="jsdoc-var">response.responseText</span><span class="jsdoc-syntax">;
</span><span class="jsdoc-var">_t.url </span><span class="jsdoc-syntax">= </span><span class="jsdoc-keyword">false</span><span class="jsdoc-syntax">;
</span><span class="jsdoc-var">_t.compile</span><span class="jsdoc-syntax">();
+ </span><span class="jsdoc-keyword">if </span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">_t.onLoad</span><span class="jsdoc-syntax">) {
+ </span><span class="jsdoc-var">_t.onload</span><span class="jsdoc-syntax">();
+ }
},
</span><span class="jsdoc-var">failure </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">function</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">response</span><span class="jsdoc-syntax">) {
</span><span class="jsdoc-var">Roo.log</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">"Template failed to load from " </span><span class="jsdoc-syntax">+ </span><span class="jsdoc-var">_t.url</span><span class="jsdoc-syntax">);
},
</span><span class="jsdoc-var">failure </span><span class="jsdoc-syntax">: </span><span class="jsdoc-keyword">function</span><span class="jsdoc-syntax">(</span><span class="jsdoc-var">response</span><span class="jsdoc-syntax">) {
</span><span class="jsdoc-var">Roo.log</span><span class="jsdoc-syntax">(</span><span class="jsdoc-string">"Template failed to load from " </span><span class="jsdoc-syntax">+ </span><span class="jsdoc-var">_t.url</span><span class="jsdoc-syntax">);
diff --git
a/docs/symbols/Roo.DomTemplate.json
b/docs/symbols/Roo.DomTemplate.json
index
5bff0fa
..
bfd0e5d
100644
(file)
--- a/
docs/symbols/Roo.DomTemplate.json
+++ b/
docs/symbols/Roo.DomTemplate.json
@@
-15,6
+15,13
@@
"params" : [],
"returns" : [],
"config" : [
"params" : [],
"returns" : [],
"config" : [
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template",
+ "optvals" : []
+ },
{
"name" : "html",
"type" : "String",
{
"name" : "html",
"type" : "String",
diff --git
a/docs/symbols/Roo.MasterTemplate.json
b/docs/symbols/Roo.MasterTemplate.json
index
a93ee10
..
9c86f91
100644
(file)
--- a/
docs/symbols/Roo.MasterTemplate.json
+++ b/
docs/symbols/Roo.MasterTemplate.json
@@
-15,6
+15,13
@@
"params" : [],
"returns" : [],
"config" : [
"params" : [],
"returns" : [],
"config" : [
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template",
+ "optvals" : []
+ },
{
"name" : "html",
"type" : "String",
{
"name" : "html",
"type" : "String",
diff --git
a/docs/symbols/Roo.Template.json
b/docs/symbols/Roo.Template.json
index
d1c4cce
..
df4aa66
100644
(file)
--- a/
docs/symbols/Roo.Template.json
+++ b/
docs/symbols/Roo.Template.json
@@
-20,6
+20,13
@@
],
"returns" : [],
"config" : [
],
"returns" : [],
"config" : [
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template",
+ "optvals" : []
+ },
{
"name" : "html",
"type" : "String",
{
"name" : "html",
"type" : "String",
diff --git
a/docs/symbols/Roo.XTemplate.json
b/docs/symbols/Roo.XTemplate.json
index
51afaaf
..
d7f671f
100644
(file)
--- a/
docs/symbols/Roo.XTemplate.json
+++ b/
docs/symbols/Roo.XTemplate.json
@@
-15,6
+15,13
@@
"params" : [],
"returns" : [],
"config" : [
"params" : [],
"returns" : [],
"config" : [
+ {
+ "name" : "onLoad",
+ "type" : "Function",
+ "desc" : "Called after the template has been loaded and complied (usually from a remove source)",
+ "memberOf" : "Roo.Template",
+ "optvals" : []
+ },
{
"name" : "html",
"type" : "String",
{
"name" : "html",
"type" : "String",