• Resolved reinhardwallner

    (@reinhardwallner)


    Hi,

    I have an archive photo album page where my photos are grouped by year. When I open a year, I can also close it again afterward. However, if I open a year, then click on an album, and afterwards go back to the year, the toggle button no longer appears. My toggle class "dsv-toggle" is missing. Where is this toggle-class code (i guess javascript) located? is it possible to ensure that toggeling works after opening an album and navigating back to a year (parent element)?

    developer tools show this style:

        <style id="dsv-accordion-style">
            .dsv-toggle {
                cursor: pointer;
                position: relative;
                user-select: none;
            }
    
            .dsv-toggle::after {
                content: "▶";
                position: absolute;
                right: 14px;
                top: 50%;
                margin-top: -9px;
                font-size: 14px;
                color: #ffffff;
                line-height: 1;
                transition: opacity .2s ease;
            }
    
            .dsv-toggle.dsv-open::after {
                content: "▼";
            }
    
            .dsv-cards-wrap {
                overflow: hidden;
            }
    
            .dsv-hidden {
                display: none !important;
            }
        </style>

    BR

    Renhard Wallner

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jacob N. Breetvelt

    (@opajaap)

    I can not inspect the page due to mandatory login.

    dsv-toggle is not from wppa, so i have no idea

    Thread Starter reinhardwallner

    (@reinhardwallner)

    I disabled the password, so you can check the behavior if you have time.

    It seems that the given style is dynamically generated and I thought that this happens from your plugin code but I am not sure.

    BR

    Reinhard Wallner

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    How did you manage to get dsv-toggle into:
    <div id="wppa-bc-..." class="wppa-nav wppa-box wppa-nav-text wppa-bc dsv-toggle"> ?

    It seems to be added only on the initial pageload, not after ajax calls.

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    The point is that after an ajax call the breadcrumb is replaced and the class dsv-toggle is not re-added

    If you find a way to do something like jQuery('.wppa-bc').addClass('dsv-toggle'); at that pont…

    Or just disable ajax in Advanced settings -> System -> I -> Item 5: Frontend Ajax method
    However, this will make the overall user experience worse

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Should i implement a setting where you can enter javascript code that will be executed at the end of a frontend ajax rendering call?
    This would make it easy to implement my suggestion above

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Here is a pre-release version to test the feature:
    https://downloads.wordpress.org/plugin/wp-photo-album-plus.9.2.11.003.zip

    Install it and go to the Photo Albums -> Settings page, Tab Advanced settings -> System
    If you are an administrator (required!) You will see a new setting:

    5.1 Custom JS after ajax Extra script to be executed after ajax render action

    Enter this text:
    jQuery('.wppa-bc').addClass('dsv-toggle');

    And tell me if it works as you want it to do.

    Thread Starter reinhardwallner

    (@reinhardwallner)

    Sorry for not getting back to you sooner.

    Thank you very much for this prerelease. I installed it, but I am already getting the following console errors when starting the page:

    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaAnimationSpeed is not defined
    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaOvlBorderWidth is not defined
    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaResizeEndDelay is not defined
    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaNiceScrollOpts is not defined
    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaAllowAjax is not defined
    jquery.min.js?ver=3.7.1:2 Uncaught ReferenceError: wppaFsPolicy is not defined

    Furthermore, in the prerelease I was no longer able to delete the text of the new configuration parameter.

    In the meantime, however, we have already found a workaround for the issue. From our perspective, there is therefore no need for you to provide another release.

    Thank you very much for your support!

    BR
    Reinhard

    Plugin Author Jacob N. Breetvelt

    (@opajaap)

    Ok. The pre-release only works without wppa-min.js which is not included in it. So, maybe something went wrong during installation of it.

    But, nevertheless, will revert the mods.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.