From ec7b69a20abf619a0d412c1dbbb1906c6f9744b6 Mon Sep 17 00:00:00 2001 From: James White Date: Sun, 15 Apr 2018 18:28:33 +0100 Subject: [PATCH 1/3] Add unique ID to table for CSS targetting --- templates/_settings.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/_settings.html b/templates/_settings.html index a381822..071ed4c 100644 --- a/templates/_settings.html +++ b/templates/_settings.html @@ -38,7 +38,7 @@

Section Settings

Choose which sections should be included in the sitemap.

- +
From 36eaf2bad817e816b83db8e00f4f42d765ef782e Mon Sep 17 00:00:00 2001 From: Benjamin Groessing Date: Wed, 18 Apr 2018 10:11:03 +0200 Subject: [PATCH 2/3] Limit width of include-if column in settings. Fixes #10 --- SitemapPlugin.php | 10 ++++++++++ resources/settings.css | 7 +++++++ templates/_settings.html | 6 +++--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 resources/settings.css diff --git a/SitemapPlugin.php b/SitemapPlugin.php index 961d881..d05f404 100644 --- a/SitemapPlugin.php +++ b/SitemapPlugin.php @@ -4,6 +4,16 @@ class SitemapPlugin extends BasePlugin { + /** + * {@inheritdoc} IPlugin::init() + */ + public function init() + { + if (craft()->request->isCpRequest()) { + craft()->templates->includeCssResource('sitemap/settings.css'); + } + } + /** * {@inheritdoc} IPlugin::getName() */ diff --git a/resources/settings.css b/resources/settings.css new file mode 100644 index 0000000..2ec1186 --- /dev/null +++ b/resources/settings.css @@ -0,0 +1,7 @@ +.sitemap-sections-table .include-if-column { + max-width: 10vw; +} + +.sitemap-sections-table .include-if-column select { + width: 100%; +} diff --git a/templates/_settings.html b/templates/_settings.html index 071ed4c..ea1e81c 100644 --- a/templates/_settings.html +++ b/templates/_settings.html @@ -38,12 +38,12 @@

Section Settings

Choose which sections should be included in the sitemap.

-
{{ 'Enabled'|t }} {{ 'Section'|t }}
+
- + @@ -68,7 +68,7 @@

Section Settings

{{ section.urlFormat }} {%- endif -%} -
{{ 'Enabled'|t }} {{ 'Section'|t }} {{ 'URL Format'|t }}{{ 'Include if...'|t }}{{ 'Include if...'|t }} {{ 'Entries'|t }} {{ 'Change Frequency'|t }} {{ 'Priority'|t }} + {{- forms.selectField({ name: "includeiffield[#{section.id}]", options: includeIfFieldOptions, From 53053df74b2e9008856e2c2f0e4cb97fcfe475b2 Mon Sep 17 00:00:00 2001 From: Benjamin Groessing Date: Wed, 18 Apr 2018 10:15:37 +0200 Subject: [PATCH 3/3] Bump version --- CHANGELOG | 5 +++++ SitemapPlugin.php | 2 +- changelog.json | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index f3086a1..e036057 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and starting with version 1.0.0 this project adheres to [Semantic Versioning](http://semver.org/). +## [1.2.3] - 2018-04-18 + +### Fixed +- Limit width of include-if column in settings + ## [1.2.2] - 2018-02-18 ### Fixed diff --git a/SitemapPlugin.php b/SitemapPlugin.php index d05f404..6fa6b74 100644 --- a/SitemapPlugin.php +++ b/SitemapPlugin.php @@ -27,7 +27,7 @@ public function getName() */ public function getVersion() { - return '1.2.2'; + return '1.2.3'; } /** diff --git a/changelog.json b/changelog.json index d7deaf8..845b492 100644 --- a/changelog.json +++ b/changelog.json @@ -1,4 +1,12 @@ [ + { + "version": "1.2.3", + "downloadUrl": "https://github.com/groe/craft-sitemap/archive/v1.2.3.zip", + "date": "2018-04-18T10:15:00+02:00", + "notes": [ + "[Fixed] Limit width of include-if column in settings" + ] + }, { "version": "1.2.2", "downloadUrl": "https://github.com/groe/craft-sitemap/archive/v1.2.2.zip",