Jump to content

FrogCode App: Detect resizing


pconkie

Recommended Posts

One for a dev please... @adamw? @Simon Law?

In a FrogCode application how can i detect a resize?

$( ".ui-dialog" ).bind( "dialogresize", function(event, ui) {
  console.log(event);
  console.log(ui);
});

 The code above triggers when the app is resized by dragging on an edge, but not when the max/min button is pressed (or the title bar double clicked)

How can I get the width of the app whenever the width is changed? 

Thanks

Paul

Edited by pconkie
Link to comment
Share on other sites

44 minutes ago, pconkie said:

One for a dev please... @adamw? @Simon Law?

In a FrogCode application how can i detect a resize?


$( ".ui-dialog" ).bind( "dialogresize", function(event, ui) {
  console.log(event);
  console.log(ui);
});

 The code above triggers when the app is resized by dragging on an edge, but not when the max/min button is pressed (or the title bar double clicked)

How can I get the width of the app whenever the width is changed? 

Thanks

Paul

I'll have to dig into the code and have a look, but off the top of my head, you could try listening for the 'app.resize'  trigger,. it's possible that it get's fired when you push the min/max button. As for the width... I'll have to get back to you on that, probably some jquery to get the calculated width of the new element. @Graham Quince may know a sneaky way?

Link to comment
Share on other sites

16 hours ago, adamw said:

I'll have to dig into the code and have a look, but off the top of my head, you could try listening for the 'app.resize'  trigger,. it's possible that it get's fired when you push the min/max button. As for the width... I'll have to get back to you on that, probably some jquery to get the calculated width of the new element. @Graham Quince may know a sneaky way?

'app.resize': function(el, ev, dialog) {

//do something fancy in here

}

The dialog object contains details of previous/current position, width and height

Link to comment
Share on other sites

3 hours ago, Simon Law said:

$( ".ui-dialog" ).bind( "app.resize", function(event, ui, dialog) {
  console.log(event);
  console.log(ui);
  console.log(dialog);
});

 

Thanks!

One small problem is that this triggers my code no matter which app is being resized.  How can i bind to the resize event of my own app only?  Walking up the DOM tree using nearest?

Link to comment
Share on other sites

Each grey column represents a day. The width of a day comes from the available app width and the earliest issue date and latest due date in the assignments returned from the api.

The yellow rectangles are assignments scaled and sized so their width is equal to the number of days the recipients had to complete it. 

Assignments assigned to individuals are ignored (we removed the ‘convert to individuals’ button on the create assignments screen about a year ago) Those assigned to multiple recipients are shown for each recipient.

The yellow rectangles are hoverable to reveal assignment title and clickable to open the assignment (site view).

So at a glance eg Head of Department can see that 1 of 10 yr11 classes has far fewer assignments set etc

it needs a bit more work...

  • Like 1
Link to comment
Share on other sites

On 30/05/2018 at 14:55, pconkie said:

Each grey column represents a day. The width of a day comes from the available app width and the earliest issue date and latest due date in the assignments returned from the api.

The yellow rectangles are assignments scaled and sized so their width is equal to the number of days the recipients had to complete it. 

Assignments assigned to individuals are ignored (we removed the ‘convert to individuals’ button on the create assignments screen about a year ago) Those assigned to multiple recipients are shown for each recipient.

The yellow rectangles are hoverable to reveal assignment title and clickable to open the assignment (site view).

So at a glance eg Head of Department can see that 1 of 10 yr11 classes has far fewer assignments set etc

 it needs a bit more work...

@pconkie How did you remove the 'convert to individuals' button? Thanks

Link to comment
Share on other sites

1 hour ago, gbligh said:

@pconkie How did you remove the 'convert to individuals' button? Thanks

<style>      
.frogui_modules_assignment_wizard_panels_details .expand-group {display:none;}
</style>

Put this in a html widget on the staff dashboard.

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, pconkie said:

<style>      
.frogui_modules_assignment_wizard_panels_details .expand-group {display:none;}
</style>

Put this in a html widget on the staff dashboard.

But what if you want to set a resubmission for most of the kids in a class but not them all........ 

Link to comment
Share on other sites

49 minutes ago, ADT said:

But what if you want to set a resubmission for most of the kids in a class but not them all........ 

It’s never come up. Personally I’d always ask all the kids to resubmit. There’s always something that could be improved!

Link to comment
Share on other sites

2 hours ago, pconkie said:

It’s never come up. Personally I’d always ask all the kids to resubmit. There’s always something that could be improved!

Im thinking for BTECs...  kids can have two submissions...  but if they have met the criteria first time....  its pointless giving them the second hand in...  just clutters up the kids assignment list!! ;)

Link to comment
Share on other sites

On 04/06/2018 at 16:22, Graham Quince said:

For BTEC I’d use the eportfolios and set keyword widget, along with site list widgets.  Great for project work 

But this is a thread about Pauls assignment viewer thing...  not your ePortfolio’s :P

Link to comment
Share on other sites

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