Jump to content
ADT

Open a site as a pop up??

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
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 .... :D

 

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...