diff --git a/CHANGELOG.md b/CHANGELOG.md index df2b5bd..d5e26bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,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.5.0 - 2022-08-05 +### Added +- Added the `ungroupedTypesPosition` field config setting, which can be used to specify the display order for ungrouped block types + ## 1.4.5 - 2022-07-14 ### Improved - MatrixMate now defers registering its CP resources to an `Application::EVENT_INIT` event handler, reducing the risk of conflicting with other plugins. diff --git a/README.md b/README.md index 6dc53aa..4639299 100644 --- a/README.md +++ b/README.md @@ -369,6 +369,21 @@ To explicitly hide one or several block types, add an array of block type handle This setting will hide any and all block types added to it, regardless of whether those types have been added to any groups or not, and regardless of the value for the `hideUngroupedTypes` setting. +#### ungroupedTypesPosition [string] +*Default: `'before'`* + +If set to `'after'`, buttons for ungrouped block types will render _after_ the group buttons. + +```php +... +'matrixFieldHandle' => [ + 'groups' => [...], + 'ungroupedTypesPosition' => 'after', +], +``` + +This setting only applies when using the grouping feature. + ### Advanced configuration *Danger Zone* diff --git a/composer.json b/composer.json index e123d95..a2946f9 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "vaersaagod/matrixmate", "description": "Welding Matrix into shape, mate!", "type": "craft-plugin", - "version": "1.4.5", + "version": "1.5.0", "keywords": [ "craft", "cms", diff --git a/src/assetbundles/matrixmate/dist/js/MatrixMate.js b/src/assetbundles/matrixmate/dist/js/MatrixMate.js index ac29c9f..be9fca2 100644 --- a/src/assetbundles/matrixmate/dist/js/MatrixMate.js +++ b/src/assetbundles/matrixmate/dist/js/MatrixMate.js @@ -377,13 +377,24 @@ }).get().reverse()); if ($hiddenUngroupedOrigButtons.length) { + var ungroupedTypesPosition = fieldConfig.ungroupedTypesPosition || 'before'; var $ul = $('