Plugin Directory

Changeset 1187379


Ignore:
Timestamp:
06/25/2015 08:41:07 AM (11 years ago)
Author:
urre
Message:

tagging version 1.1.6

Location:
acf-fold-flexible-content
Files:
3 edited
10 copied

Legend:

Unmodified
Added
Removed
  • acf-fold-flexible-content/tags/1.1.6/js/acf-fold-flexible.admin.js

    r1089798 r1187379  
    44
    55    $(function() {
     6
     7        var acfpro = false;
     8
     9        // Detect ACF Pro
     10        if($("#acf-pro-input-css").length) {
     11            acfpro = true;
     12        }
    613
    714        // Check if ACF Flexible Content fields exists at all
     
    1724            labels.each(function() {
    1825
    19                 // Check open/closed state
    20                 if($(this).parent().attr("data-toggle")) {
    21                     if($(this).parent().attr("data-toggle") !== 'open') {
    22                         $(this).addClass('open');
    23                     } else {
    24                         $(this).removeClass('open');
    25                         $(this).parent().attr('data-toggle', 'closed');
    26                     }
     26                // Fold everything
     27                $(this).removeClass('open');
     28                $(this).parent().attr('data-toggle', 'closed');
     29               
     30                if(acfpro) {
     31                    $(this).nextAll('.row-layout').first().hide();
     32                } else {
     33                    $(this).nextAll('.row_layout').first().hide();
    2734                }
    2835
     
    9198
    9299            // Open/Close panels
    93             $('.acf-postbox').on('click', '.acf-fc-layout-handle', function() {
     100            $(document).on('click', '.acf-fc-layout-handle', function() {
     101
    94102                var toggle_list = $(this);
    95                 if(toggle_list.parent().attr("data-toggle") === 'open') {
    96                     toggle_list.removeClass('open');
     103
     104                // Toggle open class
     105                if(acfpro) {
     106                    if($(this).next().next('.row-layout').css("display") == "none") {
     107                        toggle_list.removeClass('open');
     108                    } else {
     109                        toggle_list.addClass('open');
     110                    }
    97111                } else {
    98                     toggle_list.addClass('open');
     112                    if($(this).next('.row_layout').css("display") == "none") {
     113                        toggle_list.removeClass('open');
     114                    } else {
     115                        toggle_list.addClass('open');
     116                    }
     117
    99118                }
     119
    100120            });
    101121
  • acf-fold-flexible-content/tags/1.1.6/readme.md

    r1162813 r1187379  
    2525
    2626## Changelog
     27+ 1.1.6: Fold everything from start. No longer check open/closed state. Better support for ACF Pro.
     28+ 1.1.5: No longer check open/closed state
     29+ 1.1.4: Fixed an issue were the tooltips didn't work together with Gravity forms.
    2730+ 1.1.3: Fixed an issue were the tooltips didn't work like expected on regular ACF. ACF Pro was fine. Now both!
    2831+ 1.1.2: Fixed an issue were newly added field layouts did not get icon tooltips. Also fixed so newly added don't always stay blue, not until clicked.
  • acf-fold-flexible-content/tags/1.1.6/readme.txt

    r1162826 r1187379  
    3434== Changelog ==
    3535
     36= 1.1.6 =
     37Fold everything from start. No longer check open/closed state. Better support for ACF Pro.
     38
     39= 1.1.5 =
     40No longer check open/closed state
     41
    3642= 1.1.4 =
    3743Fixed an issue were the tooltips didn't work together with Gravity forms.
  • acf-fold-flexible-content/trunk/js/acf-fold-flexible.admin.js

    r1089798 r1187379  
    44
    55    $(function() {
     6
     7        var acfpro = false;
     8
     9        // Detect ACF Pro
     10        if($("#acf-pro-input-css").length) {
     11            acfpro = true;
     12        }
    613
    714        // Check if ACF Flexible Content fields exists at all
     
    1724            labels.each(function() {
    1825
    19                 // Check open/closed state
    20                 if($(this).parent().attr("data-toggle")) {
    21                     if($(this).parent().attr("data-toggle") !== 'open') {
    22                         $(this).addClass('open');
    23                     } else {
    24                         $(this).removeClass('open');
    25                         $(this).parent().attr('data-toggle', 'closed');
    26                     }
     26                // Fold everything
     27                $(this).removeClass('open');
     28                $(this).parent().attr('data-toggle', 'closed');
     29               
     30                if(acfpro) {
     31                    $(this).nextAll('.row-layout').first().hide();
     32                } else {
     33                    $(this).nextAll('.row_layout').first().hide();
    2734                }
    2835
     
    9198
    9299            // Open/Close panels
    93             $('.acf-postbox').on('click', '.acf-fc-layout-handle', function() {
     100            $(document).on('click', '.acf-fc-layout-handle', function() {
     101
    94102                var toggle_list = $(this);
    95                 if(toggle_list.parent().attr("data-toggle") === 'open') {
    96                     toggle_list.removeClass('open');
     103
     104                // Toggle open class
     105                if(acfpro) {
     106                    if($(this).next().next('.row-layout').css("display") == "none") {
     107                        toggle_list.removeClass('open');
     108                    } else {
     109                        toggle_list.addClass('open');
     110                    }
    97111                } else {
    98                     toggle_list.addClass('open');
     112                    if($(this).next('.row_layout').css("display") == "none") {
     113                        toggle_list.removeClass('open');
     114                    } else {
     115                        toggle_list.addClass('open');
     116                    }
     117
    99118                }
     119
    100120            });
    101121
  • acf-fold-flexible-content/trunk/readme.md

    r1162813 r1187379  
    2525
    2626## Changelog
     27+ 1.1.6: Fold everything from start. No longer check open/closed state. Better support for ACF Pro.
     28+ 1.1.5: No longer check open/closed state
     29+ 1.1.4: Fixed an issue were the tooltips didn't work together with Gravity forms.
    2730+ 1.1.3: Fixed an issue were the tooltips didn't work like expected on regular ACF. ACF Pro was fine. Now both!
    2831+ 1.1.2: Fixed an issue were newly added field layouts did not get icon tooltips. Also fixed so newly added don't always stay blue, not until clicked.
  • acf-fold-flexible-content/trunk/readme.txt

    r1162826 r1187379  
    3434== Changelog ==
    3535
     36= 1.1.6 =
     37Fold everything from start. No longer check open/closed state. Better support for ACF Pro.
     38
     39= 1.1.5 =
     40No longer check open/closed state
     41
    3642= 1.1.4 =
    3743Fixed an issue were the tooltips didn't work together with Gravity forms.
Note: See TracChangeset for help on using the changeset viewer.