Skip to content

Commit

Permalink
Remove preview from normal flow layout
Browse files Browse the repository at this point in the history
  • Loading branch information
jimsafley committed Mar 4, 2024
1 parent ba5e317 commit 9967914
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/asset/js/site-page-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,18 +516,24 @@
// Prepare page layout for use.
const preparePageLayout = function() {
const layoutSelect = $('#page-layout-select');
const previewPageButton = $('#preview-page-layout');
const previewBlockButtons = $('.preview-block-page-layout');
const gridColumnsSelect = $('#page-layout-grid-columns-label');
const gridColumnGapInput = $('#page-layout-grid-column-gap-input');
const gridRowGapInput = $('#page-layout-grid-row-gap-input');
const blockGridControls = $('.block-page-layout-grid-controls');
// Disable and hide all layout-specific controls by default.
previewPageButton.hide();
previewBlockButtons.hide();
gridColumnsSelect.hide();
gridColumnGapInput.closest('.field').hide();
gridRowGapInput.closest('.field').hide();
blockGridControls.hide();
switch (layoutSelect.val()) {
case 'grid':
// Prepare grid layout.
previewPageButton.show();
previewBlockButtons.show();
gridColumnsSelect.show();
gridColumnGapInput.closest('.field').show();
gridRowGapInput.closest('.field').show();
Expand Down

0 comments on commit 9967914

Please sign in to comment.