Skip to content

Commit

Permalink
Fixes #478 (#487)
Browse files Browse the repository at this point in the history
* Fixes #478

* update version numbers
  • Loading branch information
jamesros161 authored Aug 24, 2021
1 parent 0ca978e commit 7b9ca45
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldgrid-theme-framework",
"version": "2.9.0",
"version": "2.9.2",
"description": "BoldGrid Theme Framework",
"main": "index.js",
"engines": {
Expand Down
32 changes: 24 additions & 8 deletions src/assets/js/customizer/controls/bgtfw-sortable-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand All @@ -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' );
}
} );
},

Expand Down Expand Up @@ -572,6 +587,7 @@ export default {
this.setting.set( values );
this.updateTitles();
this.updateAddTypes();
this.disableAttributionTrash();
},

/**
Expand Down
2 changes: 1 addition & 1 deletion src/boldgrid-theme-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <wpb@boldgrid.com>
* Author URI: https://www.boldgrid.com/
* Text Domain: bgtfw
Expand Down

0 comments on commit 7b9ca45

Please sign in to comment.