equal
deleted
inserted
replaced
9 |
9 |
10 var JSON_BASE_URL = baseuri() + 'json?'; |
10 var JSON_BASE_URL = baseuri() + 'json?'; |
11 |
11 |
12 function _loadAjaxHtmlHead(node, head, tag, srcattr) { |
12 function _loadAjaxHtmlHead(node, head, tag, srcattr) { |
13 var loaded = []; |
13 var loaded = []; |
14 jQuery('head ' + tag).each(function(i) { |
14 var jqtagfilter = tag + '[' + srcattr + ']'; |
|
15 jQuery('head ' + jqtagfilter).each(function(i) { |
15 loaded.push(this.getAttribute(srcattr)); |
16 loaded.push(this.getAttribute(srcattr)); |
16 }); |
17 }); |
17 node.find(tag).each(function(i) { |
18 node.find(tag).each(function(i) { |
18 if (!loaded.contains(this.getAttribute(srcattr))) { |
19 if (this.getAttribute(srcattr)) { |
|
20 if (!loaded.contains(this.getAttribute(srcattr))) { |
|
21 jQuery(this).appendTo(head); |
|
22 } |
|
23 } else { |
19 jQuery(this).appendTo(head); |
24 jQuery(this).appendTo(head); |
20 } |
25 } |
21 }); |
26 }); |
22 node.find(tag).remove(); |
27 node.find(jqtagfilter).remove(); |
23 } |
28 } |
24 |
29 |
25 /* |
30 /* |
26 * inspect dom response, search for a <div class="ajaxHtmlHead"> node and |
31 * inspect dom response, search for a <div class="ajaxHtmlHead"> node and |
27 * put its content into the real document's head. |
32 * put its content into the real document's head. |