Fossil SCM

Removed some dead code. Experimentally enabled jQuery ajax back-end to test a problem on my 3DS.

stephan 2011-10-17 18:03 json-multitag-test
Commit ebb0c04749499c3ea37d6a20a09b4880243a4258
1 file changed +11 -9
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -914,27 +914,22 @@
914914
},
915915
success: function(data)
916916
{
917917
WhAjaj.Connector.sendHelper.onSendSuccess.apply( whself, [request, data, args] );
918918
},
919
- /* Set dataType=text instead of json for deeply archaic reasons which
920
- might no longer apply.
919
+ /* Set dataType=text instead of json to keep jQuery from doing our carefully
920
+ written response handling for us.
921921
*/
922922
dataType: 'text'
923923
};
924924
if( undefined !== args.timeout )
925925
{
926926
ajopt.timeout = args.timeout;
927927
}
928928
try
929929
{
930
- var xhr = jQuery.ajax(ajopt);
931
- if( xhr && ('undefined'!==(typeof window)) && ('firebug' in window) && ('watchXHR' in window.firebug) )
932
- { /* plug in to firebug lite's XHR monitor... */
933
- window.firebug.watchXHR( xhr );
934
- }
935
- return xhr;
930
+ return jQuery.ajax(ajopt);
936931
}
937932
catch(e)
938933
{
939934
args.errorMessage = e.toString();
940935
WhAjaj.Connector.sendHelper.onSendError.apply( whself, [request, args] );
@@ -1204,8 +1199,15 @@
12041199
sendImpl() holds a concrete back-end connection implementation. It
12051200
can be replaced with a custom implementation if one follows the rules
12061201
described throughout this API. See WhAjaj.Connector.sendImpls for
12071202
the concrete implementations included with this API.
12081203
*/
1209
-WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
1204
+//WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
12101205
//WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.rhino;
12111206
//WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.jQuery;
1207
+
1208
+if( 'undefined' !== typeof jQuery ){
1209
+ WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.jQuery;
1210
+}
1211
+else {
1212
+ WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
1213
+}
12121214
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -914,27 +914,22 @@
914 },
915 success: function(data)
916 {
917 WhAjaj.Connector.sendHelper.onSendSuccess.apply( whself, [request, data, args] );
918 },
919 /* Set dataType=text instead of json for deeply archaic reasons which
920 might no longer apply.
921 */
922 dataType: 'text'
923 };
924 if( undefined !== args.timeout )
925 {
926 ajopt.timeout = args.timeout;
927 }
928 try
929 {
930 var xhr = jQuery.ajax(ajopt);
931 if( xhr && ('undefined'!==(typeof window)) && ('firebug' in window) && ('watchXHR' in window.firebug) )
932 { /* plug in to firebug lite's XHR monitor... */
933 window.firebug.watchXHR( xhr );
934 }
935 return xhr;
936 }
937 catch(e)
938 {
939 args.errorMessage = e.toString();
940 WhAjaj.Connector.sendHelper.onSendError.apply( whself, [request, args] );
@@ -1204,8 +1199,15 @@
1204 sendImpl() holds a concrete back-end connection implementation. It
1205 can be replaced with a custom implementation if one follows the rules
1206 described throughout this API. See WhAjaj.Connector.sendImpls for
1207 the concrete implementations included with this API.
1208 */
1209 WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
1210 //WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.rhino;
1211 //WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.jQuery;
 
 
 
 
 
 
 
1212
--- ajax/js/whajaj.js
+++ ajax/js/whajaj.js
@@ -914,27 +914,22 @@
914 },
915 success: function(data)
916 {
917 WhAjaj.Connector.sendHelper.onSendSuccess.apply( whself, [request, data, args] );
918 },
919 /* Set dataType=text instead of json to keep jQuery from doing our carefully
920 written response handling for us.
921 */
922 dataType: 'text'
923 };
924 if( undefined !== args.timeout )
925 {
926 ajopt.timeout = args.timeout;
927 }
928 try
929 {
930 return jQuery.ajax(ajopt);
 
 
 
 
 
931 }
932 catch(e)
933 {
934 args.errorMessage = e.toString();
935 WhAjaj.Connector.sendHelper.onSendError.apply( whself, [request, args] );
@@ -1204,8 +1199,15 @@
1199 sendImpl() holds a concrete back-end connection implementation. It
1200 can be replaced with a custom implementation if one follows the rules
1201 described throughout this API. See WhAjaj.Connector.sendImpls for
1202 the concrete implementations included with this API.
1203 */
1204 //WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
1205 //WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.rhino;
1206 //WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.jQuery;
1207
1208 if( 'undefined' !== typeof jQuery ){
1209 WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.jQuery;
1210 }
1211 else {
1212 WhAjaj.Connector.prototype.sendImpl = WhAjaj.Connector.sendImpls.XMLHttpRequest;
1213 }
1214

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button