pconkie Posted May 29, 2018 Share Posted May 29, 2018 (edited) 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 May 29, 2018 by pconkie Link to comment Share on other sites More sharing options...
adamw Posted May 29, 2018 Share Posted May 29, 2018 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 More sharing options...
pconkie Posted May 29, 2018 Author Share Posted May 29, 2018 Thanks Adam. How would I listen for the app.resize trigger? Link to comment Share on other sites More sharing options...
Simon Law Posted May 30, 2018 Share Posted May 30, 2018 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 More sharing options...
Simon Law Posted May 30, 2018 Share Posted May 30, 2018 $( ".ui-dialog" ).bind( "app.resize", function(event, ui, dialog) { console.log(event); console.log(ui); console.log(dialog); }); Link to comment Share on other sites More sharing options...
pconkie Posted May 30, 2018 Author Share Posted May 30, 2018 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 More sharing options...
pconkie Posted May 30, 2018 Author Share Posted May 30, 2018 I think i got it... this.closest(".ui-dialog").bind("app.resize", function(event, ui, dialog) { //do adjustment to ui }); Link to comment Share on other sites More sharing options...
pconkie Posted May 30, 2018 Author Share Posted May 30, 2018 That was worth a few hours..... much clearer to see which classes are getting too much/little home learning now... 2 Link to comment Share on other sites More sharing options...
ADT Posted May 30, 2018 Share Posted May 30, 2018 Home learning?? Assignments?? Looks a useful tool whatever it is... Link to comment Share on other sites More sharing options...
pconkie Posted May 30, 2018 Author Share Posted May 30, 2018 Yeah, we only use assignments for "home learning". Link to comment Share on other sites More sharing options...
adamw Posted May 30, 2018 Share Posted May 30, 2018 @pconkie Looks neat - How do you read it? Is each column a day and a coloured block indicates that home learning was set on that day for the selected subject? Link to comment Share on other sites More sharing options...
pconkie Posted May 30, 2018 Author Share Posted May 30, 2018 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... 1 Link to comment Share on other sites More sharing options...
pconkie Posted May 31, 2018 Author Share Posted May 31, 2018 @adamw better with some dates along the top? Link to comment Share on other sites More sharing options...
adamw Posted June 1, 2018 Share Posted June 1, 2018 14 hours ago, pconkie said: @adamw better with some dates along the top? Yup! That makes a lot more sense to me now Link to comment Share on other sites More sharing options...
gbligh Posted June 1, 2018 Share Posted June 1, 2018 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 More sharing options...
pconkie Posted June 1, 2018 Author Share Posted June 1, 2018 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. 1 Link to comment Share on other sites More sharing options...
ADT Posted June 1, 2018 Share Posted June 1, 2018 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 More sharing options...
pconkie Posted June 1, 2018 Author Share Posted June 1, 2018 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 More sharing options...
gbligh Posted June 1, 2018 Share Posted June 1, 2018 Thanks Paul. There are a few bits I'd like to hide but my HTML skills are at 0% so I have no idea what I'm looking for! Link to comment Share on other sites More sharing options...
ADT Posted June 1, 2018 Share Posted June 1, 2018 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 More sharing options...
Graham Quince Posted June 4, 2018 Share Posted June 4, 2018 For BTEC I’d use the eportfolios and set keyword widget, along with site list widgets. Great for project work Link to comment Share on other sites More sharing options...
ADT Posted June 4, 2018 Share Posted June 4, 2018 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 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