Plugin Directory

Changeset 3372873


Ignore:
Timestamp:
10/04/2025 02:58:18 PM (5 months ago)
Author:
tekod
Message:

Update to version 0.4.1 from GitHub

Location:
cp-blocks-for-acf
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • cp-blocks-for-acf/tags/0.4.1/assets/cp-blocks-for-acf.css

    r3346583 r3372873  
    2626    margin-left: -25px;
    2727    left: 3em;
    28     bottom: -3em;
     28    bottom: -28px;
    2929}
    3030.cpblocksforacf-new-layout {
     
    4848}
    4949
     50/* for block themes */
     51body.block-editor-page .cpblocksforacf-popup {
     52    bottom: -16px;
     53}
     54body.block-editor-page .cpblocksforacf-popup a {
     55    width: initial !important;
     56}
     57
    5058/* for ACF 6.5 */
    5159.acf-more-layout-actions li a[data-action=copy-layout]::before {
  • cp-blocks-for-acf/tags/0.4.1/assets/cp-blocks-for-acf.js

    r3346583 r3372873  
    9393        // handle click on "copy layout"
    9494        onLayoutCopy(e, $el) {
    95             const $target = $(e.target);
    96 
    97             // Vars
     95            const $target = CpBlocksForACF.isVer65
     96                ? $('.acf-more-layout-actions').data().acf.data.target  // for ACF 6.5+ we must find $target in data
     97                : $(e.target);
     98
     99            // vars
    98100            const $layout = $target.closest('.layout').clone();
    99101            const source = $target.closest('.acf-flexible-content').find('> input[type=hidden]').attr('name');
    100102
    101             // Fix content
     103            // fix content
    102104            CpBlocksForACF.fixInputs($layout);
    103105            CpBlocksForACF.cleanLayouts($layout);
    104106
    105             // Get layout data
     107            // get layout data
    106108            const data = JSON.stringify({
    107109                domain: window.location.origin,
  • cp-blocks-for-acf/trunk/assets/cp-blocks-for-acf.css

    r3346583 r3372873  
    2626    margin-left: -25px;
    2727    left: 3em;
    28     bottom: -3em;
     28    bottom: -28px;
    2929}
    3030.cpblocksforacf-new-layout {
     
    4848}
    4949
     50/* for block themes */
     51body.block-editor-page .cpblocksforacf-popup {
     52    bottom: -16px;
     53}
     54body.block-editor-page .cpblocksforacf-popup a {
     55    width: initial !important;
     56}
     57
    5058/* for ACF 6.5 */
    5159.acf-more-layout-actions li a[data-action=copy-layout]::before {
  • cp-blocks-for-acf/trunk/assets/cp-blocks-for-acf.js

    r3346583 r3372873  
    9393        // handle click on "copy layout"
    9494        onLayoutCopy(e, $el) {
    95             const $target = $(e.target);
    96 
    97             // Vars
     95            const $target = CpBlocksForACF.isVer65
     96                ? $('.acf-more-layout-actions').data().acf.data.target  // for ACF 6.5+ we must find $target in data
     97                : $(e.target);
     98
     99            // vars
    98100            const $layout = $target.closest('.layout').clone();
    99101            const source = $target.closest('.acf-flexible-content').find('> input[type=hidden]').attr('name');
    100102
    101             // Fix content
     103            // fix content
    102104            CpBlocksForACF.fixInputs($layout);
    103105            CpBlocksForACF.cleanLayouts($layout);
    104106
    105             // Get layout data
     107            // get layout data
    106108            const data = JSON.stringify({
    107109                domain: window.location.origin,
Note: See TracChangeset for help on using the changeset viewer.