From 7f83c5827f4a75785e2f2d38df8191a167939d6e Mon Sep 17 00:00:00 2001 From: James Rosado Date: Tue, 24 Aug 2021 14:42:20 -0400 Subject: [PATCH 1/2] Fixes #478 --- .../controls/bgtfw-sortable-accordion.js | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/src/assets/js/customizer/controls/bgtfw-sortable-accordion.js b/src/assets/js/customizer/controls/bgtfw-sortable-accordion.js index a3a2e4529..f1f8a9469 100644 --- a/src/assets/js/customizer/controls/bgtfw-sortable-accordion.js +++ b/src/assets/js/customizer/controls/bgtfw-sortable-accordion.js @@ -94,7 +94,7 @@ export default { this.sortable .on( 'click', '.bgtfw-sortable:not(.disabled)', e => this._addItem( e ) ) .on( 'click', '.bgtfw-container-control > .bgtfw-sortable-control:not(.selected), .repeater-control.align .direction:not(.selected)', e => this._select( e ) ) - .on( 'click', '.dashicons-trash', e => this._deleteItem( e ) ) + .on( 'click', '.dashicons-trash:not(.disabled)', e => this._deleteItem( e ) ) .on( 'change', '.repeater-control.menu-select', e => this._updateMenuSelect( e ) ) .on( 'click', '.repeater-control.align .direction:not(.selected)', e => this._updateAlignment( e ) ) .on( 'click', '.bgtfw-container-control > .bgtfw-sortable-control:not(.selected)', () => this._updateContainer() ) @@ -116,14 +116,29 @@ export default { } ); api( 'custom_logo', value => value.bind( to => this._toggleLogo( to ) ) ); + this.disableAttributionTrash(); + } ); + }, - let footerContainer = api.control( 'bgtfw_footer_layout' ).container; - let footerSortableWrappers = footerContainer.find( '.sortable-wrapper' ); - footerSortableWrappers.each( ( _, wrapper ) => { - if ( 0 !== footerContainer.find( wrapper ).find( '.dashicons-admin-links' ).length ) { - footerContainer.find( wrapper ).find( '.dashicons-trash' ).addClass( 'disabled' ); - } - } ); + /** + * Disables the Trash Icon for Attribution LInks. + * + * @since 2.9.2 + */ + disableAttributionTrash() { + var footerContainer = api.control( 'bgtfw_footer_layout' ).container, + footerSortableWrappers = footerContainer.find( '.sortable-wrapper' ); + + footerSortableWrappers.find( '.dashicons-trash' ).removeClass( 'disabled' ); + + footerSortableWrappers.each( ( _, wrapper ) => { + var $attributionsLinks = footerContainer.find( wrapper ).find( '.dashicons-admin-links' ), + $attributionsHandles = $attributionsLinks.parents( '.sortable-title' ), + $repeaterHandles = $( wrapper ).children( '.sortable-title' ); + if ( 0 !== $attributionsLinks.length ) { + $attributionsHandles.find( '.dashicons-trash' ).addClass( 'disabled' ); + $repeaterHandles.find( '.dashicons-trash' ).addClass( 'disabled' ); + } } ); }, @@ -572,6 +587,7 @@ export default { this.setting.set( values ); this.updateTitles(); this.updateAddTypes(); + this.disableAttributionTrash(); }, /** From 109917cd3911e6165cabc96fa20a2f235bb033c3 Mon Sep 17 00:00:00 2001 From: James Rosado Date: Tue, 24 Aug 2021 15:35:42 -0400 Subject: [PATCH 2/2] update version numbers --- README.md | 5 +++++ package.json | 2 +- src/boldgrid-theme-framework.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1cb2e0e0e..b57c6b7f9 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,11 @@ user guide for more information. ## Changelog ## +### 2.9.2 ### +* Bug Fix: Footer Layout Delete Buttons are disabled in same row as Attribution [#478](https://github.com/BoldGrid/boldgrid-theme-framework/issues/478) + +### 2.9.1 ### +* Bug Fix: Blog Page Read More Links - missing / broken controls [#480](https://github.com/BoldGrid/boldgrid-theme-framework/issues/480) ### 2.9.0 ### * New Feature: New Edit Buttons added to Customizer Preview that feature dropdowns for buttons with multiple control options. diff --git a/package.json b/package.json index d8eded441..f3f5f1b61 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "boldgrid-theme-framework", - "version": "2.9.0", + "version": "2.9.2", "description": "BoldGrid Theme Framework", "main": "index.js", "engines": { diff --git a/src/boldgrid-theme-framework.php b/src/boldgrid-theme-framework.php index ee8a6b3bb..af30fc0fa 100644 --- a/src/boldgrid-theme-framework.php +++ b/src/boldgrid-theme-framework.php @@ -3,7 +3,7 @@ * Plugin Name: BoldGrid Theme Framework * Plugin URI: https://www.boldgrid.com/docs/configuration-file * Description: BoldGrid Theme Framework is a library that allows you to easily make BoldGrid themes. Please see our reference guide for more information: https://www.boldgrid.com/docs/configuration-file - * Version: 2.9.0 + * Version: 2.9.2 * Author: BoldGrid.com * Author URI: https://www.boldgrid.com/ * Text Domain: bgtfw