--- a/web/data/cubicweb.ajax.js Fri Jul 03 17:57:33 2009 +0200
+++ b/web/data/cubicweb.ajax.js Fri Jul 03 17:58:36 2009 +0200
@@ -11,15 +11,20 @@
function _loadAjaxHtmlHead(node, head, tag, srcattr) {
var loaded = [];
- jQuery('head ' + tag).each(function(i) {
+ var jqtagfilter = tag + '[' + srcattr + ']';
+ jQuery('head ' + jqtagfilter).each(function(i) {
loaded.push(this.getAttribute(srcattr));
});
node.find(tag).each(function(i) {
- if (!loaded.contains(this.getAttribute(srcattr))) {
+ if (this.getAttribute(srcattr)) {
+ if (!loaded.contains(this.getAttribute(srcattr))) {
+ jQuery(this).appendTo(head);
+ }
+ } else {
jQuery(this).appendTo(head);
}
});
- node.find(tag).remove();
+ node.find(jqtagfilter).remove();
}
/*