ENHANCEMENT Allowing to inject <style> tags via ajax responses in LeftAndMain.js (used for the CMS page tree icons)

This commit is contained in:
Ingo Schommer 2011-12-19 13:33:07 +01:00
parent 05d19d9a82
commit 058719571c

View File

@ -210,6 +210,11 @@
.attr('style', origStyle)
.css('visibility', 'hidden');
// Allow injection of inline styles, as they're not allowed in the document body.
// Not handling this through jQuery.ondemand to avoid parsing the DOM twice.
var styles = newContentEl.find('style').detach();
if(styles.length) $(document).find('head').append(styles);
// Replace panel completely (we need to override the "layout" attribute, so can't replace the child instead)
contentEl.replaceWith(newContentEl);