Jump to content

Open a site as a pop up??


ADT

Recommended Posts

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

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!!!  

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

@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 by pconkie
Link to comment
Share on other sites

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

  • 2 weeks later...
  • 5 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...