Merge head styles so that ace stays stable

This commit is contained in:
Samy Pessé
2014-04-14 16:34:19 +02:00
parent 6da48764e8
commit 9f1ba8483b
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -28,7 +28,15 @@ define([
var $page = $(html);
var $pageHead = $page.find("[data-element=head]");
$("head").html($pageHead.html());
// Merge heads
var headContent = $pageHead.html()
$("head style").each(function() {
headContent = headContent + this.outerHTML
});
$("head").html(headContent);
// Update header, body and summary
$('.book-header').html($page.find('.book-header').html());
$('.book-body').html($page.find('.book-body').html());
$('.book-summary').html($page.find('.book-summary').html());