Not Planned Add refresh button to "go to top and bottom" arrows box/list

Discussion in 'Resolved Suggestions (XF2)' started by kaieivindm, May 24, 2018.

  1. kaieivindm

    kaieivindm Customer

    Is it possible to include a button for refresh page in the same area or same "box/list" as go to top and bottom?
    Like this?

    upload_2018-5-24_20-34-12.png

    Would be a nice addition in the Xenbase framework :)
     
  2. Russ

    Russ Designer

    I'll think about adding it in, to be honest a refresh button has never really been requested before.

    Pretty easy edit though:

    Template: PAGE_CONTAINER
    Find:

    Code:
    Copy Source
            <xf:if is="property('scrollJumpButtons') != 'up'">
                <xf:button href="#footer" class="button--scroll" data-xf-click="scroll-to"><i class="fa fa-arrow-down"></i><span class="u-srOnly">{{ phrase('bottom') }}</span></xf:button>
            </xf:if>
    Add below:

    Code:
    Copy Source
    <xf:button href="{$xf.fullUri}" class="button--scroll"><i class="fa fa-refresh"></i><span class="u-srOnly">Refresh</span></xf:button>
     
    kaieivindm likes this.
  3. kaieivindm

    kaieivindm Customer

    Thanks! Will will check it out later today.
     
    Russ likes this.
  4. kaieivindm

    kaieivindm Customer

    I got the button to work fine @Russ
    upload_2018-5-26_10-14-45.png

    But when I click on the refresh button, the page goes to the top again, what do I need to add to just refresh and stay at the bottom og the page?
     
  5. Russ

    Russ Designer

    Ganna need some javascript, open : xb_body:

    Code:
    Copy Source
    <script type="text/javascript">
        $('.button--refresh').click(function() {
        location.reload();
    });
    </script>
    Then use this for the button:

    Code:
    Copy Source
    <xf:button class="button--scroll button--refresh"><i class="fa fa-refresh"></i><span class="u-srOnly">{{ phrase('top') }}</span></xf:button>
    Should work.
     
    kaieivindm likes this.
  6. kaieivindm

    kaieivindm Customer

    When I changed the phrase from 'top' to 'refresh' the above codes worked like a charm! Thanks @Russ

    Just what I needed :)
     
  7. kaieivindm

    kaieivindm Customer

    If possible, would be awesome to add it as an ACP setting as well, with the scrolling buttons, Refresh page or something.
    Pretty sure others needs this as well. :D
     
    Niro likes this.
  8. Russ

    Russ Designer

    So I'm going to leave this out of the styles for the time being. For now, I'd suggest applying the page_container edit via a template modification.
     
  9. kaieivindm

    kaieivindm Customer

    Thats fine, give me 6 months and I will bug you about it again :)
     
    Russ likes this.

Let's work together on your next project

Contact us today to talk about how we can help you

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.