Jump to content

Chris.Smith

School User
  • Posts

    139
  • Joined

  • Last visited

Everything posted by Chris.Smith

  1. Hi @pconkie, Does this mean you can save changes again? Thanks, Chris
  2. Hi Paul, Thanks for the feedback on the Austen update. It's really important that we capture this information properly so I am going to forward this on to a member of our support team and hopefully they should be in touch soon. @Graham Quince can you co-ordinate getting these issues logged and pushed through. Thanks, Chris
  3. Chris.Smith

    BUGS?

    HI Paul, Done some digging and I don't know what has happened... They both have separate UUID's so its not the ghosting bug we saw recently. What is weird is the UUID I have development activity in the logs for, isn't the one that is showing up in your FrogCode Editor! You also only have in an installation record for the one with the broken icon. According to the Database and the log files, you have never installed the FrogSeats app with the functioning icon (also the one that is in your FrogCode). Because of these issues, @Graham Quince is going to work to get you into the next round of FrogLabs roll outs. In Austen, there are some fixes which are going to help us, identify and isolate the rogue application. Unfortunately I can't help you today, but hopefully next week (or after your update) we will be able to resolve this issue. Thanks, ~ Chris
  4. Hi Paul, Funnily enough this has come up a few times.. Unfortunately the isn't anyway currently to store arbitrary data in Frog at the moment. I will doubt check tomorrow for any loop holes or areas we can "re-use" however for the mean time an external service is your friend here. One approach when using a service like Firebase is to key the configuration data with the school uuid which is available within the majority of User Objects. I am currently forming the specification for a project called Frog Web Services. It would be great to have a chat at some point and get your input on the proposal in-terms of functionality and features. ~ Chris
  5. Hi @Corinne, You should be fine using just the Package Manager which is available for Admin users in the current release (Dickens). If you have not installed a FrogCode Widget or Application before, head on over to the Community Site and checkout @Graham Quince's video at https://www.frogcommunity.com/frogcode/tutorials and click on "Installing a downloaded widget". @Graham Quince will be sharing the widget imminently so stay tuned for updates ~ Chris
  6. Hey @Corinne, Due to complications in the way that Sites manages widgets I have been unable to do this via the HTML widget. I could have shown a read-only view of the comments but that seemed a little like a cop out. So what I've done is create you a FrogCode widget which, when dropped on a page within a site, will detect the user info uuid and link that widget to the assignment wall. I'm going to spend sometime today cleaning it up and making sure that it works under all circumstances within the Assignment workflow. It is worth saying however, that the Assignment wall is being built into a new Assignments based UI in Sites, meaning that soon, this will be some what pointless; but you've got this in the meantime! ~ Chris /cc @gbligh, @Graham Quince
  7. Hi Corinne, Sorry, I got put on a high priority project and have been slammed up until now. I have a gap in my schedule this morning so I'll have a look now and see what I can come up with for you ~ Chris
  8. Preferences aka Widget Preferences are only available for Widgets. If you let me know what you would like to do I can possibly provide you with some solutions. With regards to maximising applications; in your application manifest: { "application": { "args": { "mode": "fullscreen" } } } Hope that helps, ~ Chris
  9. Hi @pconkie, Sorry for not getting to this sooner, I've been saddled with some emergency work which has taken over my life for the past two weeks... Handling async functionality is not for the faint of heart and it's here where you start to see the divide between 'scripters' and programmers. In this instance, Promises are your friend. There are different specifications for Promises, but the one most commonly used and widely available in all browsers is jQuery's implementation. As you may have worked out, Frog.Model.api returns a jQuery Promise object. When we have api's that we are racing (running at the same time) we need to collect all the promise objects and use jQuery's when function to wait for them all to complete. Here is your code, reworked using jQuery Promises. var MyGroup = [], my_group_uuid = 'my_group_uuid', student_flags_uuid = 'student_flags_uuid'; Frog.Model.api('groups.getMembers', { ignore_profiles: true, uuid: my_group_uuid }) .done(function(resp) { var members = res.data, requests = []; requests = members.map(function(member) { member = { uuid: member.uuid, name: member.displayname, gender: member.gender, thumb: member.thumbnail, data: {} }; MyGroup.push(member); return Frog.Model.api('users.getDataInCategory', { user_uuid: member.uuid, uuid: student_flags_uuid }) .done(function(resp) { var fields = resp.data.fields || []; fields.forEach(function(field) { member.data[field.label] = field.value; }); }); }); jQuery.when.apply(this, requests) .done(function() { console.info('Yay! You now have all your data'); }); }); I you would prefer, you can also store the requests array out side of the first API call and also move the jQuery.when to the same level. Any code that needs to execute after the APIs have completed will need to be in the callback of the associated done function. Here is a basic example: // inside my fictional app this.showLoader(); Frog.Model.api('someapi.endpoint', params) .always(this.hideLoader.bind(this)) // No matter the result, always remove the loading gliph .fail(this.handleError.bind(this)) // Deal with error state gracefully .done( function(response) { var data = this.transformApiData(response.data); this.render(data); }.bind(this) ); // after we have sent the request, lets set a timeout to fire in ~3 seconds if the request takes too long. setTimeout( function() { if (this.hasLoader()) { this.updateLoader("This is taking longer than anticipated"); } }.bind(this), 3000 ); The setTimeout will execute after the request is sent but before the response has been captured, regardless of how quick the network response is. Async is something you will pickup over time; but it is definitely one of those "the more you do..." things. Let me know how you get on, ~ Chris /cc @Graham Quince
  10. Chris.Smith

    BUGS?

    Hi Paul, Can you please report the "outage" to the service desk as our systems engineers will need to be aware of any issues of this nature. I have had a brief chat with them and they tell me that at 02:00 your database gets backed up and this can cause performance issues / lock-outs during the backup process. It is likely that this is what happened. We also have a collection of maintenance tasks (cron jobs) which run during the small hours of the morning, and whilst these should run unnoticed, some may cause performance slow downs due to the complexity of the operation (hence why they are scheduled during the early morning). For the time-being we are confident that FrogCode is not linked to this issue, but I will continue to monitor it. ~ Chris
  11. Yeah, this should all be possible... I'll have a dig around this afternoon for you... I think I have some code lying around that should give you a starter-for-ten. ~ Chris
  12. @Corinne, When you say "feedback", do you mean Frog's Feedback application (Annotations and Stickers) or the "Assignment Wall"? ~ Chris
  13. Chris.Smith

    BUGS?

    Ignore all of that Paul, Good news, is that it is indeed actually, updating your source code. The error is occurring in the part of the system the updates the FrogOS Database records about your Widget. This is why it is allowing you to update source code within increasing your version number. The good news is that this is fixed already and should be with you soon! Whilst annoying, this issue should not affect you whilst you are developing Widgets. I have also looked at the styling problem you mentioned previously. I can confirm that your styles are being loaded correctly into the browser and I am struggling to see any conflicts with any other widget overriding your styles. Without messing around with your code I can't begin to tell you what is going wrong. Let me know if you would like me to have a tinker; otherwise, I would suggest copying across all the timetable styles that you are currently using. This will reduce the risk to your widget should we change something. Also it will mean you can remove the timetable widget classes you are using also meaning you won't be at risk of *something else* doing things to your widget! Finally, we do tell browsers not to cache anything in app/package and app/staging however they don't always listen. I you can, try clearing your browser data in Chrome's settings. You can tell it just to remove "Cached images and files" and this should do the job sufficiently. With all that said, there are a heap of updates and improvements coming to you soon that should help you out! ~ Chris
  14. Chris.Smith

    BUGS?

    @pconkie, I have just logged into your platform and it is telling me that there are no updates available to any of your packages?! Did you manage to update them after your previous post? ~ Chris
  15. Chris.Smith

    BUGS?

    Hi Paul, I think that should work... I've read the code that adds a Widget to a page and it includes origin_site_uuid in its options! I'm going to log into your platform and see if I can figure out whats going on with your update. Watch this Space, ~ Chris
  16. Hi Paul, I can address some of your issues now but I'll have to get back to you on the rest. 1. Try... this.elements.page.controller().options.origin_site_uuid 2. I will have to get back to you... 3. It is supposed to be simple... but for some reason our CKEditor component doesn't want to work for me today, I'll get back to you. 4. For a reliable way to display file icons, use the extension as a css class on a div tag. For example: .os-icon-ext-jpeg, .os-icon-ext-jpg You can add a class of small to get a smaller icon. Here is a full example <div class="os-icon-ext os-icon-ext-jpeg"> <span class="file-name">JPEG</span> </div> Hope that helps, ~ Chris
  17. Chris.Smith

    BUGS?

    Hi Paul, You are right, that line won't work natively in FrogCode widgets as it is inserted by the engine running the HTML Widget. That being said however, FrogCode widgets are provided with the site_uuid on initialisation. this.options.site_uuid I will try and login to your platform today and try and diagnose your styling problem. Hopefully it is something simple and I'll be able to fix it for you today. ~ Chris
  18. That looks great Paul! How much was it in the end to reduce the data down? ~ Chris
  19. Hi Paul, Try this... <button class="btn btn-default" role="button" data-action="launch-uploader"> Upload </button> <script type="text/javascript"> var you_want_models = false, just_uuids = true; this.element.find('button[data-action=launch-uploader]') .on('click', function(ev) { var site_uuid = this.elements.site.find('[data-site-uuid]:first').data('site-uuid'); ev.stopPropagation(); $('.os_core:first').trigger('os.app.upload', { "data": { "upload_type": "asset", "site_uuid": site_uuid, "focusApp": this.element.closest('div.app_dialog'), "callback": function(result) { var files, uuids; if (result.files && result.files.length) { if (you_want_models) { files = Sites.Models.Assets.models(result.files); uuids = Array.prototype.map.call(files, function(file) { return file.attr('uuid'); }); } else if (just_uuids) { uuids = result.files.map(function(file) { return file.uuid; }); } // uuids = Array('uuid 1', 'uuid 2'); } } } }); }.bind(this)); </script> This will pop the uploaded files in the sites assets meaning you can manage them from the Site Assets Manager. You will notice that I have included two options for processing. It is preset just to return uuids, however if you change the boolean values at the top of the script tag then it can return a list of asset models which will give you more information about the file. Hope this helps, ~ Chris
  20. It's been one of our most requested features for a long time, you'll find out at Conference ~ Chris
  21. @pconkie, So you want the File Uploader to appear, upload a file, and then pass the resulting uuid to something afterwards?
  22. To clarify, during Live or Edit mode? ~ Chris
  23. Hi @clangstaff, It would need to go inside the event callback: $(getHTMLElem).on('click', function(ev) { /* code goes here */ }); You would also need to make sure the assignments uuid is added to the html markup the same way you have added the "assignment-link" Hope that helps, ~ Chris
  24. @clangstaff, This is because you are telling the Sites application to open 'a site', not 'an assignment'. The difference is subtle, but important. This is from the Assignments Application: var self = this, params = { site: '', assignment_uuid: this.options.assignment.attr('assignment_uuid') }; ev.stopPropagation(); if (this.options.status === "closed") { params.mode = 'readonly' } Sites.Models.Assign.findOne({ uuid: this.options.assignment.attr('assignment_uuid') }).done(function(site) { params.site = site.attr('link'); self.trigger('os.app.siteviewer', params); }); Now this will need some modification, as you don't have access to several elements of this code. Based on a previous example, lets trim it to something like: var $assignment = $(el.currentTarget); FrogOS.openSite({ site: $assignment.data('assignment-link'), assignment_uuid: $assignment.data('assignment-uuid') }); Super important that you have that assignment uuid. This is what will help link the data. ~ Chris
  25. @clangstaff can you provide your code for me to try and replicate the issue. Either: Copy and paste into the reply Copy into jsbin and add a link here Message your code to me on here I'm busy working on a top-secret project at the moment, so I might be worth considering the first two options and hope that some one in the community has some ideas. ~ Chris
×
×
  • Create New...