Jump to content

Recommended Posts

Posted

I was wondering if there was a way to open a site as a window and not make it go full screen?

Just busy replacing our old bullying Frog 3 Form... with a nice shiny new Froglearn form!!  I had our old form opening as a pop up window....  and was hoping I could do something similar with this form!!

No doubt it'll involve a HTML brick... :P

Thanks in advance!!

Popup.gif

Posted
On ‎04‎/‎07‎/‎2018 at 17:52, Graham Quince said:

@adamw or @Simon Law - is this possible?   I know there's a command to determine how an app launches, but is it possible to control if a site opens maximized?

Cough....  I really need to get something for this throat!!! :D

  • Haha 1
Posted

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,

FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

Posted
10 hours ago, pconkie said:

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

I thought this was going to be another conkie special....  till I got to the last bit!!!

I was after a way to open a site not maximised.... lol!!  But no doubt someone else might be able to use that code!! :P

  • 1 month later...
  • 10 months later...
Posted
On 10/07/2018 at 22:34, pconkie said:

This will open a site if you have the data link and the uuid. if you only have uuid you can use an api to get the data link,


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid
});

You could run this off a button click or otherwise.

Only problem is the site opens maximised, but i'm guessing there is another parameter so that it doesn't do this?

 

Right,

Sorry about the delay in responding, super busy here at the moment (as always!). 

You could try something like this:

FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid,
  fullscreen: false,
  resizable: true,
  height: 500,
  width: 500
});

I've not tested this - but the code seems to look like it will accept those params. If not, I'll have to consult one of the front-end experts. Obviously you don't need to pass any params you're not using - for example assignment_uuid

  • Thanks 2
Posted
4 hours ago, adamw said:

 

Right,

Sorry about the delay in responding, super busy here at the moment (as always!). 

You could try something like this:


FrogOS.openSite({
  site: datalink,
  assignment_uuid: uuid,
  fullscreen: false,
  resizable: true,
  height: 500,
  width: 500
});

I've not tested this - but the code seems to look like it will accept those params. If not, I'll have to consult one of the front-end experts. Obviously you don't need to pass any params you're not using - for example assignment_uuid

OK, so how do I actually use this? ? I am a non codey person!

  • 2 weeks later...
Posted
17 hours ago, pconkie said:

Thanks Conkie...  will give it a go when I get 5mins!!  Still recovering from San Fransisco...  and it’s harder looking after my own two than a class of 30!!!!  ?

Posted

@pconkie finally found 5 mins to test this out.. I get a Malformed JavaScript Error ?

 

 

<button onclick="opensite()" class="btn btn-primary">Open</button>
<script>
    function opensite() {
        FrogOS.openSite({
        site: '/AAT/report_abuse/new_page/',
        fullscreen: false,
        resisable: false,
        height: 500,
        width: 500
     }):
    }
</script>

 

Posted
14 hours ago, pconkie said:

You have a colon where a semi-colon should be!

 

<button onclick="opensite()" class="btn btn-primary">Open</button>
<script>
    function opensite() {
        FrogOS.openSite({
        site: '/AAT/report_abuse/new_page/',
        fullscreen: false,
        resisable: false,
        height: 500,
        width: 500
     });
    }
</script>

 

Posted
1 hour ago, gbligh said:

Question - do I put this code on the site I want to open, or on the site that it is opening from?

opening from....

iow the button press will open the site you want to open.

Posted
4 hours ago, pconkie said:

opening from....

iow the button press will open the site you want to open.

Thanks Paul. I’m currently in Spain so can’t try! Does it create a button?

Posted
20 minutes ago, gbligh said:

OK - so tried this and it doesn't seem to open the site. The button gets created, however does nothing.

@pconkie @ADT

Had the same result........ only though Conkie did say it wasn't tested :(

Posted
1 hour ago, ADT said:

Had the same result........ only though Conkie did say it wasn't tested :(

Looks like frog have tightened security in html widgets.  The function in the onClick of the button can't be found.  

Here is another way of doing the same thing....

<button data-name="open-site" class="btn btn-primary">Open</button>
<script>
  this.element.find("button[data-name=open-site]").click(function(e) {
    FrogOS.openSite({
      site:'/prcadm/d_t_lessons_in_year_8/',
      fullscreen: false,
      resizable: true,
      height: 500,
      width: 500
    });
  });
</script>

The site now opens when the button is pressed BUT....

The bit provided by @adamw to get it to open not fullscreen doesn't seem to work...

  • Thanks 1
Posted
On 02/08/2019 at 21:15, pconkie said:

Looks like frog have tightened security in html widgets.  The function in the onClick of the button can't be found.  

Here is another way of doing the same thing....


<button data-name="open-site" class="btn btn-primary">Open</button>
<script>
  this.element.find("button[data-name=open-site]").click(function(e) {
    FrogOS.openSite({
      site:'/prcadm/d_t_lessons_in_year_8/',
      fullscreen: false,
      resizable: true,
      height: 500,
      width: 500
    });
  });
</script>

The site now opens when the button is pressed BUT....

The bit provided by @adamw to get it to open not fullscreen doesn't seem to work...

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!

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