From 45efc2fd4ffd36d1cde4e1c8248ea832b18ceab1 Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Mon, 29 Feb 2016 13:45:31 +1100 Subject: [PATCH] version 0.4.4 --- changelog.json | 8 ++++++++ supertable/fieldtypes/SuperTableFieldType.php | 4 ++++ supertable/templates/rowInput.html | 4 +++- supertable/templates/tableInput.html | 4 +++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/changelog.json b/changelog.json index ca02330..60be38d 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,12 @@ [ + { + "version": "0.4.4", + "downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.4.zip", + "date": "2016-02-29 13:45:00", + "notes": [ + "[Fixed] Fixed issue with rows not displaying correctly for Static Field option." + ] + }, { "version": "0.4.3", "downloadUrl": "https://github.com/engram-design/SuperTable/archive/0.4.3.zip", diff --git a/supertable/fieldtypes/SuperTableFieldType.php b/supertable/fieldtypes/SuperTableFieldType.php index 8661d3b..2ed07b5 100755 --- a/supertable/fieldtypes/SuperTableFieldType.php +++ b/supertable/fieldtypes/SuperTableFieldType.php @@ -359,6 +359,10 @@ public function getSearchKeywords($value) $keywords = array(); $contentService = craft()->content; + if ($this->settings->staticField) { + $value = array($value); + } + foreach ($value as $block) { $originalContentTable = $contentService->contentTable; $originalFieldColumnPrefix = $contentService->fieldColumnPrefix; diff --git a/supertable/templates/rowInput.html b/supertable/templates/rowInput.html index 87aa947..bd83ac9 100644 --- a/supertable/templates/rowInput.html +++ b/supertable/templates/rowInput.html @@ -9,7 +9,9 @@ {% set totalNewBlocks = 0 %} {% if settings.staticField %} - {% set blocks = [blocks] %} + {% if blocks %} + {% set blocks = [blocks] %} + {% endif %} {% endif %} {% for block in blocks %} diff --git a/supertable/templates/tableInput.html b/supertable/templates/tableInput.html index 5ae28a1..001ea2a 100644 --- a/supertable/templates/tableInput.html +++ b/supertable/templates/tableInput.html @@ -26,7 +26,9 @@ {% set totalNewBlocks = 0 %} {% if settings.staticField %} - {% set blocks = [blocks] %} + {% if blocks %} + {% set blocks = [blocks] %} + {% endif %} {% endif %} {% for block in blocks %}