Mobile refresh-button top-left

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
mzonneveld
Posts: 5
Joined: Wednesday 18 November 2020 10:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Mobile refresh-button top-left

Post 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;
    }
}
lost
Posts: 659
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Mobile refresh-button top-left

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest