Fixed toc update with partial rendering

This commit is contained in:
benweet 2013-10-15 22:41:16 +01:00
parent 29c7e6dd5f
commit ffd9953d59
3 changed files with 3 additions and 12 deletions

View File

@ -116,10 +116,10 @@ define([
toc.onPagedownConfigure = function(editor) {
previewContentsElt = document.getElementById('preview-contents');
var tocEltList = document.querySelectorAll('.table-of-contents');
var tocExp = new RegExp("^" + toc.config.marker + "$", "g");
// Run TOC generation when conversion is finished directly on HTML
editor.hooks.chain("onPreviewRefresh", function() {
var tocEltList = document.querySelectorAll('.table-of-contents, .toc');
var htmlToc = buildToc();
// Replace toc paragraphs
_.each(previewContentsElt.getElementsByTagName('p'), function(elt) {

View File

@ -6,9 +6,9 @@
enabled
</label>
</div>
<span data-toggle="collapse" data-parent=".accordion-extensions"
<a data-toggle="collapse" data-parent=".accordion-extensions"
class="accordion-toggle" href="#accordion-extensions-collapse-<%= extensionId %>">
<%= extensionName %> </span>
<%= extensionName %> </a>
</div>
<div id="accordion-extensions-collapse-<%= extensionId %>" class="collapse">
<div class="accordion-inner clearfix"><%= settingsBlock %></div>

View File

@ -686,15 +686,6 @@ a {
.accordion-heading {
padding: 12px 15px;
.accordion-toggle {
display: inline;
padding: 0;
font-weight: bold;
cursor: pointer;
&:hover {
text-decoration: underline;
}
}
.checkbox {
margin-top: 0;
margin-bottom: 0;