Skip to content

Commit

Permalink
Fix: Floating Bars - Display on three col on remote library [ED-15686] (
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoladj77 authored Sep 3, 2024
1 parent f11424d commit 03940a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TemplateLibraryTemplateView = Marionette.ItemView.extend( {
classes += ' elementor-template-library-pro-template';
}

return classes;
return elementor.hooks.applyFilters( 'elementor/editor/template-library/template/classes', classes, this );
},

attributes() {
Expand Down
10 changes: 10 additions & 0 deletions modules/floating-buttons/assets/js/floating-bars/editor/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ class FloatingBarsLibraryModule extends elementorModules.editor.utils.Module {
advancedTab.style.display = 'none';
}
}

onElementorInit() {
const urlParams = new URLSearchParams( window.location.search );

if ( 'floating-bars' === urlParams.get( 'floating_element' ) ) {
elementor.hooks.addFilter( 'elementor/editor/template-library/template/classes', ( classes ) => {
return classes.replace( 'elementor-template-library-template-floating_button', 'elementor-template-library-template-floating_bar' );
}, 10, 1 );
}
}
}

export default FloatingBarsLibraryModule;

0 comments on commit 03940a0

Please sign in to comment.