Browse files

ENHANCEMENT Allowing to inject <style> tags via ajax responses in Lef…

…tAndMain.js (used for the CMS page tree icons)
  • Loading branch information...
chillu committed Dec 19, 2011
1 parent 05d19d9 commit 058719571c5e057a123c60bf0a8d3493cdaeb3f2
Showing with 5 additions and 0 deletions.
  1. +5 −0 admin/javascript/LeftAndMain.js
@@ -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)

0 comments on commit 0587195

Please sign in to comment.