Skip to content

Commit

Permalink
Merge pull request #49 from percipioglobal/bugfix/1.3.2.1
Browse files Browse the repository at this point in the history
Bugfix/1.3.2.1
  • Loading branch information
Jamie Taylor authored Aug 19, 2020
2 parents 493b84c + f413fa9 commit b4711d5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).


## 1.3.3 - 2020-8-19 Bugfix
Fixed bugs introduced in last release by not checking the default configuration settings - Apologies. New features coming in next release!
Fixes issues (#44, #45, #46, #47)

## 1.3.2 - 2020-8-13 Bugfix
ElementInterface updated to allow colour preview for custom arrays. Fixes issue #42
fieldValue conditions for standard colour strings udpated to reflect null update in version 1.3.1. Fixes issue #43
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "percipioglobal/craft-colour-swatches",
"description": "Let clients choose from a predefined set of colours.",
"type": "craft-plugin",
"version": "1.3.2.1",
"version": "1.3.3",
"keywords": [
"craft",
"cms",
Expand Down
4 changes: 2 additions & 2 deletions src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
'Primary' => [ // custom label
[
'label' => 'primary', // custom label
'default' => false,
'default' => true,
'color' => [
[
'color' => '#38B2AC', // the colour shown in the fieldtype (required)
Expand Down Expand Up @@ -122,7 +122,7 @@
'Gradients' => [
[
'label' => 'primary',
'default' => false,
'default' => true,
'color' => [
[
'color' => '#38B2AC', // the colour shown in the fieldtype (required)
Expand Down
2 changes: 1 addition & 1 deletion src/templates/colourOption.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{% else %}
{% set colours = value.color | split(',') %}
{% endif %}
<button type="button" title="{{ option.label }}" data-value="{{ value | json_encode }}" class="option {% if (option.default and (not fieldValue is null or (fieldValue is null and not fieldValue.color))) or (fieldValue is null and fieldValue.color == option.color) %} active{% endif %}" style="
<button type="button" title="{{ option.label }}" data-value="{{ value | json_encode }}" class="option {% if (isDefault and fieldValue is empty) or (fieldValue is not empty and (value.label == fieldValue)) %} active{% endif %}" style="
{% switch colours | length %}
{% case 1 %}
--color: {{ value.color|parseRefs|raw }};
Expand Down

0 comments on commit b4711d5

Please sign in to comment.