From 1be5ca9d2e0d8d909573c0e6fdbe4a2c39fbd2ea Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Fri, 2 Mar 2012 20:26:32 -0600 Subject: [PATCH] ajax(...,t) can be callback, thanks Bruno --- VERSION | 2 +- applications/admin/static/js/web2py.js | 2 +- applications/examples/static/js/web2py.js | 2 +- applications/welcome/static/js/web2py.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 1d280e09..d5c3ceb8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.6 (2012-03-02 10:41:27) stable +Version 1.99.6 (2012-03-02 20:26:11) stable diff --git a/applications/admin/static/js/web2py.js b/applications/admin/static/js/web2py.js index d6eee1a6..6a84c20a 100644 --- a/applications/admin/static/js/web2py.js +++ b/applications/admin/static/js/web2py.js @@ -18,7 +18,7 @@ function ajax(u,s,t) { } if (pcs.length>0){query = pcs.join("&");} } - jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); + jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else if(typeof t=='string') jQuery("#"+t).html(msg); else t(msg); } } }); } String.prototype.reverse = function () { return this.split('').reverse().join('');}; diff --git a/applications/examples/static/js/web2py.js b/applications/examples/static/js/web2py.js index d6eee1a6..6a84c20a 100644 --- a/applications/examples/static/js/web2py.js +++ b/applications/examples/static/js/web2py.js @@ -18,7 +18,7 @@ function ajax(u,s,t) { } if (pcs.length>0){query = pcs.join("&");} } - jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); + jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else if(typeof t=='string') jQuery("#"+t).html(msg); else t(msg); } } }); } String.prototype.reverse = function () { return this.split('').reverse().join('');}; diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index d6eee1a6..6a84c20a 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -18,7 +18,7 @@ function ajax(u,s,t) { } if (pcs.length>0){query = pcs.join("&");} } - jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else jQuery("#" + t).html(msg); } } }); + jQuery.ajax({type: "POST", url: u, data: query, success: function(msg) { if(t) { if(t==':eval') eval(msg); else if(typeof t=='string') jQuery("#"+t).html(msg); else t(msg); } } }); } String.prototype.reverse = function () { return this.split('').reverse().join('');};