web/data/cubicweb.ajax.js
changeset 7309 22403d5c3da4
parent 7284 a474cb989546
child 7332 c3ae97c0066b
--- a/web/data/cubicweb.ajax.js	Wed May 04 12:25:50 2011 +0200
+++ b/web/data/cubicweb.ajax.js	Thu May 05 12:50:21 2011 +0200
@@ -95,7 +95,7 @@
     if (!base.endswith('/')) {
         base += '/';
     }
-    var modconcat_rgx = new RegExp('(' + base + 'data/([a-z0-9]+/))?\\?\\?(.+)');
+    var modconcat_rgx = new RegExp('(' + base + 'data/([a-z0-9]+/)?)\\?\\?(.+)');
     return modconcat_rgx.exec(url);
 }
 
@@ -112,7 +112,7 @@
     if (groups == null) {
         resources.push(src);
     } else {
-        var dataurl = groups[0];
+        var dataurl = groups[1];
         $.each(cw.utils.lastOf(groups).split(','),
                function() {
                    resources.push(dataurl + this);
@@ -150,12 +150,10 @@
                     // server-response event, since we loose control on when the
                     // script is loaded (jQuery load it immediatly).
                     loaded.push(resource);
-                    jQuery(srcnode).appendTo($head);
                 }
             });
-        } else {
-            jQuery(srcnode).appendTo($head);
         }
+	jQuery(srcnode).appendTo($head);
     });
     $node.find(jqtagfilter).remove();
 }