[web2py] Re: Grid links in component do not open in new window properly

2016-01-17 Thread fbenhamo102
Could you indicate whether what you did work, please? I've the same problem, when using appadmin/manage, which internally uses the smartgrid: opening a link in a new tab does not work (nor do the next / previous buttons). The problem I have when trying to implement Anthony's solution is the fo

[web2py] Re: Grid links in component do not open in new window properly

2014-11-14 Thread Jim Karsten
I think I can make this work. Thanks for your help Anthony and Leonel. Jim On Thursday, November 13, 2014 9:33:04 AM UTC-5, Anthony wrote: > > A simpler option might be to check whether the request is being made via > Ajax, and conditionally change the view: > > def inner(): > response.view

[web2py] Re: Grid links in component do not open in new window properly

2014-11-13 Thread Leonel Câmara
Actually, Anthony's suggestion is better, I clearly shouldn't be here without my dosage of coffee, do that. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --

[web2py] Re: Grid links in component do not open in new window properly

2014-11-13 Thread Anthony
A simpler option might be to check whether the request is being made via Ajax, and conditionally change the view: def inner(): response.view = 'default/inner.load' if request.ajax else 'default/inner.html' grid = SQLFORM.grid(db.item) return locals() In that case, the .html view

[web2py] Re: Grid links in component do not open in new window properly

2014-11-13 Thread Leonel Câmara
The problem is that URL, when an extension is not specified, inherits it from the current URL which is .load in the case where they are loaded in components with extension='load'. The thing is, this need to be load, otherwise inner will use the generic HTML view extending layout.html and you do