[Building Sakai] Reload Top Navigation Menu

Steve Swinsburg steve.swinsburg at gmail.com
Thu Oct 31 03:41:48 PDT 2013


Wrapping the call in a try/catch should be done for any call to the parent or window javascript object, for example resizing the iframe, since an LTI call won’t have access to that due to the browser restrictions, as you mentioned.

I’m surprised we don’t see more Javascript issues when tools are rendered externally to Sakai via LTI. 
Here are two Jiras that worked through it:

https://jira.sakaiproject.org/browse/PRFL-672
https://jira.sakaiproject.org/browse/CLOG-108

cheers,
Steve



On 31 Oct 2013, at 8:47 am, Adrian Fish <adrian.r.fish at gmail.com> wrote:

> No worries, you're welcome.
> 
> I'd also wrap that call in a try catch just in case your tool is ever launched via LTI, or in some kind of frame from another host. XSS protection will stop that call working in that case, and may halt execution of JS from that point on.
> 
> Cheers again,
> Adrian.
> 
> 
> On 30 October 2013 12:56, Nguni Phakela <nguni52 at gmail.com> wrote:
> Hi Adrian,
> 
> Thanks, That worked perfectly!
> 
> Cheers,
> Nguni
> 
> --
> Nguni Phakela
> 
> 
> On Wed, Oct 30, 2013 at 11:37 AM, Adrian Fish <adrian.r.fish at gmail.com> wrote:
> Ah, right. How about this?
> 
> http://stackoverflow.com/questions/954454/how-to-reload-main-page-from-within-an-iframe
> 
> window.top.location.reload(). You could call that from within your ui code.
> 
> Cheers,
> Adrian.
> 
> 
> On 30 October 2013 07:58, Nguni Phakela <nguni52 at gmail.com> wrote:
> Hi Adrian,
> 
> Perhaps I didn't explain myself clearly. Programmatically, after I make changes in a module and go to the next page, how would I go about programmatically reloading the whole page, like pressing F5? I make changes to the top menu, from within a customized tool, and would like to not reload the tool frame, but the whole window.
> 
> Cheers,
> Nguni
> 
> --
> Nguni Phakela
> 
> 
> On Tue, Oct 29, 2013 at 3:46 PM, Adrian Fish <adrian.r.fish at gmail.com> wrote:
> I should elaborate a little. You can directly change the vms in the webapps themselves. Sometimes the portal servlet, SkinnableCharon or whatever, will pick up the vm changes without a reload, but you often have to restart the webapp in the manager. Otherwise, a mvn -o clean install sakai:deploy in the portal project will deploy all the changes to code in vms, js or java.
> 
> Cheers again,
> Adrian.
> 
> 
> On 29 October 2013 13:43, Adrian Fish <adrian.r.fish at gmail.com> wrote:
> Hi Nguni.
> 
> In the tomcat manager, stop and start the portal webapp. That'll pick up vm and java changes.
> 
> Cheers,
> Adrian.
> 
> 
> On 29 October 2013 12:48, Nguni Phakela <nguni52 at gmail.com> wrote:
> Hi All,
> 
> It's probably a very simple thing to do, but how does one reload top menu after making changes? I'm implementing a custom feature that hides courses that appear at the top, but would like to refresh right away after changing. 
> 
> Regards,
> --
> Nguni Phakela
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
> 
> 
> 
> 
> 
> 
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131031/51f05902/attachment.html 


More information about the sakai-dev mailing list