projects
/
roojs1
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Roo/Template.js
[roojs1]
/
Roo
/
Template.js
diff --git
a/Roo/Template.js
b/Roo/Template.js
index
9bf53bb
..
121b462
100644
(file)
--- a/
Roo/Template.js
+++ b/
Roo/Template.js
@@
-44,7
+44,9
@@
Roo.Template = function(cfg){
// bc
this.html = cfg;
}
// bc
this.html = cfg;
}
-
+ if (this.url) {
+ this.load();
+ }
};
Roo.Template.prototype = {
};
Roo.Template.prototype = {
@@
-64,7
+66,8
@@
Roo.Template.prototype = {
*/
applyTemplate : function(values){
try {
*/
applyTemplate : function(values){
try {
- if ()
+ _t= this;
+
if(this.compiled){
return this.compiled(values);
}
if(this.compiled){
return this.compiled(values);
}
@@
-106,24
+109,25
@@
Roo.Template.prototype = {
afterLoad : false,
afterLoad : false,
- load : function (
url, success
)
+ load : function ()
{
{
-
- this.afterLoad = success;
+
if (this.loading) {
return;
}
if (this.loading) {
return;
}
+ var _t = this;
this.loading = true;
this.compiled = false;
this.loading = true;
this.compiled = false;
- var _t = this;
+
var cx = new Roo.data.Connection();
cx.request({
var cx = new Roo.data.Connection();
cx.request({
- url : url,
+ url :
this.
url,
method : 'GET',
success : function (response) {
_t.loading = false;
_t.html = response.responseText;
method : 'GET',
success : function (response) {
_t.loading = false;
_t.html = response.responseText;
+ _t.url = false;
_t.afterLoad && _t.afterLoad();
},
failure : function(response) {
_t.afterLoad && _t.afterLoad();
},
failure : function(response) {