Page 1 of 1

Mobile refresh-button top-left

Posted: Thursday 24 November 2022 13:21
by mzonneveld
Image

This refresh-button is usefull when DZ is loaded from a startpage on a iOS device.

Script

Code: Select all

$(function () {
    // Insert Refresh button
    var btn = $("<div class='refresh-button' onclick='window.location.reload()'><img src='//www.digizon.nl/domoticz/refresh-button.png' /></div>");
    $(".navbar-inner").prepend(btn);
}); // Doc Ready
CSS

Code: Select all

@media (max-width: 767px) {
    .refresh-button {
        display: inline-block;
        position: absolute;
        margin: 2px 0 0 2px;
        padding: 2px 2px 0px 2px;
        border: 1px solid #e3e3e3;
        border-radius: 4px;
        background: rgba(0, 0, 0, 0.15);
    }

    .refresh-button img {
        display: block;
    }
}

Re: Mobile refresh-button top-left

Posted: Thursday 24 November 2022 15:57
by lost
mzonneveld wrote: Thursday 24 November 2022 13:21 This refresh-button is usefull when DZ is loaded from a startpage on a iOS device.
Strange, since 2021.1 (maybe even before), elements on page are updated almost immediately (mobile version or not). Before this was every 10s. So no update button should be needed.

I only need this kind of page reload trick for my own custom pages (probably because they are static HTML pages, even if built/updated dynamically from python scripts): Never managed to get this done automatically when needed.

Not a big deal anyway as that's only last IP cam capture aggregated images and my custom phone spam filtering logs that use custom pages in my system.