web/data/cubicweb.js
changeset 5699 f4f6ee3af50b
parent 5658 7b9553a9db65
child 5705 30b94973bc67
--- a/web/data/cubicweb.js	Wed Jun 09 12:39:55 2010 +0200
+++ b/web/data/cubicweb.js	Wed Jun 09 12:43:21 2010 +0200
@@ -1,3 +1,4 @@
+
 cw = {};
 
 jQuery.extend(cw, {
@@ -368,3 +369,24 @@
     }
     return node;
 }
+
+// XXX avoid crashes / backward compat
+CubicWeb = {
+    require: cw.utils.deprecatedFunction(
+        '[3.9] CubicWeb.require() is not used anymore',
+        function(module) {}),
+    provide: cw.utils.deprecatedFunction(
+        '[3.9] CubicWeb.provide() is not used anymore',
+        function(module) {})
+};
+
+jQuery(document).ready(function() {
+    jQuery(CubicWeb).trigger('server-response', [false, document]);
+    jQuery(cw).trigger('server-response', [false, document]);
+});
+
+// XXX as of 2010-04-07, no known cube uses this
+jQuery(CubicWeb).bind('ajax-loaded', function() {
+    log('[3.7] "ajax-loaded" event is deprecated, use "server-response" instead');
+    jQuery(cw).trigger('server-response', [false, document]);
+});