ComboStrap / stale

A Dokuwiki plugin to make the cache stale by touching configuration files
GNU General Public License v2.0
2 stars 1 forks source link

Feature request: Add page refresh after cache stale dialog in --- stale.js --- #2

Closed Chris75forumname closed 3 years ago

Chris75forumname commented 3 years ago

Feature request: Add "page refresh" after "cache stale dialog" in stale.js

            dialogElement.dialog({
                dialogClass: "stale-dialog",
                closeOnEscape: true,
                modal: true,
                open: function () {
                    // close it after 2 seconds (toast)
                    setTimeout(function() { remove(dialogElement); }, 2000);
                    setTimeout(function() { window.location.reload(); }, 1300);
                }
            });

Works for me! Cheers!

Source: https://stackoverflow.com/questions/3992353/javascript-function-to-reload-a-page-every-x-seconds

gerardnico commented 3 years ago

That's true, that reloading is a natural need as everybody do it. For now, I was lazy and was hitting the ''f5'' key.

If I see your code well, you reload before the closing of the dialog :) I'm from the hard design school where every action needs a feedback. May be that the dialog should come after the reload.

Chris75forumname commented 3 years ago

Yes, please, however you like! This was only meant to be a working example. I am just a novice user who doesn't know better! And I'm not a software engineer (as a matter of fact, I'm a mechanical engineer :-) ) But, I am thinking of my users, who do not even know anything about the f5 key option! So it's better, when it's kept simple! Yours, Chris

gerardnico commented 3 years ago

There is no software engineer. I used also to work in the mechanical field and once upon a time, I had the whole metal table (you know: resistance and all other mechanical properties that you get after exposition to heat).

Done. I close it but if this is not what you expected or you have any other feedback, let a message.