Graham Quince Posted August 6, 2019 Share Posted August 6, 2019 16 hours ago, adamw said: I'm on annual leave this week, and don't have access to the code, so I can't check it for you. I will have to refer you to @Graham Quince for now! Oh man and I’m in Australia. Sorry guys. @Simon Law are you about? Link to comment Share on other sites More sharing options...
gbligh Posted August 8, 2019 Share Posted August 8, 2019 Is there a way this can be added into a HTML widget so that it defaults all sites to open a certain size? I'm just thinking it would really help people navigate. We STILL have staff/kids/parents that try and click the back button in the browser to, naturally, go back and end up logging themselves out. I'd rather all sites opened in a smaller way and they have the option to make them bigger. Not sure what thoughts are about that? @ADT @Graham Quince @pconkie @Adam Link to comment Share on other sites More sharing options...
ADT Posted August 9, 2019 Author Share Posted August 9, 2019 16 hours ago, gbligh said: Is there a way this can be added into a HTML widget so that it defaults all sites to open a certain size? I'm just thinking it would really help people navigate. We STILL have staff/kids/parents that try and click the back button in the browser to, naturally, go back and end up logging themselves out. I'd rather all sites opened in a smaller way and they have the option to make them bigger. Not sure what thoughts are about that? @ADT @Graham Quince @pconkie @Adam That’s what I was hoping.... that when it opens it reads a HTML widget and then resizes!!! 1 Link to comment Share on other sites More sharing options...
gbligh Posted August 9, 2019 Share Posted August 9, 2019 6 hours ago, ADT said: That’s what I was hoping.... that when it opens it reads a HTML widget and then resizes!!! Just need someone to work some magic now .... Link to comment Share on other sites More sharing options...
pconkie Posted August 20, 2019 Share Posted August 20, 2019 (edited) @gbligh @ADT I have no idea of the performance impact of this and i'm sure there is a better internal frog way of doing this but... as a bit of fun and for the challenge..... 1. On desktop devices frog sites open within a page division called ui-os-desktop 2.If we could 'watch' this division for changes - specifically additions - we could catch when sites are opened, dragged, resized and closed. 3. If we detect an addition and think it is a full screen site, then we could trigger the minimise. A quick google reveals that this is possible by placing the following in a html widget on your dashboards: <script> //set a watch on frog var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; // define a new observer var obs = new MutationObserver(function(mutations, observer) { // look through all mutations that just occured for(var i=0; i<mutations.length; ++i) { // look through all added nodes of this mutation for(var j=0; j<mutations[i].addedNodes.length; ++j) { var $possibleSite = $(mutations[i].addedNodes[j]); //is it fullscreen? if ($possibleSite.hasClass("fullscreen_dialog")) { //if so trigger the minimise button $possibleSite.find(".ui-minimiser").trigger("click"); } } } }); // have the observer observe for changes in children obs.observe($(".ui-os-desktop").get(0), { childList: true }); </script> Edited August 20, 2019 by pconkie Link to comment Share on other sites More sharing options...
gbligh Posted August 20, 2019 Share Posted August 20, 2019 3 hours ago, pconkie said: @gbligh @ADT I have no idea of the performance impact of this and i'm sure there is a better internal frog way of doing this but... as a bit of fun and for the challenge..... 1. On desktop devices frog sites open within a page division called ui-os-desktop 2.If we could 'watch' this division for changes - specifically additions - we could catch when sites are opened, dragged, resized and closed. 3. If we detect an addition and think it is a full screen site, then we could trigger the minimise. A quick google reveals that this is possible by placing the following in a html widget on your dashboards: <script> //set a watch on frog var MutationObserver = window.MutationObserver || window.WebKitMutationObserver; // define a new observer var obs = new MutationObserver(function(mutations, observer) { // look through all mutations that just occured for(var i=0; i<mutations.length; ++i) { // look through all added nodes of this mutation for(var j=0; j<mutations[i].addedNodes.length; ++j) { var $possibleSite = $(mutations[i].addedNodes[j]); //is it fullscreen? if ($possibleSite.hasClass("fullscreen_dialog")) { //if so trigger the minimise button $possibleSite.find(".ui-minimiser").trigger("click"); } } } }); // have the observer observe for changes in children obs.observe($(".ui-os-desktop").get(0), { childList: true }); </script> Hi Paul, Just had a go and it seems to work. As you say, not sure how it affects everything else in the platform! Is there a way to specify what size it minimises too? And also so it can be centred on the screen? This is me now being very OCD!!! This code won't work on mobile devices too right? Link to comment Share on other sites More sharing options...
gbligh Posted August 30, 2019 Share Posted August 30, 2019 @pconkie forgot to copy you in to my reply Paul! Link to comment Share on other sites More sharing options...
gbligh Posted February 24, 2020 Share Posted February 24, 2020 Giving this a bump! @pconkie @ADT @Graham Quince Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now