From b72d98390728839680ee58056625e7b0bb82282a Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Thu, 21 Apr 2022 13:19:22 +0800 Subject: [PATCH 01/52] Only collapse main primary tabs in Page editor This fixes an issue with the primary tab collapse feature in the Page Editor that also collapses nested forms that contain tabs, effectively hiding the entire nested form. --- assets/js/pages-page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/pages-page.js b/assets/js/pages-page.js index d892a23..247ce41 100644 --- a/assets/js/pages-page.js +++ b/assets/js/pages-page.js @@ -455,8 +455,8 @@ var $collapseIcon = $(''), $panel = $('.form-tabless-fields', data.pane), - $secondaryPanel = $('.control-tabs.secondary-tabs', data.pane), - $primaryPanel = $('.control-tabs.primary-tabs', data.pane), + $secondaryPanel = $(data.pane).find('.control-tabs.secondary-tabs').first(), + $primaryPanel = $(data.pane).find('.control-tabs.primary-tabs').first(), hasSecondaryTabs = $secondaryPanel.length > 0 $secondaryPanel.addClass('secondary-content-tabs') From f78acf171711e123d52f57c809268fedbaca0862 Mon Sep 17 00:00:00 2001 From: Romain 'Maz' BILLOIR Date: Sun, 22 May 2022 19:44:54 +0200 Subject: [PATCH 02/52] Fix link (#10) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ea7e33..65b6633 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,6 @@ The Code field allows to assign the API code that you can use to set the active ## See also -Read the [Getting started with Static Pages](https://wintercms.com/blog/post/getting-started-static-pages) tutorial in the Blog. +Read the [Getting started with Static Pages](https://octobercms.com/blog/post/getting-started-static-pages) tutorial in the October CMS Blog. Read the [documentation](/docs/documentation.md). From 81cd3c22d7515c12733fa0a5bf4970b0050638fa Mon Sep 17 00:00:00 2001 From: Ben Thomson Date: Sat, 16 Jul 2022 08:44:30 +0800 Subject: [PATCH 03/52] Add support for Winter v1.2 (#15) Co-authored-by: Luke Towers --- classes/Controller.php | 2 +- components/staticmenu/items.htm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Controller.php b/classes/Controller.php index c45eec2..50fa854 100644 --- a/classes/Controller.php +++ b/classes/Controller.php @@ -75,7 +75,7 @@ public function injectPageTwig($page, $loader, $twig) CmsException::mask($staticPage, 400); $loader->setObject($staticPage); - $template = $twig->loadTemplate($staticPage->getFilePath()); + $template = $twig->load($staticPage->getFilePath()); $template->render([]); CmsException::unmask(); } diff --git a/components/staticmenu/items.htm b/components/staticmenu/items.htm index dea0107..7d2f355 100644 --- a/components/staticmenu/items.htm +++ b/components/staticmenu/items.htm @@ -1,4 +1,4 @@ -{% for item in items if not item.viewBag.isHidden %} +{% for item in items | filter(item => not item.viewBag.isHidden) %}