Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 058719571c5e057a123c60bf0a8d3493cdaeb3f2 1 parent 05d19d9
Ingo Schommer chillu authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 admin/javascript/LeftAndMain.js
5 admin/javascript/LeftAndMain.js
View
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.