From a38b82e243e476dd7871c77c3bd99c7ba06b239f Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Wed, 22 Jul 2015 08:31:23 +1000 Subject: [PATCH] version 0.3.1 Signed-off-by: Josh Crawford --- README.md | 8 +++++++- supertable/SuperTablePlugin.php | 2 +- supertable/resources/css/SuperTableInput.css | 2 +- .../resources/js/MatrixConfiguratorAlt.js | 3 ++- supertable/templates/fields.html | 17 ++++++++++------- supertable/templates/settings.html | 2 +- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index aafd8cd..2c1d900 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,6 @@ A Super Table field can be set to be static, which turns the field into a non-re - Test more third-party fieldtypes, purely for a complete list. - Add ability to collapse rows. -- Fix issue with Redactor - requires full rewrite using non tables [#3](https://github.com/engram-design/SuperTable/issues/3). - New settings layout, including drag/drop, full control over field layout. Allows you to set out the field exactly as you like. - Add template hook to allow other plugins to provide layouts for editing field. - Allow for SuperTable-in-SuperTable - because why not. @@ -84,6 +83,13 @@ Thanks go to [@brandonkelly](https://github.com/brandonkelly) and [@benparizek]( ## Changelog +#### 0.3.1 + +- Fix for field labels on inner-Matrix field being hidden [#16](https://github.com/engram-design/SuperTable/issues/16). +- Latest Redactor version fixes [#3](https://github.com/engram-design/SuperTable/issues/3). +- Fix for width not being applied for columns [#15](https://github.com/engram-design/SuperTable/issues/15). +- Fix issues with multiple Matrix Configurators causing many javascript issues [see Craft 2.4.2677](https://buildwithcraft.com/updates#build2677). + #### 0.3.0 - Added composer support. diff --git a/supertable/SuperTablePlugin.php b/supertable/SuperTablePlugin.php index 5c06e1c..c99283e 100755 --- a/supertable/SuperTablePlugin.php +++ b/supertable/SuperTablePlugin.php @@ -14,7 +14,7 @@ public function getName() public function getVersion() { - return '0.3.0'; + return '0.3.1'; } public function getDeveloper() diff --git a/supertable/resources/css/SuperTableInput.css b/supertable/resources/css/SuperTableInput.css index ba46f7f..aaa58e6 100644 --- a/supertable/resources/css/SuperTableInput.css +++ b/supertable/resources/css/SuperTableInput.css @@ -7,7 +7,7 @@ table.editable.superTable tbody tr td { text-align: left; } -table.editable.superTable tbody tr td .field .heading { +table.editable.superTable tbody tr td > .field > .heading { display: none; } diff --git a/supertable/resources/js/MatrixConfiguratorAlt.js b/supertable/resources/js/MatrixConfiguratorAlt.js index c1577bd..f88c83c 100644 --- a/supertable/resources/js/MatrixConfiguratorAlt.js +++ b/supertable/resources/js/MatrixConfiguratorAlt.js @@ -44,7 +44,8 @@ Craft.MatrixConfiguratorAlt = Garnish.Base.extend({ this.inputIdPrefix = Craft.formatInputId(this.inputNamePrefix); // Fix to support more than one Matrix in a single field - this.$container = $('.fieldtype-settings[name="'+inputNamePrefix+'"] .matrix-configurator > .field > .input'); + this.$container = $('#' + this.inputIdPrefix + '-matrix-configurator:first .input:first'); + //this.$container = $('.matrix-configurator:first .input:first'); this.$blockTypesColumnContainer = this.$container.children('.block-types').children(); this.$fieldsColumnContainer = this.$container.children('.fields').children(); diff --git a/supertable/templates/fields.html b/supertable/templates/fields.html index bbeb7d8..9513a5a 100644 --- a/supertable/templates/fields.html +++ b/supertable/templates/fields.html @@ -1,16 +1,19 @@ {% if element is not defined %}{% set element = null %}{% endif %} {% if namespace is not defined %}{% set namespace = 'fields' %}{% endif %} +{% set columnSettings = [] %} +{% if settings is defined and settings %} + {% for col in settings.columns %} + {% set columnSettings = columnSettings | merge([col]) %} + {% endfor %} +{% endif %} + {% namespace namespace %} - {% for field in fields %} + {% for index, field in fields %} {# Additional field settings #} - {% if settings is defined and settings %} - {% set fieldId = field.getField().id %} - - {% if settings[fieldId] is defined %} - {% set width = settings[fieldId].width %} - {% endif %} + {% if columnSettings[index] is defined %} + {% set width = columnSettings[index].width %} {% endif %} {% if settings is defined and settings.fieldLayout == 'row' %} diff --git a/supertable/templates/settings.html b/supertable/templates/settings.html index c555ea4..667def8 100755 --- a/supertable/templates/settings.html +++ b/supertable/templates/settings.html @@ -58,7 +58,7 @@ -
+
{% namespace fieldName~'[typesettings]' %} {{ fieldType.getSettingsHtml()|raw }}