Don't double-up on #main-outlet when static content is rendered through Ember
This commit is contained in:
parent
dfafadfe41
commit
f46c819956
|
@ -18,7 +18,8 @@ Discourse.StaticController = Discourse.Controller.extend({
|
||||||
$preloaded = $("noscript[data-path=\"" + path + "\"]");
|
$preloaded = $("noscript[data-path=\"" + path + "\"]");
|
||||||
if ($preloaded.length) {
|
if ($preloaded.length) {
|
||||||
text = $preloaded.text();
|
text = $preloaded.text();
|
||||||
text = text.replace(/<header[\s\S]*<\/header\>/, '');
|
text = text.match(/<!-- preload-content: -->((?:.|[\n\r])*)<!-- :preload-content -->/);
|
||||||
|
text = text[1];
|
||||||
return this.set('content', text);
|
return this.set('content', text);
|
||||||
} else {
|
} else {
|
||||||
return jQuery.ajax({
|
return jQuery.ajax({
|
||||||
|
|
|
@ -40,7 +40,9 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div id="main-outlet" class="container">
|
<div id="main-outlet" class="container">
|
||||||
|
<!-- preload-content: -->
|
||||||
<%= yield %>
|
<%= yield %>
|
||||||
|
<!-- :preload-content -->
|
||||||
</div>
|
</div>
|
||||||
</noscript>
|
</noscript>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in New Issue