mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT Allowing to inject <style> tags via ajax responses in LeftAndMain.js (used for the CMS page tree icons)
This commit is contained in:
parent
05d19d9a82
commit
058719571c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user