preview.css("min-height", minHeight + "px");
});
+
+ var updateHelp = function () {
+ $(".richtext_container .richtext_help_sidebar:not(:visible):not(:empty)").each(function () {
+ var container = $(this).closest(".richtext_container");
+ $(this).children().appendTo(container.find(".tab-pane[id$='_help']"));
+ });
+ $(".richtext_container .richtext_help_sidebar:visible:empty").each(function () {
+ var container = $(this).closest(".richtext_container");
+ container.find(".tab-pane[id$='_help']").children().appendTo($(this));
+ });
+ };
+
+ updateHelp();
+ $(window).on("resize", updateHelp);
});
<li class="nav-item">
<button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#<%= id %>_preview"><%= t(".preview") %></button>
</li>
- <li class="nav-item">
+ <li class="nav-item d-block d-sm-none">
<button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#<%= id %>_help"><%= t(".help") %></button>
</li>
</ul>
</div>
</div>
</div>
- <aside class="col-sm-4 d-none d-sm-block"></aside>
+ <aside class="col-sm-4 d-none d-sm-block richtext_help_sidebar"></aside>
</div>
</div>